diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-01-28 12:23:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 12:23:51 +0000 |
commit | 2e6c34fd11a81b4e3ef73df28a1b4b605a51e776 (patch) | |
tree | d5b702bb4a16ec61c680fd49321596d0fe001506 | |
parent | 99c044f4e2090627c38b4a5ff0b266b18200db2d (diff) | |
parent | b43756e22b3128f9415fdcd954a5b1e3b865680a (diff) |
Merge master into staging-next
29 files changed, 423 insertions, 297 deletions
diff --git a/nixos/modules/services/network-filesystems/rsyncd.nix b/nixos/modules/services/network-filesystems/rsyncd.nix index 9f1263ddff56..edac86eb0e30 100644 --- a/nixos/modules/services/network-filesystems/rsyncd.nix +++ b/nixos/modules/services/network-filesystems/rsyncd.nix @@ -46,6 +46,13 @@ in { ''; }; + socketActivated = mkOption { + default = false; + type = types.bool; + description = + "If enabled Rsync will be socket-activated rather than run persistently."; + }; + }; }; @@ -63,12 +70,55 @@ in { services.rsyncd.settings.global.port = toString cfg.port; - systemd.services.rsyncd = { - description = "Rsync daemon"; - wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = - "${pkgs.rsync}/bin/rsync --daemon --no-detach --config=${configFile}"; + systemd = let + serviceConfigSecurity = { + ProtectSystem = "full"; + PrivateDevices = "on"; + NoNewPrivileges = "on"; + }; + in { + services.rsync = { + enable = !cfg.socketActivated; + aliases = [ "rsyncd" ]; + + description = "fast remote file copy program daemon"; + after = [ "network.target" ]; + documentation = [ "man:rsync(1)" "man:rsyncd.conf(5)" ]; + + serviceConfig = serviceConfigSecurity // { + ExecStart = + "${pkgs.rsync}/bin/rsync --daemon --no-detach --config=${configFile}"; + RestartSec = 1; + }; + + wantedBy = [ "multi-user.target" ]; + }; + + services."rsync@" = { + description = "fast remote file copy program daemon"; + after = [ "network.target" ]; + + serviceConfig = serviceConfigSecurity // { + ExecStart = "${pkgs.rsync}/bin/rsync --daemon --config=${configFile}"; + StandardInput = "socket"; + StandardOutput = "inherit"; + StandardError = "journal"; + }; + }; + + sockets.rsync = { + enable = cfg.socketActivated; + + description = "socket for fast remote file copy program daemon"; + conflicts = [ "rsync.service" ]; + + listenStreams = [ (toString cfg.port) ]; + socketConfig.Accept = true; + + wantedBy = [ "sockets.target" ]; + }; }; + }; meta.maintainers = with lib.maintainers; [ ehmry ]; diff --git a/nixos/tests/rsyncd.nix b/nixos/tests/rsyncd.nix index 3639320f645d..44464e42f28d 100644 --- a/nixos/tests/rsyncd.nix +++ b/nixos/tests/rsyncd.nix @@ -2,24 +2,35 @@ import ./make-test-python.nix ({ pkgs, ... }: { name = "rsyncd"; meta.maintainers = with pkgs.lib.maintainers; [ ehmry ]; - nodes.machine.services.rsyncd = { - enable = true; - settings = { - global = { - "reverse lookup" = false; - "forward lookup" = false; + nodes = let + mkNode = socketActivated: + { config, ... }: { + networking.firewall.allowedTCPPorts = [ config.services.rsyncd.port ]; + services.rsyncd = { + enable = true; + inherit socketActivated; + settings = { + global = { + "reverse lookup" = false; + "forward lookup" = false; + }; + tmp = { + path = "/nix/store"; + comment = "test module"; + }; + }; + }; }; - tmp = { - path = "/nix/store"; - comment = "test module"; - }; - - }; + in { + a = mkNode false; + b = mkNode true; }; testScript = '' start_all() - machine.wait_for_unit("rsyncd") - machine.succeed("rsync localhost::") + a.wait_for_unit("rsync") + b.wait_for_unit("sockets.target") + b.succeed("rsync a::") + a.succeed("rsync b::") ''; }) diff --git a/pkgs/applications/audio/callaudiod/default.nix b/pkgs/applications/audio/callaudiod/default.nix new file mode 100644 index 000000000000..d742961939f6 --- /dev/null +++ b/pkgs/applications/audio/callaudiod/default.nix @@ -0,0 +1,43 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +, glib +, alsaLib +, libpulseaudio +}: + +stdenv.mkDerivation rec { + pname = "callaudiod"; + version = "0.0.4"; + + src = fetchFromGitLab { + domain = "gitlab.com"; + owner = "mobian1"; + repo = pname; + rev = version; + sha256 = "07k7xp5a9c4d4lq7amaj6cg6b3gsd77x9wvf7nzcf4vpaph4yiyj"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = [ + alsaLib + libpulseaudio + glib + ]; + + meta = with lib; { + description = "Daemon for dealing with audio routing during phone calls"; + homepage = "https://gitlab.com/mobian1/callaudiod"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ pacman99 ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/feedbackd/default.nix b/pkgs/applications/misc/feedbackd/default.nix new file mode 100644 index 000000000000..34119c2006d4 --- /dev/null +++ b/pkgs/applications/misc/feedbackd/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, ninja +, pkg-config +, wrapGAppsHook +, glib +, gsound +, libgudev +, json-glib +, vala +, gobject-introspection +}: + +stdenv.mkDerivation rec { + pname = "feedbackd-unstable"; + version = "2021-01-25"; + + src = fetchFromGitLab { + domain = "source.puri.sm"; + owner = "Librem5"; + repo = "feedbackd"; + rev = "v0.0.0+git${builtins.replaceStrings ["-"] [""] version}"; + sha256 = "184ag10sfzrka533inv6f38x6z769kq5jj56vdkcm65j5h786w5v"; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wrapGAppsHook + vala + gobject-introspection + ]; + + buildInputs = [ + glib + gsound + libgudev + json-glib + ]; + + meta = with lib; { + description = "A daemon to provide haptic (and later more) feedback on events"; + homepage = "https://source.puri.sm/Librem5/feedbackd"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ pacman99 ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/applications/misc/pdfpc/default.nix b/pkgs/applications/misc/pdfpc/default.nix index 6430b894b7b5..84ba3ced8fc7 100644 --- a/pkgs/applications/misc/pdfpc/default.nix +++ b/pkgs/applications/misc/pdfpc/default.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "A presenter console with multi-monitor support for PDF files"; homepage = "https://pdfpc.github.io/"; - license = licenses.gpl2Plus; + license = licenses.gpl3Plus; maintainers = with maintainers; [ pSub ]; platforms = platforms.unix; }; diff --git a/pkgs/applications/networking/calls/default.nix b/pkgs/applications/networking/calls/default.nix index e6d4845761a5..01797397f4ef 100644 --- a/pkgs/applications/networking/calls/default.nix +++ b/pkgs/applications/networking/calls/default.nix @@ -1,13 +1,17 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitLab , meson , ninja +, cmake , pkg-config -, libhandy_0 +, libhandy , modemmanager , gtk3 , gom , gsound +, feedbackd +, callaudiod , evolution-data-server , folks , desktop-file-utils @@ -22,14 +26,14 @@ stdenv.mkDerivation rec { pname = "calls"; - version = "0.1.5"; + version = "0.2.0"; src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; - repo = "calls"; + repo = pname; rev = "v${version}"; - sha256 = "1wqkczl1fn4d2py00fsb6kh05avmc7c49gi49j3592fqsvi87j18"; + sha256 = "1qmjdhnr95dawccw1ss8hc3lk0cypj86xg2amjq7avzn86ryd76l"; }; nativeBuildInputs = [ @@ -38,16 +42,19 @@ stdenv.mkDerivation rec { pkg-config desktop-file-utils vala + cmake wrapGAppsHook ]; buildInputs = [ modemmanager - libhandy_0 + libhandy evolution-data-server folks gom gsound + feedbackd + callaudiod gtk3 libpeas ]; diff --git a/pkgs/applications/video/obs-studio/obs-gstreamer.nix b/pkgs/applications/video/obs-studio/obs-gstreamer.nix new file mode 100644 index 000000000000..e32ec7575b2d --- /dev/null +++ b/pkgs/applications/video/obs-studio/obs-gstreamer.nix @@ -0,0 +1,44 @@ +{ lib +, stdenv +, fetchFromGitHub +, gst_all_1 +, pkg-config +, meson +, ninja +, obs-studio +}: + +stdenv.mkDerivation rec { + pname = "obs-gstreamer"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "fzwoch"; + repo = "obs-gstreamer"; + rev = "v${version}"; + sha256 = "1fdpwr8br8x9cnrhr3j4f0l81df26n3bj2ibi3cg96rl86054nid"; + }; + + nativeBuildInputs = [ pkg-config meson ninja ]; + buildInputs = [ gst_all_1.gstreamermm obs-studio ]; + + # obs-studio expects the shared object to be located in bin/32bit or bin/64bit + # https://github.com/obsproject/obs-studio/blob/d60c736cb0ec0491013293c8a483d3a6573165cb/libobs/obs-nix.c#L48 + postInstall = let + pluginPath = { + i686-linux = "bin/32bit"; + x86_64-linux = "bin/64bit"; + }.${stdenv.targetPlatform.system} or (throw "Unsupported system: ${stdenv.targetPlatform.system}"); + in '' + mkdir -p $out/share/obs/obs-plugins/obs-gstreamer/${pluginPath} + ln -s $out/lib/obs-plugins/obs-gstreamer.so $out/share/obs/obs-plugins/obs-gstreamer/${pluginPath} + ''; + + meta = with lib; { + description = "An OBS Studio source, encoder and video filter plugin to use GStreamer elements/pipelines in OBS Studio"; + homepage = "https://github.com/fswoch/obs-gstreamer"; + maintainers = with maintainers; [ ahuzik ]; + license = licenses.gpl2Plus; + platforms = [ "x86_64-linux" "i686-linux" ]; + }; +} diff --git a/pkgs/development/compilers/flutter/default.nix b/pkgs/development/compilers/flutter/default.nix index 3eea7f596b6b..8572040cb0cd 100644 --- a/pkgs/development/compilers/flutter/default.nix +++ b/pkgs/development/compilers/flutter/default.nix @@ -1,40 +1,24 @@ -{ callPackage, dart }: +{ callPackage, fetchurl, dart }: + let - dart_stable = dart.override { version = "2.10.0"; }; - dart_beta = dart.override { version = "2.10.0"; }; - dart_dev = dart.override { version = "2.11.0-161.0.dev"; }; mkFlutter = opts: callPackage (import ./flutter.nix opts) { }; getPatches = dir: let files = builtins.attrNames (builtins.readDir dir); in map (f: dir + ("/" + f)) files; + version = "1.22.5"; + channel = "stable"; + filename = "flutter_linux_${version}-${channel}.tar.xz"; in { mkFlutter = mkFlutter; stable = mkFlutter rec { + inherit dart version; pname = "flutter"; - channel = "stable"; - version = "1.22.0"; - filename = "flutter_linux_${version}-${channel}.tar.xz"; - sha256Hash = "0ryrx458ss8ryhmspcfrhjvad2pl46bxh1qk5vzwzhxiqdc79vm8"; - patches = getPatches ./patches/stable; - dart = dart_stable; - }; - beta = mkFlutter rec { - pname = "flutter"; - channel = "beta"; - version = "1.22.0-12.3.pre"; - filename = "flutter_linux_${version}-${channel}.tar.xz"; - sha256Hash = "1axzz137z4lgpa09h7bjf52i6dij6a9wmjbha1182db23r09plzh"; - patches = getPatches ./patches/stable; - dart = dart_beta; - }; - dev = mkFlutter rec { - pname = "flutter"; - channel = "dev"; - version = "1.23.0-7.0.pre"; - filename = "flutter_linux_${version}-${channel}.tar.xz"; - sha256Hash = "166qb4qbv051bc71yj7c0vrkamhvzz3fp3mz318qzm947mydwjj5"; - patches = getPatches ./patches/dev; - dart = dart_dev; + patches = getPatches ./patches; + src = fetchurl { + url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; + sha256 = "1dv5kczcj9npf7xxlanmpc9ijnxa3ap46521cxn14c0i3y9295ja"; + }; + depsSha256 = "0d7vhk6axgqajy2d9ia9lc6awcnz6cc3n04r7hnh7bx4hb0jv0l1"; }; } diff --git a/pkgs/development/compilers/flutter/flutter.nix b/pkgs/development/compilers/flutter/flutter.nix index a7ec87322507..e3fcf77e391c 100644 --- a/pkgs/development/compilers/flutter/flutter.nix +++ b/pkgs/development/compilers/flutter/flutter.nix @@ -1,10 +1,9 @@ -{ channel -, pname +{ pname , version -, sha256Hash , patches , dart -, filename ? "flutter_linux_${version}-${channel}.tar.xz" +, src +, depsSha256 }: { bash @@ -13,7 +12,8 @@ , coreutils , git , runCommand -, lib, stdenv +, stdenv +, lib , fetchurl , alsaLib , dbus @@ -30,21 +30,20 @@ , nspr , nss , systemd +, callPackage }: let - drvName = "flutter-${channel}-${version}"; + repository = callPackage ./repository.nix { + inherit src pname version dart depsSha256; + }; + drvName = "flutter-${version}"; + flutter = stdenv.mkDerivation { name = "${drvName}-unwrapped"; - src = fetchurl { - url = - "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}"; - sha256 = sha256Hash; - }; - - buildInputs = [ git ]; + buildInputs = [ git repository ]; - inherit patches; + inherit src patches; postPatch = '' patchShebangs --build ./bin/ @@ -52,25 +51,25 @@ let ''; buildPhase = '' - FLUTTER_ROOT=$(pwd) - FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools" - SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot" - STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp" - SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart" - DART_SDK_PATH="${dart}" + export FLUTTER_ROOT="$(pwd)" + export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools" + export SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart" - HOME=../.. # required for pub upgrade --offline, ~/.pub-cache - # path is relative otherwise it's replaced by /build/flutter + mkdir -p "$out/bin/cache" + export SNAPSHOT_PATH="$out/bin/cache/flutter_tools.snapshot" + export STAMP_PATH="$out/bin/cache/flutter_tools.stamp" - (cd "$FLUTTER_TOOLS_DIR" && ${dart}/bin/pub upgrade --offline) + export DART_SDK_PATH="${dart}" + export PUB_CACHE="${repository}" + + pushd "$FLUTTER_TOOLS_DIR" + ${dart}/bin/pub get --offline + popd local revision="$(cd "$FLUTTER_ROOT"; git rev-parse HEAD)" ${dart}/bin/dart --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH" echo "$revision" > "$STAMP_PATH" echo -n "${version}" > version - - rm -rf bin/cache/{artifacts,dart-sdk,downloads} - rm -f bin/cache/*.stamp ''; installPhase = '' @@ -146,7 +145,7 @@ runCommand drvName homepage = "https://flutter.dev"; license = licenses.bsd3; platforms = [ "x86_64-linux" ]; - maintainers = with maintainers; [ babariviere ericdallo ]; + maintainers = with maintainers; [ babariviere ericdallo thiagokokada ]; }; } '' mkdir -p $out/bin diff --git a/pkgs/development/compilers/flutter/patches/dev/disable-auto-update.patch b/pkgs/development/compilers/flutter/patches/dev/disable-auto-update.patch deleted file mode 100644 index f9ac00d1d323..000000000000 --- a/pkgs/development/compilers/flutter/patches/dev/disable-auto-update.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh -index 22efe87443..c6954575c5 100644 ---- a/bin/internal/shared.sh -+++ b/bin/internal/shared.sh -@@ -212,8 +212,6 @@ function shared::execute() { - # FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS" - # FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432" - -- upgrade_flutter 7< "$PROG_NAME" -- - BIN_NAME="$(basename "$PROG_NAME")" - case "$BIN_NAME" in - flutter*) -diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart -index fb1616ba96..b973b3fd58 100644 ---- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart -+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart -@@ -291,13 +291,6 @@ class FlutterCommandRunner extends CommandRunner<void> { - globals.flutterUsage.suppressAnalytics = true; - } - -- try { -- await globals.flutterVersion.ensureVersionFile(); -- } on FileSystemException catch (e) { -- globals.printError('Failed to write the version file to the artifact cache: "$e".'); -- globals.printError('Please ensure you have permissions in the artifact cache directory.'); -- throwToolExit('Failed to write the version file'); -- } - final bool machineFlag = topLevelResults['machine'] as bool; - if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) { - await globals.flutterVersion.checkFlutterVersionFreshness(); diff --git a/pkgs/development/compilers/flutter/patches/dev/move-cache.patch b/pkgs/development/compilers/flutter/patches/dev/move-cache.patch deleted file mode 100644 index eb6ff5cf582e..000000000000 --- a/pkgs/development/compilers/flutter/patches/dev/move-cache.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart -index a059a8e992..b664a7070c 100644 ---- a/dev/devicelab/lib/framework/runner.dart -+++ b/dev/devicelab/lib/framework/runner.dart -@@ -137,7 +137,7 @@ Future<void> cleanupSystem() async { - print('\nTelling Gradle to shut down (JAVA_HOME=$javaHome)'); - final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew'; - final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.'); -- recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir); -+ recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir); - copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper'))); - if (!Platform.isWindows) { - await exec( -diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart -index 36714c5fb4..c0cc049ee1 100644 ---- a/packages/flutter_tools/lib/src/asset.dart -+++ b/packages/flutter_tools/lib/src/asset.dart -@@ -6,6 +6,7 @@ import 'package:meta/meta.dart'; - import 'package:package_config/package_config.dart'; - import 'package:yaml/yaml.dart'; - -+import 'base/common.dart'; - import 'base/context.dart'; - import 'base/file_system.dart'; - import 'base/utils.dart'; -@@ -397,7 +398,7 @@ List<_Asset> _getMaterialAssets(String fontSet) { - for (final Map<dynamic, dynamic> font in (family['fonts'] as List<dynamic>).cast<Map<dynamic, dynamic>>()) { - final Uri entryUri = globals.fs.path.toUri(font['asset'] as String); - result.add(_Asset( -- baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'), -+ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'), - relativeUri: Uri(path: entryUri.pathSegments.last), - entryUri: entryUri, - package: null, -diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart -index aaca036d78..43ff428f8d 100644 ---- a/packages/flutter_tools/lib/src/cache.dart -+++ b/packages/flutter_tools/lib/src/cache.dart -@@ -226,8 +226,15 @@ class Cache { - return; - } - assert(_lock == null); -+ -+ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter')); -+ if (!dir.existsSync()) { -+ dir.createSync(recursive: true); -+ globals.os.chmod(dir, '755'); -+ } -+ - final File lockFile = -- globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile')); -+ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile')); - try { - _lock = lockFile.openSync(mode: FileMode.write); - } on FileSystemException catch (e) { -@@ -330,7 +337,7 @@ class Cache { - if (_rootOverride != null) { - return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache')); - } else { -- return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache')); -+ return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter')); - } - } - diff --git a/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch b/pkgs/development/compilers/flutter/patches/disable-auto-update.patch index 35ce5b367350..35ce5b367350 100644 --- a/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch +++ b/pkgs/development/compilers/flutter/patches/disable-auto-update.patch diff --git a/pkgs/development/compilers/flutter/patches/stable/move-cache.patch b/pkgs/development/compilers/flutter/patches/move-cache.patch index dc77496edb31..dc77496edb31 100644 --- a/pkgs/development/compilers/flutter/patches/stable/move-cache.patch +++ b/pkgs/development/compilers/flutter/patches/move-cache.patch diff --git a/pkgs/development/compilers/flutter/repository.nix b/pkgs/development/compilers/flutter/repository.nix new file mode 100644 index 000000000000..0f8de0a912f1 --- /dev/null +++ b/pkgs/development/compilers/flutter/repository.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, dart, fetchurl, src, pname, version, depsSha256 }: + +stdenv.mkDerivation { + inherit src version; + + pname = "${pname}-deps"; + buildInputs = [ dart ]; + + buildPhase = '' + export PUB_CACHE="$out" + export FLUTTER_ROOT="$(pwd)" + export FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools" + + pushd "$FLUTTER_TOOLS_DIR" + ${dart}/bin/pub get + ''; + + dontInstall = true; + dontFixup = true; + + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = depsSha256; +} diff --git a/pkgs/development/coq-modules/corn/default.nix b/pkgs/development/coq-modules/corn/default.nix index 9f2316f3177d..6910f487c64e 100644 --- a/pkgs/development/coq-modules/corn/default.nix +++ b/pkgs/development/coq-modules/corn/default.nix @@ -3,8 +3,14 @@ with lib; mkCoqDerivation rec { pname = "corn"; inherit version; - defaultVersion = if versions.range "8.6" "8.9" coq.coq-version then "8.8.1" else null; - release."8.8.1".sha256 = "0gh32j0f18vv5lmf6nb87nr5450w6ai06rhrnvlx2wwi79gv10wp"; + defaultVersion = switch coq.coq-version [ + { case = "8.6"; out = "8.8.1"; } + { case = (versions.range "8.7" "8.12"); out = "8.12.0"; } + ] null; + release = { + "8.8.1".sha256 = "0gh32j0f18vv5lmf6nb87nr5450w6ai06rhrnvlx2wwi79gv10wp"; + "8.12.0".sha256 = "0b92vhyzn1j6cs84z2182fn82hxxj0bqq7hk6cs4awwb3vc7dkhi"; + }; preConfigure = "patchShebangs ./configure.sh"; configureScript = "./configure.sh"; diff --git a/pkgs/development/interpreters/dart/default.nix b/pkgs/development/interpreters/dart/default.nix index 7fa59a18c5f1..5fb180201b96 100644 --- a/pkgs/development/interpreters/dart/default.nix +++ b/pkgs/development/interpreters/dart/default.nix @@ -1,89 +1,42 @@ -{ lib, stdenv, fetchurl, unzip, version ? "2.7.2" }: - -let - - sources = let - +{ stdenv +, lib +, fetchurl +, unzip +, version ? "2.10.5" |