From 4a0beed5c0cd04f1641c03847eed83841e9f85fb Mon Sep 17 00:00:00 2001 From: Thibaut Marty Date: Tue, 28 Apr 2020 19:13:21 +0200 Subject: [PATCH 01/69] treewide: fix modules options types where the default is null They can be caught with `nixos-option -r` on an empty ({...}:{}) NixOS configuration. --- nixos/modules/security/duosec.nix | 2 +- nixos/modules/services/audio/icecast.nix | 2 +- nixos/modules/services/hardware/fancontrol.nix | 2 +- nixos/modules/services/misc/gammu-smsd.nix | 2 +- .../modules/services/network-filesystems/orangefs/server.nix | 4 ++-- nixos/modules/services/networking/monero.nix | 2 +- nixos/modules/services/networking/namecoind.nix | 2 +- nixos/modules/system/boot/luksroot.nix | 2 +- nixos/modules/virtualisation/parallels-guest.nix | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/nixos/modules/security/duosec.nix b/nixos/modules/security/duosec.nix index 71428b82f5d..c47be80b9dc 100644 --- a/nixos/modules/security/duosec.nix +++ b/nixos/modules/security/duosec.nix @@ -51,7 +51,7 @@ in }; secretKeyFile = mkOption { - type = types.path; + type = types.nullOr types.path; default = null; description = '' A file containing your secret key. The security of your Duo application is tied to the security of your secret key. diff --git a/nixos/modules/services/audio/icecast.nix b/nixos/modules/services/audio/icecast.nix index 6a8a0f9975b..e9a54c5c255 100644 --- a/nixos/modules/services/audio/icecast.nix +++ b/nixos/modules/services/audio/icecast.nix @@ -47,7 +47,7 @@ in { enable = mkEnableOption "Icecast server"; hostname = mkOption { - type = types.str; + type = types.nullOr types.str; description = "DNS name or IP address that will be used for the stream directory lookups or possibily the playlist generation if a Host header is not provided."; default = config.networking.domain; }; diff --git a/nixos/modules/services/hardware/fancontrol.nix b/nixos/modules/services/hardware/fancontrol.nix index bb4541a784d..e1ce11a5aef 100644 --- a/nixos/modules/services/hardware/fancontrol.nix +++ b/nixos/modules/services/hardware/fancontrol.nix @@ -12,7 +12,7 @@ in{ config = mkOption { default = null; - type = types.lines; + type = types.nullOr types.lines; description = "Fancontrol configuration file content. See pwmconfig8 from the lm_sensors package."; example = '' # Configuration file generated by pwmconfig diff --git a/nixos/modules/services/misc/gammu-smsd.nix b/nixos/modules/services/misc/gammu-smsd.nix index 3057d7fd1a0..552725f1384 100644 --- a/nixos/modules/services/misc/gammu-smsd.nix +++ b/nixos/modules/services/misc/gammu-smsd.nix @@ -172,7 +172,7 @@ in { }; database = mkOption { - type = types.str; + type = types.nullOr types.str; default = null; description = "Database name to store sms data"; }; diff --git a/nixos/modules/services/network-filesystems/orangefs/server.nix b/nixos/modules/services/network-filesystems/orangefs/server.nix index 74ebdc13402..8eb754fe611 100644 --- a/nixos/modules/services/network-filesystems/orangefs/server.nix +++ b/nixos/modules/services/network-filesystems/orangefs/server.nix @@ -83,14 +83,14 @@ in { }; dataStorageSpace = mkOption { - type = types.str; + type = types.nullOr types.str; default = null; example = "/data/storage"; description = "Directory for data storage."; }; metadataStorageSpace = mkOption { - type = types.str; + type = types.nullOr types.str; default = null; example = "/data/meta"; description = "Directory for meta data storage."; diff --git a/nixos/modules/services/networking/monero.nix b/nixos/modules/services/networking/monero.nix index b9536430868..3e7aaf6efb5 100644 --- a/nixos/modules/services/networking/monero.nix +++ b/nixos/modules/services/networking/monero.nix @@ -87,7 +87,7 @@ in }; rpc.password = mkOption { - type = types.str; + type = types.nullOr types.str; default = null; description = '' Password for RPC connections. diff --git a/nixos/modules/services/networking/namecoind.nix b/nixos/modules/services/networking/namecoind.nix index ead7f085943..19cedb7bfc6 100644 --- a/nixos/modules/services/networking/namecoind.nix +++ b/nixos/modules/services/networking/namecoind.nix @@ -89,7 +89,7 @@ in }; rpc.password = mkOption { - type = types.str; + type = types.nullOr types.str; default = null; description = '' Password for RPC connections. diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 31f1e22cda3..262fffafd17 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -637,7 +637,7 @@ in credential = mkOption { default = null; example = "f1d00200d8dc783f7fb1e10ace8da27f8312d72692abfca2f7e4960a73f48e82e1f7571f6ebfcee9fb434f9886ccc8fcc52a6614d8d2"; - type = types.str; + type = types.nullOr types.str; description = "The FIDO2 credential ID."; }; diff --git a/nixos/modules/virtualisation/parallels-guest.nix b/nixos/modules/virtualisation/parallels-guest.nix index 828419fb4b9..55605b388b7 100644 --- a/nixos/modules/virtualisation/parallels-guest.nix +++ b/nixos/modules/virtualisation/parallels-guest.nix @@ -32,7 +32,7 @@ in }; package = mkOption { - type = types.package; + type = types.nullOr types.package; default = config.boot.kernelPackages.prl-tools; defaultText = "config.boot.kernelPackages.prl-tools"; example = literalExample "config.boot.kernelPackages.prl-tools"; From 459c60dda2406d2207d2afd90f210ffc87efde54 Mon Sep 17 00:00:00 2001 From: Gaelan Steele Date: Tue, 26 May 2020 03:16:03 -0700 Subject: [PATCH 02/69] gcc: fix building darwin->linux cross compiler This reverts d9feea5 with some slight modifications to work with other changes since then. Fixes #88213. --- pkgs/development/compilers/gcc/4.8/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/4.9/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/6/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/7/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/8/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/9/default.nix | 15 +++++++++------ pkgs/development/compilers/gcc/builder.sh | 12 +++++++++++- 7 files changed, 65 insertions(+), 37 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index ef697b74bbe..b96f16aebb2 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -10,7 +10,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , cloog ? null, isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -159,11 +159,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 270d118f97e..4b30e3d83d4 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -10,7 +10,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , cloog ? null, isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -171,11 +171,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index b1a981cfdf7..9772c9aa33a 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -11,7 +11,7 @@ , texinfo ? null , flex , perl ? null # optional, for texi2pod (then pod2man); required for Java -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null, boehmgc ? null @@ -184,11 +184,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 22d772cff6d..174d441c67e 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -9,7 +9,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null @@ -155,11 +155,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 58248093d24..0187a73d813 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -9,7 +9,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null @@ -147,11 +147,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix index f660a59a790..bb97c79351a 100644 --- a/pkgs/development/compilers/gcc/9/default.nix +++ b/pkgs/development/compilers/gcc/9/default.nix @@ -9,7 +9,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null @@ -146,11 +146,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index b153687980a..d17ad7bf747 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -240,7 +240,7 @@ postInstall() { # More dependencies with the previous gcc or some libs (gccbug stores the build command line) rm -rf $out/bin/gccbug - if type "patchelf"; then + if [[ buildConfig == *"linux"* ]]; then # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do PREV_RPATH=`patchelf --print-rpath "$i"` @@ -249,6 +249,16 @@ postInstall() { done fi + if [[ targetConfig == *"linux"* ]]; then + # For some reason, when building for linux on darwin, the libs retain + # RPATH to $out. + for i in "$lib"/"$targetConfig"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do + PREV_RPATH=`patchelf --print-rpath "$i"` + NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"` + patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK + done + fi + if type "install_name_tool"; then for i in "$lib"/lib/*.*.dylib; do install_name_tool -id "$i" "$i" || true From b2118ef5bb514bb4335de592a99ad2d91c8f7a90 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Fri, 1 May 2020 11:08:15 +0200 Subject: [PATCH 03/69] dt-schema: init at 2020.6 --- pkgs/development/tools/dt-schema/default.nix | 37 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/tools/dt-schema/default.nix diff --git a/pkgs/development/tools/dt-schema/default.nix b/pkgs/development/tools/dt-schema/default.nix new file mode 100644 index 00000000000..5cba13b6689 --- /dev/null +++ b/pkgs/development/tools/dt-schema/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, git +, ruamel_yaml +, jsonschema +, rfc3987 +, setuptools +, setuptools_scm +}: + +buildPythonPackage rec { + pname = "dtschema"; + version = "2020.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "1zdm0zbn1dfk02yqghfvd0nb26hmzivb6mln6bvxjfdcv6n7pdqf"; + }; + + nativeBuildInputs = [ setuptools_scm git ]; + propagatedBuildInputs = [ + setuptools + ruamel_yaml + jsonschema + rfc3987 + ]; + + meta = with lib; { + description = "Tooling for devicetree validation using YAML and jsonschema"; + homepage = "https://github.com/devicetree-org/dt-schema/"; + # all files have SPDX tags + license = with licenses; [ bsd2 gpl2 ]; + maintainers = with maintainers; [ sorki ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8587ee04189..4a209b048f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3080,6 +3080,8 @@ in dtc = callPackage ../development/compilers/dtc { }; + dt-schema = python3Packages.callPackage ../development/tools/dt-schema { }; + dub = callPackage ../development/tools/build-managers/dub { }; duc = callPackage ../tools/misc/duc { }; From 8bf91014a7170efd512fd73759333a41b25587a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Gr=C3=A4fenstein?= Date: Mon, 10 Aug 2020 22:19:23 +0200 Subject: [PATCH 04/69] firefox-bin: ffmpeg_3 -> ffmpeg --- pkgs/applications/networking/browsers/firefox-bin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 6f5b18bd56c..d86b9d6f987 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -45,7 +45,7 @@ , gnused , gnugrep , gnupg -, ffmpeg_3 +, ffmpeg , runtimeShell , mesa # firefox wants gbm for drm+dmabuf , systemLocale ? config.i18n.defaultLocale or "en-US" @@ -130,7 +130,7 @@ stdenv.mkDerivation { libpulseaudio (lib.getDev libpulseaudio) systemd - ffmpeg_3 + ffmpeg ] + ":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" [ stdenv.cc.cc ]; From e64e92fd084c40f5a7a61081cbd39eb6bc8e2796 Mon Sep 17 00:00:00 2001 From: Olli Helenius Date: Mon, 17 Aug 2020 14:27:07 +0300 Subject: [PATCH 05/69] nixosTests.virtualbox: Disable predictable interface names in guest --- nixos/tests/virtualbox.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix index aec8da6a2af..d07272360dd 100644 --- a/nixos/tests/virtualbox.nix +++ b/nixos/tests/virtualbox.nix @@ -91,6 +91,8 @@ let (isYes "SERIAL_8250_CONSOLE") (isYes "SERIAL_8250") ]; + + networking.usePredictableInterfaceNames = false; }; mkLog = logfile: tag: let From 5f5c990ea068cdaca5bdc46303246c4784493f92 Mon Sep 17 00:00:00 2001 From: Olli Helenius Date: Fri, 7 Aug 2020 13:31:26 +0300 Subject: [PATCH 06/69] nixosTests.virtualbox: Port to python --- nixos/tests/virtualbox.nix | 390 +++++++++++++++++++------------------ 1 file changed, 200 insertions(+), 190 deletions(-) diff --git a/nixos/tests/virtualbox.nix b/nixos/tests/virtualbox.nix index d07272360dd..45d31b6f2ab 100644 --- a/nixos/tests/virtualbox.nix +++ b/nixos/tests/virtualbox.nix @@ -15,7 +15,7 @@ assert use64bitGuest -> useKvmNestedVirt; -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -99,7 +99,7 @@ let rotated = map (i: "${logfile}.${toString i}") (range 1 9); all = concatMapStringsSep " " (f: "\"${f}\"") ([logfile] ++ rotated); logcmd = "tail -F ${all} 2> /dev/null | logger -t \"${tag}\""; - in optionalString debug "$machine->execute(ru '${logcmd} & disown');"; + in if debug then "machine.execute(ru('${logcmd} & disown'))" else "pass"; testVM = vmName: vmScript: let cfg = (import ../lib/eval-config.nix { @@ -207,96 +207,105 @@ let }; testSubs = '' - my ${"$" + name}_sharepath = '${sharePath}'; - sub checkRunning_${name} { - my $cmd = 'VBoxManage list runningvms | grep -q "^\"${name}\""'; - my ($status, $out) = $machine->execute(ru $cmd); - return $status == 0; - } - sub cleanup_${name} { - $machine->execute(ru "VBoxManage controlvm ${name} poweroff") - if checkRunning_${name}; - $machine->succeed("rm -rf ${sharePath}"); - $machine->succeed("mkdir -p ${sharePath}"); - $machine->succeed("chown alice.users ${sharePath}"); - } + ${name}_sharepath = "${sharePath}" - sub createVM_${name} { - vbm("createvm --name ${name} ${createFlags}"); - vbm("modifyvm ${name} ${vmFlags}"); - vbm("setextradata ${name} VBoxInternal/PDM/HaltOnReset 1"); - vbm("storagectl ${name} ${controllerFlags}"); - vbm("storageattach ${name} ${diskFlags}"); - vbm("sharedfolder add ${name} ${sharedFlags}"); - vbm("sharedfolder add ${name} ${nixstoreFlags}"); - cleanup_${name}; - ${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"} - } + def check_running_${name}(): + cmd = "VBoxManage list runningvms | grep -q '^\"${name}\"'" + (status, _) = machine.execute(ru(cmd)) + return status == 0 - sub destroyVM_${name} { - cleanup_${name}; - vbm("unregistervm ${name} --delete"); - } - sub waitForVMBoot_${name} { - $machine->execute(ru( - 'set -e; i=0; '. - 'while ! test -e ${sharePath}/boot-done; do '. - 'sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; '. - 'VBoxManage list runningvms | grep -q "^\"${name}\""; '. - 'done' - )); - } + def cleanup_${name}(): + if check_running_${name}(): + machine.execute(ru("VBoxManage controlvm ${name} poweroff")) + machine.succeed("rm -rf ${sharePath}") + machine.succeed("mkdir -p ${sharePath}") + machine.succeed("chown alice.users ${sharePath}") - sub waitForIP_${name} ($) { - my $property = "/VirtualBox/GuestInfo/Net/$_[0]/V4/IP"; - my $getip = "VBoxManage guestproperty get ${name} $property | ". - "sed -n -e 's/^Value: //p'"; - my $ip = $machine->succeed(ru( - 'for i in $(seq 1000); do '. - 'if ipaddr="$('.$getip.')" && [ -n "$ipaddr" ]; then '. - 'echo "$ipaddr"; exit 0; '. - 'fi; '. - 'sleep 1; '. - 'done; '. - 'echo "Could not get IPv4 address for ${name}!" >&2; '. - 'exit 1' - )); - chomp $ip; - return $ip; - } - sub waitForStartup_${name} { - for (my $i = 0; $i <= 120; $i += 10) { - $machine->sleep(10); - return if checkRunning_${name}; - eval { $_[0]->() } if defined $_[0]; - } - die "VirtualBox VM didn't start up within 2 minutes"; - } + def create_vm_${name}(): + # fmt: off + vbm(f"createvm --name ${name} ${createFlags}") + vbm(f"modifyvm ${name} ${vmFlags}") + vbm(f"setextradata ${name} VBoxInternal/PDM/HaltOnReset 1") + vbm(f"storagectl ${name} ${controllerFlags}") + vbm(f"storageattach ${name} ${diskFlags}") + vbm(f"sharedfolder add ${name} ${sharedFlags}") + vbm(f"sharedfolder add ${name} ${nixstoreFlags}") + cleanup_${name}() - sub waitForShutdown_${name} { - for (my $i = 0; $i <= 120; $i += 10) { - $machine->sleep(10); - return unless checkRunning_${name}; - } - die "VirtualBox VM didn't shut down within 2 minutes"; - } + ${mkLog "$HOME/VirtualBox VMs/${name}/Logs/VBox.log" "HOST-${name}"} + # fmt: on - sub shutdownVM_${name} { - $machine->succeed(ru "touch ${sharePath}/shutdown"); - $machine->execute( - 'set -e; i=0; '. - 'while test -e ${sharePath}/shutdown '. - ' -o -e ${sharePath}/boot-done; do '. - 'sleep 1; i=$(($i + 1)); [ $i -le 3600 ]; '. - 'done' - ); - waitForShutdown_${name}; - } + + def destroy_vm_${name}(): + cleanup_${name}() + vbm("unregistervm ${name} --delete") + + + def wait_for_vm_boot_${name}(): + machine.execute( + ru( + "set -e; i=0; " + "while ! test -e ${sharePath}/boot-done; do " + "sleep 10; i=$(($i + 10)); [ $i -le 3600 ]; " + "VBoxManage list runningvms | grep -q '^\"${name}\"'; " + "done" + ) + ) + + + def wait_for_ip_${name}(interface): + property = f"/VirtualBox/GuestInfo/Net/{interface}/V4/IP" + # fmt: off + getip = f"VBoxManage guestproperty get ${name} {property} | sed -n -e 's/^Value: //p'" + # fmt: on + + ip = machine.succeed( + ru( + "for i in $(seq 1000); do " + f'if ipaddr="$({getip})" && [ -n "$ipaddr" ]; then ' + 'echo "$ipaddr"; exit 0; ' + "fi; " + "sleep 1; " + "done; " + "echo 'Could not get IPv4 address for ${name}!' >&2; " + "exit 1" + ) + ).strip() + return ip + + + def wait_for_startup_${name}(nudge=lambda: None): + for _ in range(0, 130, 10): + machine.sleep(10) + if check_running_${name}(): + return + nudge() + raise Exception("VirtualBox VM didn't start up within 2 minutes") + + + def wait_for_shutdown_${name}(): + for _ in range(0, 130, 10): + machine.sleep(10) + if not check_running_${name}(): + return + raise Exception("VirtualBox VM didn't shut down within 2 minutes") + + + def shutdown_vm_${name}(): + machine.succeed(ru("touch ${sharePath}/shutdown")) + machine.execute( + "set -e; i=0; " + "while test -e ${sharePath}/shutdown " + " -o -e ${sharePath}/boot-done; do " + "sleep 1; i=$(($i + 1)); [ $i -le 3600 ]; " + "done" + ) + wait_for_shutdown_${name}() ''; }; @@ -367,26 +376,31 @@ let }; testScript = '' - sub ru ($) { - my $esc = $_[0] =~ s/'/'\\${"'"}'/gr; - return "su - alice -c '$esc'"; - } - - sub vbm { - $machine->succeed(ru("VBoxManage ".$_[0])); - }; - - sub removeUUIDs { - return join("\n", grep { $_ !~ /^UUID:/ } split(/\n/, $_[0]))."\n"; - } - + from shlex import quote ${concatStrings (mapAttrsToList (_: getAttr "testSubs") vms)} - $machine->waitForX; + def ru(cmd: str) -> str: + return f"su - alice -c {quote(cmd)}" + + def vbm(cmd: str) -> str: + return machine.succeed(ru(f"VBoxManage {cmd}")) + + + def remove_uuids(output: str) -> str: + return "\n".join( + [line for line in (output or "").splitlines() if not line.startswith("UUID:")] + ) + + + machine.wait_for_x() + + # fmt: off ${mkLog "$HOME/.config/VirtualBox/VBoxSVC.log" "HOST-SVC"} + # fmt: on ${testScript} + # (keep black happy) ''; meta = with pkgs.stdenv.lib.maintainers; { @@ -396,133 +410,129 @@ let unfreeTests = mapAttrs (mkVBoxTest true vboxVMsWithExtpack) { enable-extension-pack = '' - createVM_testExtensionPack; - vbm("startvm testExtensionPack"); - waitForStartup_testExtensionPack; - $machine->screenshot("cli_started"); - waitForVMBoot_testExtensionPack; - $machine->screenshot("cli_booted"); + create_vm_testExtensionPack() + vbm("startvm testExtensionPack") + wait_for_startup_testExtensionPack() + machine.screenshot("cli_started") + wait_for_vm_boot_testExtensionPack() + machine.screenshot("cli_booted") - $machine->nest("Checking for privilege escalation", sub { - $machine->fail("test -e '/root/VirtualBox VMs'"); - $machine->fail("test -e '/root/.config/VirtualBox'"); - $machine->succeed("test -e '/home/alice/VirtualBox VMs'"); - }); + with machine.nested("Checking for privilege escalation"): + machine.fail("test -e '/root/VirtualBox VMs'") + machine.fail("test -e '/root/.config/VirtualBox'") + machine.succeed("test -e '/home/alice/VirtualBox VMs'") - shutdownVM_testExtensionPack; - destroyVM_testExtensionPack; + shutdown_vm_testExtensionPack() + destroy_vm_testExtensionPack() ''; }; in mapAttrs (mkVBoxTest false vboxVMs) { simple-gui = '' - createVM_simple; - $machine->succeed(ru "VirtualBox &"); - $machine->waitUntilSucceeds( - ru "xprop -name 'Oracle VM VirtualBox Manager'" - ); - $machine->sleep(5); - $machine->screenshot("gui_manager_started"); # Home to select Tools, down to move to the VM, enter to start it. - $machine->sendKeys("home"); - $machine->sendKeys("down"); - $machine->sendKeys("ret"); - $machine->screenshot("gui_manager_sent_startup"); - waitForStartup_simple (sub { - $machine->sendKeys("home"); - $machine->sendKeys("down"); - $machine->sendKeys("ret"); - }); - $machine->screenshot("gui_started"); - waitForVMBoot_simple; - $machine->screenshot("gui_booted"); - shutdownVM_simple; - $machine->sleep(5); - $machine->screenshot("gui_stopped"); - $machine->sendKeys("ctrl-q"); - $machine->sleep(5); - $machine->screenshot("gui_manager_stopped"); - destroyVM_simple; + def send_vm_startup(): + machine.send_key("home") + machine.send_key("down") + machine.send_key("ret") + + + create_vm_simple() + machine.succeed(ru("VirtualBox &")) + machine.wait_until_succeeds(ru("xprop -name 'Oracle VM VirtualBox Manager'")) + machine.sleep(5) + machine.screenshot("gui_manager_started") + send_vm_startup() + machine.screenshot("gui_manager_sent_startup") + wait_for_startup_simple(send_vm_startup) + machine.screenshot("gui_started") + wait_for_vm_boot_simple() + machine.screenshot("gui_booted") + shutdown_vm_simple() + machine.sleep(5) + machine.screenshot("gui_stopped") + machine.send_key("ctrl-q") + machine.sleep(5) + machine.screenshot("gui_manager_stopped") + destroy_vm_simple() ''; simple-cli = '' - createVM_simple; - vbm("startvm simple"); - waitForStartup_simple; - $machine->screenshot("cli_started"); - waitForVMBoot_simple; - $machine->screenshot("cli_booted"); + create_vm_simple() + vbm("startvm simple") + wait_for_startup_simple() + machine.screenshot("cli_started") + wait_for_vm_boot_simple() + machine.screenshot("cli_booted") - $machine->nest("Checking for privilege escalation", sub { - $machine->fail("test -e '/root/VirtualBox VMs'"); - $machine->fail("test -e '/root/.config/VirtualBox'"); - $machine->succeed("test -e '/home/alice/VirtualBox VMs'"); - }); + with machine.nested("Checking for privilege escalation"): + machine.fail("test -e '/root/VirtualBox VMs'") + machine.fail("test -e '/root/.config/VirtualBox'") + machine.succeed("test -e '/home/alice/VirtualBox VMs'") - shutdownVM_simple; - destroyVM_simple; + shutdown_vm_simple() + destroy_vm_simple() ''; headless = '' - createVM_headless; - $machine->succeed(ru("VBoxHeadless --startvm headless & disown %1")); - waitForStartup_headless; - waitForVMBoot_headless; - shutdownVM_headless; - destroyVM_headless; + create_vm_headless() + machine.succeed(ru("VBoxHeadless --startvm headless & disown %1")) + wait_for_startup_headless() + wait_for_vm_boot_headless() + shutdown_vm_headless() + destroy_vm_headless() ''; host-usb-permissions = '' - my $userUSB = removeUUIDs vbm("list usbhost"); - print STDERR $userUSB; - my $rootUSB = removeUUIDs $machine->succeed("VBoxManage list usbhost"); - print STDERR $rootUSB; + user_usb = remove_uuids(vbm("list usbhost")) + print(user_usb, file=sys.stderr) + root_usb = remove_uuids(machine.succeed("VBoxManage list usbhost")) + print(root_usb, file=sys.stderr) - die "USB host devices differ for root and normal user" - if $userUSB ne $rootUSB; - die "No USB host devices found" if $userUSB =~ //; + if user_usb != root_usb: + raise Exception("USB host devices differ for root and normal user") + if "" in user_usb: + raise Exception("No USB host devices found") ''; systemd-detect-virt = '' - createVM_detectvirt; - vbm("startvm detectvirt"); - waitForStartup_detectvirt; - waitForVMBoot_detectvirt; - shutdownVM_detectvirt; - my $result = $machine->succeed("cat '$detectvirt_sharepath/result'"); - chomp $result; - destroyVM_detectvirt; - die "systemd-detect-virt returned \"$result\" instead of \"oracle\"" - if $result ne "oracle"; + create_vm_detectvirt() + vbm("startvm detectvirt") + wait_for_startup_detectvirt() + wait_for_vm_boot_detectvirt() + shutdown_vm_detectvirt() + result = machine.succeed(f"cat '{detectvirt_sharepath}/result'").strip() + destroy_vm_detectvirt() + if result != "oracle": + raise Exception(f'systemd-detect-virt returned "{result}" instead of "oracle"') ''; net-hostonlyif = '' - createVM_test1; - createVM_test2; + create_vm_test1() + create_vm_test2() - vbm("startvm test1"); - waitForStartup_test1; - waitForVMBoot_test1; + vbm("startvm test1") + wait_for_startup_test1() + wait_for_vm_boot_test1() - vbm("startvm test2"); - waitForStartup_test2; - waitForVMBoot_test2; + vbm("startvm test2") + wait_for_startup_test2() + wait_for_vm_boot_test2() - $machine->screenshot("net_booted"); + machine.screenshot("net_booted") - my $test1IP = waitForIP_test1 1; - my $test2IP = waitForIP_test2 1; + test1_ip = wait_for_ip_test1(1) + test2_ip = wait_for_ip_test2(1) - $machine->succeed("echo '$test2IP' | nc -N '$test1IP' 1234"); - $machine->succeed("echo '$test1IP' | nc -N '$test2IP' 1234"); + machine.succeed(f"echo '{test2_ip}' | nc -N '{test1_ip}' 1234") + machine.succeed(f"echo '{test1_ip}' | nc -N '{test2_ip}' 1234") - $machine->waitUntilSucceeds("nc -N '$test1IP' 5678 < /dev/null >&2"); - $machine->waitUntilSucceeds("nc -N '$test2IP' 5678 < /dev/null >&2"); + machine.wait_until_succeeds(f"nc -N '{test1_ip}' 5678 < /dev/null >&2") + machine.wait_until_succeeds(f"nc -N '{test2_ip}' 5678 < /dev/null >&2") - shutdownVM_test1; - shutdownVM_test2; + shutdown_vm_test1() + shutdown_vm_test2() - destroyVM_test1; - destroyVM_test2; + destroy_vm_test1() + destroy_vm_test2() ''; } // (if enableUnfree then unfreeTests else {}) From 164f8024e981d3e9486cf7a1c58f6e35f92080b4 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Mon, 17 Aug 2020 15:34:36 -0500 Subject: [PATCH 07/69] cudatoolkit: init v11.0.3 --- .../compilers/cudatoolkit/common.nix | 27 ++++++++++++++++--- .../compilers/cudatoolkit/default.nix | 11 ++++++++ .../libraries/science/math/cudnn/default.nix | 11 +++++++- .../libraries/science/math/cudnn/generic.nix | 7 +++++ pkgs/top-level/all-packages.nix | 8 ++++-- 5 files changed, 58 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/common.nix b/pkgs/development/compilers/cudatoolkit/common.nix index 2e93c0b661b..7346b73f53c 100644 --- a/pkgs/development/compilers/cudatoolkit/common.nix +++ b/pkgs/development/compilers/cudatoolkit/common.nix @@ -95,12 +95,33 @@ stdenv.mkDerivation rec { cd .. done ''} - ${lib.optionalString (lib.versionAtLeast version "10.1") '' + ${lib.optionalString (lib.versionAtLeast version "10.1" && lib.versionOlder version "11") '' cd pkg/builds/cuda-toolkit mv * $out/ ''} + ${lib.optionalString (lib.versionAtLeast version "11") '' + mkdir -p $out/bin $out/lib64 $out/include $out/doc + for dir in pkg/builds/* pkg/builds/cuda_nvcc/nvvm pkg/builds/cuda_cupti/extras/CUPTI; do + if [ -d $dir/bin ]; then + mv $dir/bin/* $out/bin + fi + if [ -d $dir/doc ]; then + (cd $dir/doc && find . -type d -exec mkdir -p $out/doc/\{} \;) + (cd $dir/doc && find . \( -type f -o -type l \) -exec mv \{} $out/doc/\{} \;) + fi + if [ -L $dir/include ] || [ -d $dir/include ]; then + (cd $dir/include && find . -type d -exec mkdir -p $out/include/\{} \;) + (cd $dir/include && find . \( -type f -o -type l \) -exec mv \{} $out/include/\{} \;) + fi + if [ -L $dir/lib64 ] || [ -d $dir/lib64 ]; then + (cd $dir/lib64 && find . -type d -exec mkdir -p $out/lib64/\{} \;) + (cd $dir/lib64 && find . \( -type f -o -type l \) -exec mv \{} $out/lib64/\{} \;) + fi + done + mv pkg/builds/cuda_nvcc/nvvm $out/nvvm + ''} - rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why? + rm -f $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why? ${lib.optionalString (lib.versionOlder version "10.1") '' # let's remove the 32-bit libraries, they confuse the lib64->lib mover @@ -152,7 +173,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - for b in nvvp nsight; do + for b in nvvp ${lib.optionalString (lib.versionOlder version "11") "nsight"}; do wrapProgram "$out/bin/$b" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" done diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index c3b16293204..cd4af47a21e 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -4,6 +4,7 @@ , gcc48 , gcc6 , gcc7 +, gcc9 }: let @@ -136,4 +137,14 @@ in rec { }; cudatoolkit_10 = cudatoolkit_10_2; + + cudatoolkit_11_0 = common { + version = "11.0.3"; + url = "https://developer.download.nvidia.com/compute/cuda/11.0.3/local_installers/cuda_11.0.3_450.51.06_linux.run"; + sha256 = "1h4c69nfrgm09jzv8xjnjcvpq8n4gnlii17v3wzqry5d13jc8ydh"; + + gcc = gcc9; + }; + + cudatoolkit_11 = cudatoolkit_11_0; } diff --git a/pkgs/development/libraries/science/math/cudnn/default.nix b/pkgs/development/libraries/science/math/cudnn/default.nix index 765d634a91f..9495366eaaa 100644 --- a/pkgs/development/libraries/science/math/cudnn/default.nix +++ b/pkgs/development/libraries/science/math/cudnn/default.nix @@ -1,4 +1,4 @@ -{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2 }: +{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1, cudatoolkit_10_2, cudatoolkit_11_0 }: let generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) { @@ -80,4 +80,13 @@ in rec { }; cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_1; + + cudnn_cudatoolkit_11_0 = generic rec { + version = "8.0.2"; + cudatoolkit = cudatoolkit_11_0; + srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v8.0.2.39.tgz"; + sha256 = "0ib3v3bgcdxarqapkxngw1nwl0c2a7zz392ns7w9ipcficl4cbv7"; + }; + + cudnn_cudatoolkit_11 = cudnn_cudatoolkit_11_0; } diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index 5a17e807bd4..381920682a4 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -32,6 +32,13 @@ stdenv.mkDerivation { mkdir -p $out cp -a include $out/include cp -a lib64 $out/lib64 + + ${lib.optionalString (lib.versionAtLeast version "8") '' + # patchelf fails on libcudnn_cnn_infer due to it being too big. + # I'm hoping it's not needed for most programs. + # (https://github.com/NixOS/patchelf/issues/222) + rm -f $out/lib64/libcudnn_cnn_infer* + ''} ''; # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 933a7544fb7..2a8eb94eaa5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2868,7 +2868,9 @@ in cudatoolkit_10 cudatoolkit_10_0 cudatoolkit_10_1 - cudatoolkit_10_2; + cudatoolkit_10_2 + cudatoolkit_11 + cudatoolkit_11_0; cudatoolkit = cudatoolkit_10; @@ -2885,7 +2887,9 @@ in cudnn_cudatoolkit_10 cudnn_cudatoolkit_10_0 cudnn_cudatoolkit_10_1 - cudnn_cudatoolkit_10_2; + cudnn_cudatoolkit_10_2 + cudnn_cudatoolkit_11 + cudnn_cudatoolkit_11_0; cudnn = cudnn_cudatoolkit_10; From abba9a21547da7fe1e9661600fdb69e33e0ca5c4 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 18 Aug 2020 19:25:10 -0500 Subject: [PATCH 08/69] nccl: 2.4.8-1 -> 2.7.8-1 --- pkgs/development/libraries/science/math/nccl/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/nccl/default.nix b/pkgs/development/libraries/science/math/nccl/default.nix index 5f38d45fc4d..eb194c0e9e4 100644 --- a/pkgs/development/libraries/science/math/nccl/default.nix +++ b/pkgs/development/libraries/science/math/nccl/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "nccl-${version}-cuda-${cudatoolkit.majorVersion}"; - version = "2.4.8-1"; + version = "2.7.8-1"; src = fetchFromGitHub { owner = "NVIDIA"; repo = "nccl"; rev = "v${version}"; - sha256 = "05m66y64rgsdyybvjybhy6clikwv438b1m484ikai78fb2b7mvyq"; + sha256 = "0xxiwaw239dc9g015fka3k1nvm5zyl00dzgxnwzkang61dys9wln"; }; outputs = [ "out" "dev" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2a8eb94eaa5..904e4b5fcf0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5495,6 +5495,7 @@ in nccl_cudatoolkit_9_0 = nccl.override { cudatoolkit = cudatoolkit_9_0; }; nccl_cudatoolkit_9 = nccl.override { cudatoolkit = cudatoolkit_9; }; nccl_cudatoolkit_10 = nccl.override { cudatoolkit = cudatoolkit_10; }; + nccl_cudatoolkit_11 = nccl.override { cudatoolkit = cudatoolkit_11; }; ndjbdns = callPackage ../tools/networking/ndjbdns { }; From a9425088755791ffd998eff24ef8dc236bba7ce5 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Thu, 20 Aug 2020 11:44:36 +0200 Subject: [PATCH 09/69] confluence: 7.6.1 -> 7.7.2 --- pkgs/servers/atlassian/confluence.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/atlassian/confluence.nix b/pkgs/servers/atlassian/confluence.nix index 116b8b935b1..ab5c2da5edd 100644 --- a/pkgs/servers/atlassian/confluence.nix +++ b/pkgs/servers/atlassian/confluence.nix @@ -8,11 +8,11 @@ assert withMysql -> (mysql_jdbc != null); stdenvNoCC.mkDerivation rec { pname = "atlassian-confluence"; - version = "7.6.1"; + version = "7.7.2"; src = fetchurl { url = "https://product-downloads.atlassian.com/software/confluence/downloads/${pname}-${version}.tar.gz"; - sha256 = "0ipkr0d4mwsah698fg320h9g5il9xcnwlifbfvfnsijs60y9ps8x"; + sha256 = "12ay2y7ixaxzj12pw66k65743ic3iccicn49cnjmas51c5ww09h1"; }; buildPhase = '' From bc0a6b113b1932270b0c04335591b0c3c75b69ec Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 20 Aug 2020 10:44:23 -0500 Subject: [PATCH 10/69] nccl: remove nccl_cudatoolkit_9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn’t work with latest nccl anymore. --- pkgs/top-level/all-packages.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 904e4b5fcf0..4af49e4d641 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5492,8 +5492,6 @@ in xnbd = callPackage ../tools/networking/xnbd { }; nccl = callPackage ../development/libraries/science/math/nccl { }; - nccl_cudatoolkit_9_0 = nccl.override { cudatoolkit = cudatoolkit_9_0; }; - nccl_cudatoolkit_9 = nccl.override { cudatoolkit = cudatoolkit_9; }; nccl_cudatoolkit_10 = nccl.override { cudatoolkit = cudatoolkit_10; }; nccl_cudatoolkit_11 = nccl.override { cudatoolkit = cudatoolkit_11; }; From 47b56e7c19c2e3af685ee408f02f232efb3d12b1 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 21 Aug 2020 23:33:59 -0500 Subject: [PATCH 11/69] runInLinuxVM, test-driver: use -cpu max instead of -cpu host MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This appears to avoid requiring KVM when it’s not available. This is what I originally though -cpu host did. Unfortunately not much documentation available from the QEMU side on this, but this appears to square with help: $ qemu-system-x86 -cpu help ... x86 host KVM processor with all supported host features x86 max Enables all features supported by the accelerator in the current host ... Whether we actually want to support this not clear, since this only happens when your CPU doesn’t have full KVM support. Some Nix builders are lying about kvm support though. Things aren’t too slow without it though. Fixes https://github.com/NixOS/nixpkgs/issues/85394 Alternative to https://github.com/NixOS/nixpkgs/pull/83920 --- nixos/lib/qemu-flags.nix | 4 ++-- nixos/tests/installer.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index 0cf6977af4b..0f066245893 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -22,9 +22,9 @@ rec { else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { - x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu host"; + x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu max"; armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; - x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu host"; + x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 02b839fee3f..420951eb715 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -74,7 +74,7 @@ let throw "Non-EFI boot methods are only supported on i686 / x86_64" else '' def assemble_qemu_flags(): - flags = "-cpu host" + flags = "-cpu max" ${if system == "x86_64-linux" then ''flags += " -m 768"'' else ''flags += " -m 512 -enable-kvm -machine virt,gic-version=host"'' From 3a36eb3ff7d4a0245f55f1695761729982f341ae Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 24 Aug 2020 04:40:35 +0000 Subject: [PATCH 12/69] radare2-cutter: 1.11.0 -> 1.11.1 --- pkgs/development/tools/analysis/radare2/cutter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/radare2/cutter.nix b/pkgs/development/tools/analysis/radare2/cutter.nix index ff6d7765ead..5fde4e1f433 100644 --- a/pkgs/development/tools/analysis/radare2/cutter.nix +++ b/pkgs/development/tools/analysis/radare2/cutter.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "radare2-cutter"; - version = "1.11.0"; + version = "1.11.1"; src = fetchFromGitHub { owner = "radareorg"; repo = "cutter"; rev = "v${version}"; - sha256 = "1xvdap7hpkjz6rg0ngnql1p18p93b8w9gv130g818nwcjsh9i2y5"; + sha256 = "0kscl0yf5qxacqnz3pp47r94yiwnc4rwirnr2x580z10fwhsivki"; }; postUnpack = "export sourceRoot=$sourceRoot/src"; From c1667f85bb9ab44870d159e779bfb0a139f6f537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Aug 2020 08:08:52 +0100 Subject: [PATCH 13/69] nixos/test-driver: introduce main method This way we not accidentally use introduce/use global variables. Also it explictly mark the code for the mypy type checker. --- nixos/lib/test-driver/test-driver.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index f4e2bb6100f..b5e8b398d0b 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -922,7 +922,8 @@ def subtest(name: str) -> Iterator[None]: return False -if __name__ == "__main__": +def main() -> None: + global machines arg_parser = argparse.ArgumentParser() arg_parser.add_argument( "-K", @@ -944,7 +945,8 @@ if __name__ == "__main__": if not cli_args.keep_vm_state: machine.cleanup_statedir() machine_eval = [ - "{0} = machines[{1}]".format(m.name, idx) for idx, m in enumerate(machines) + "global {0}; {0} = machines[{1}]".format(m.name, idx) + for idx, m in enumerate(machines) ] exec("\n".join(machine_eval)) @@ -964,3 +966,7 @@ if __name__ == "__main__": run_tests() toc = time.time() print("test script finished in {:.2f}s".format(toc - tic)) + + +if __name__ == "__main__": + main() From 392415c285b76d1e5111c9bb9e46bc35d6bae5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Aug 2020 09:33:09 +0100 Subject: [PATCH 14/69] nixos/test-driver: switch to pythons' logging lib - Less code - more thread-safe according to @flokli --- nixos/lib/test-driver/test-driver.py | 341 ++++++++++----------------- nixos/lib/testing-python.nix | 2 +- 2 files changed, 128 insertions(+), 215 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index b5e8b398d0b..7a0eb264bef 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -1,17 +1,15 @@ #! /somewhere/python3 -from contextlib import contextmanager, _GeneratorContextManager -from queue import Queue, Empty +from contextlib import contextmanager from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List -from xml.sax.saxutils import XMLGenerator import queue import io import _thread import argparse import atexit import base64 -import codecs import os import pathlib +import logging import ptpython.repl import pty import re @@ -22,8 +20,6 @@ import subprocess import sys import tempfile import time -import traceback -import unicodedata CHAR_TO_KEY = { "A": "shift-a", @@ -88,13 +84,17 @@ CHAR_TO_KEY = { ")": "shift-0x0B", } -# Forward references -log: "Logger" +# Forward reference machines: "List[Machine]" +logging.basicConfig(format="%(message)s") +logger = logging.getLogger("test-driver") +logger.setLevel(logging.INFO) -def eprint(*args: object, **kwargs: Any) -> None: - print(*args, file=sys.stderr, **kwargs) + +class MachineLogAdapter(logging.LoggerAdapter): + def process(self, msg: str, kwargs: Any) -> Tuple[str, Any]: + return f"{self.extra['machine']}: {msg}", kwargs def make_command(args: list) -> str: @@ -102,8 +102,7 @@ def make_command(args: list) -> str: def create_vlan(vlan_nr: str) -> Tuple[str, str, "subprocess.Popen[bytes]", Any]: - global log - log.log("starting VDE switch for network {}".format(vlan_nr)) + logger.info(f"starting VDE switch for network {vlan_nr}") vde_socket = tempfile.mkdtemp( prefix="nixos-test-vde-", suffix="-vde{}.ctl".format(vlan_nr) ) @@ -142,70 +141,6 @@ def retry(fn: Callable) -> None: raise Exception("action timed out") -class Logger: - def __init__(self) -> None: - self.logfile = os.environ.get("LOGFILE", "/dev/null") - self.logfile_handle = codecs.open(self.logfile, "wb") - self.xml = XMLGenerator(self.logfile_handle, encoding="utf-8") - self.queue: "Queue[Dict[str, str]]" = Queue() - - self.xml.startDocument() - self.xml.startElement("logfile", attrs={}) - - def close(self) -> None: - self.xml.endElement("logfile") - self.xml.endDocument() - self.logfile_handle.close() - - def sanitise(self, message: str) -> str: - return "".join(ch for ch in message if unicodedata.category(ch)[0] != "C") - - def maybe_prefix(self, message: str, attributes: Dict[str, str]) -> str: - if "machine" in attributes: - return "{}: {}".format(attributes["machine"], message) - return message - - def log_line(self, message: str, attributes: Dict[str, str]) -> None: - self.xml.startElement("line", attributes) - self.xml.characters(message) - self.xml.endElement("line") - - def log(self, message: str, attributes: Dict[str, str] = {}) -> None: - eprint(self.maybe_prefix(message, attributes)) - self.drain_log_queue() - self.log_line(message, attributes) - - def enqueue(self, message: Dict[str, str]) -> None: - self.queue.put(message) - - def drain_log_queue(self) -> None: - try: - while True: - item = self.queue.get_nowait() - attributes = {"machine": item["machine"], "type": "serial"} - self.log_line(self.sanitise(item["msg"]), attributes) - except Empty: - pass - - @contextmanager - def nested(self, message: str, attributes: Dict[str, str] = {}) -> Iterator[None]: - eprint(self.maybe_prefix(message, attributes)) - - self.xml.startElement("nest", attrs={}) - self.xml.startElement("head", attributes) - self.xml.characters(message) - self.xml.endElement("head") - - tic = time.time() - self.drain_log_queue() - yield - self.drain_log_queue() - toc = time.time() - self.log("({:.2f} seconds)".format(toc - tic)) - - self.xml.endElement("nest") - - class Machine: def __init__(self, args: Dict[str, Any]) -> None: if "name" in args: @@ -235,8 +170,8 @@ class Machine: self.pid: Optional[int] = None self.socket = None self.monitor: Optional[socket.socket] = None - self.logger: Logger = args["log"] self.allow_reboot = args.get("allowReboot", False) + self.logger = MachineLogAdapter(logger, extra=dict(machine=self.name)) @staticmethod def create_startcommand(args: Dict[str, str]) -> str: @@ -292,14 +227,6 @@ class Machine: def is_up(self) -> bool: return self.booted and self.connected - def log(self, msg: str) -> None: - self.logger.log(msg, {"machine": self.name}) - - def nested(self, msg: str, attrs: Dict[str, str] = {}) -> _GeneratorContextManager: - my_attrs = {"machine": self.name} - my_attrs.update(attrs) - return self.logger.nested(msg, my_attrs) - def wait_for_monitor_prompt(self) -> str: assert self.monitor is not None answer = "" @@ -314,7 +241,7 @@ class Machine: def send_monitor_command(self, command: str) -> str: message = ("{}\n".format(command)).encode() - self.log("sending monitor command: {}".format(command)) + self.logger.info(f"sending monitor command: {command}") assert self.monitor is not None self.monitor.send(message) return self.wait_for_monitor_prompt() @@ -381,16 +308,16 @@ class Machine: return self.execute("systemctl {}".format(q)) def require_unit_state(self, unit: str, require_state: str = "active") -> None: - with self.nested( - "checking if unit ‘{}’ has reached state '{}'".format(unit, require_state) - ): - info = self.get_unit_info(unit) - state = info["ActiveState"] - if state != require_state: - raise Exception( - "Expected unit ‘{}’ to to be in state ".format(unit) - + "'{}' but it is in state ‘{}’".format(require_state, state) - ) + self.logger.info( + f"checking if unit ‘{unit}’ has reached state '{require_state}'" + ) + info = self.get_unit_info(unit) + state = info["ActiveState"] + if state != require_state: + raise Exception( + "Expected unit ‘{}’ to to be in state ".format(unit) + + "'{}' but it is in state ‘{}’".format(require_state, state) + ) def execute(self, command: str) -> Tuple[int, str]: self.connect() @@ -414,27 +341,25 @@ class Machine: """Execute each command and check that it succeeds.""" output = "" for command in commands: - with self.nested("must succeed: {}".format(command)): - (status, out) = self.execute(command) - if status != 0: - self.log("output: {}".format(out)) - raise Exception( - "command `{}` failed (exit code {})".format(command, status) - ) - output += out + self.logger.info(f"must succeed: {command}") + (status, out) = self.execute(command) + if status != 0: + self.logger.info(f"output: {out}") + raise Exception( + "command `{}` failed (exit code {})".format(command, status) + ) + output += out return output def fail(self, *commands: str) -> str: """Execute each command and check that it fails.""" output = "" for command in commands: - with self.nested("must fail: {}".format(command)): - (status, out) = self.execute(command) - if status == 0: - raise Exception( - "command `{}` unexpectedly succeeded".format(command) - ) - output += out + self.logger.info(f"must fail: {command}") + (status, out) = self.execute(command) + if status == 0: + raise Exception("command `{}` unexpectedly succeeded".format(command)) + output += out return output def wait_until_succeeds(self, command: str) -> str: @@ -448,9 +373,9 @@ class Machine: status, output = self.execute(command) return status == 0 - with self.nested("waiting for success: {}".format(command)): - retry(check_success) - return output + self.logger.info(f"waiting for success: {command}") + retry(check_success) + return output def wait_until_fails(self, command: str) -> str: """Wait until a command returns failure. @@ -463,21 +388,21 @@ class Machine: status, output = self.execute(command) return status != 0 - with self.nested("waiting for failure: {}".format(command)): - retry(check_failure) - return output + self.logger.info(f"waiting for failure: {command}") + retry(check_failure) + return output def wait_for_shutdown(self) -> None: if not self.booted: return - with self.nested("waiting for the VM to power off"): - sys.stdout.flush() - self.process.wait() + self.logger.info("waiting for the VM to power off") + sys.stdout.flush() + self.process.wait() - self.pid = None - self.booted = False - self.connected = False + self.pid = None + self.booted = False + self.connected = False def get_tty_text(self, tty: str) -> str: status, output = self.execute( @@ -495,19 +420,19 @@ class Machine: def tty_matches(last: bool) -> bool: text = self.get_tty_text(tty) if last: - self.log( + self.logger.info( f"Last chance to match /{regexp}/ on TTY{tty}, " f"which currently contains: {text}" ) return len(matcher.findall(text)) > 0 - with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)): - retry(tty_matches) + self.logger.info(f"waiting for {regexp} to appear on tty {tty}") + retry(tty_matches) def send_chars(self, chars: List[str]) -> None: - with self.nested("sending keys ‘{}‘".format(chars)): - for char in chars: - self.send_key(char) + self.logger.info(f"sending keys ‘{chars}‘") + for char in chars: + self.send_key(char) def wait_for_file(self, filename: str) -> None: """Waits until the file exists in machine's file system.""" @@ -516,16 +441,16 @@ class Machine: status, _ = self.execute("test -e {}".format(filename)) return status == 0 - with self.nested("waiting for file ‘{}‘".format(filename)): - retry(check_file) + self.logger.info(f"waiting for file ‘{filename}‘") + retry(check_file) def wait_for_open_port(self, port: int) -> None: def port_is_open(_: Any) -> bool: status, _ = self.execute("nc -z localhost {}".format(port)) return status == 0 - with self.nested("waiting for TCP port {}".format(port)): - retry(port_is_open) + self.logger.info(f"waiting for TCP port {port}") + retry(port_is_open) def wait_for_closed_port(self, port: int) -> None: def port_is_closed(_: Any) -> bool: @@ -547,17 +472,17 @@ class Machine: if self.connected: return - with self.nested("waiting for the VM to finish booting"): - self.start() + self.logger.info("waiting for the VM to finish booting") + self.start() - tic = time.time() - self.shell.recv(1024) - # TODO: Timeout - toc = time.time() + tic = time.time() + self.shell.recv(1024) + # TODO: Timeout + toc = time.time() - self.log("connected to guest root shell") - self.log("(connecting took {:.2f} seconds)".format(toc - tic)) - self.connected = True + self.logger.info("connected to guest root shell") + self.logger.info(f"(connecting took {toc - tic:.2f} seconds)") + self.connected = True def screenshot(self, filename: str) -> None: out_dir = os.environ.get("out", os.getcwd()) @@ -566,15 +491,12 @@ class Machine: filename = os.path.join(out_dir, "{}.png".format(filename)) tmp = "{}.ppm".format(filename) - with self.nested( - "making screenshot {}".format(filename), - {"image": os.path.basename(filename)}, - ): - self.send_monitor_command("screendump {}".format(tmp)) - ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True) - os.unlink(tmp) - if ret.returncode != 0: - raise Exception("Cannot convert screenshot") + self.logger.info(f"making screenshot {filename}") + self.send_monitor_command("screendump {}".format(tmp)) + ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True) + os.unlink(tmp) + if ret.returncode != 0: + raise Exception("Cannot convert screenshot") def copy_from_host_via_shell(self, source: str, target: str) -> None: """Copy a file from the host into the guest by piping it over the @@ -650,20 +572,18 @@ class Machine: tess_args = "-c debug_file=/dev/null --psm 11 --oem 2" - with self.nested("performing optical character recognition"): - with tempfile.NamedTemporaryFile() as tmpin: - self.send_monitor_command("screendump {}".format(tmpin.name)) + self.logger.info("performing optical character recognition") + with tempfile.NamedTemporaryFile() as tmpin: + self.send_monitor_command("screendump {}".format(tmpin.name)) - cmd = "convert {} {} tiff:- | tesseract - - {}".format( - magick_args, tmpin.name, tess_args - ) - ret = subprocess.run(cmd, shell=True, capture_output=True) - if ret.returncode != 0: - raise Exception( - "OCR failed with exit code {}".format(ret.returncode) - ) + cmd = "convert {} {} tiff:- | tesseract - - {}".format( + magick_args, tmpin.name, tess_args + ) + ret = subprocess.run(cmd, shell=True, capture_output=True) + if ret.returncode != 0: + raise Exception("OCR failed with exit code {}".format(ret.returncode)) - return ret.stdout.decode("utf-8") + return ret.stdout.decode("utf-8") def wait_for_text(self, regex: str) -> None: def screen_matches(last: bool) -> bool: @@ -671,15 +591,15 @@ class Machine: matches = re.search(regex, text) is not None if last and not matches: - self.log("Last OCR attempt failed. Text was: {}".format(text)) + self.logger.info(f"Last OCR attempt failed. Text was: {text}") return matches - with self.nested("waiting for {} to appear on screen".format(regex)): - retry(screen_matches) + self.logger.info(f"waiting for {regex} to appear on screen") + retry(screen_matches) def wait_for_console_text(self, regex: str) -> None: - self.log("waiting for {} to appear on console".format(regex)) + self.logger.info(f"waiting for {regex} to appear on console") # Buffer the console output, this is needed # to match multiline regexes. console = io.StringIO() @@ -702,7 +622,7 @@ class Machine: if self.booted: return - self.log("starting vm") + self.logger.info("starting vm") def create_socket(path: str) -> socket.socket: if os.path.exists(path): @@ -759,7 +679,7 @@ class Machine: # Store last serial console lines for use # of wait_for_console_text - self.last_lines: Queue = Queue() + self.last_lines: queue.Queue = queue.Queue() def process_serial_output() -> None: assert self.process.stdout is not None @@ -767,8 +687,7 @@ class Machine: # Ignore undecodable bytes that may occur in boot menus line = _line.decode(errors="ignore").replace("\r", "").rstrip() self.last_lines.put(line) - eprint("{} # {}".format(self.name, line)) - self.logger.enqueue({"msg": line, "machine": self.name}) + self.logger.info(line) _thread.start_new_thread(process_serial_output, ()) @@ -777,10 +696,10 @@ class Machine: self.pid = self.process.pid self.booted = True - self.log("QEMU running (pid {})".format(self.pid)) + self.logger.info(f"QEMU running (pid {self.pid})") def cleanup_statedir(self) -> None: - self.log("delete the VM state directory") + self.logger.info("delete the VM state directory") if os.path.isfile(self.state_dir): shutil.rmtree(self.state_dir) @@ -795,7 +714,7 @@ class Machine: if not self.booted: return - self.log("forced crash") + self.logger.info("forced crash") self.send_monitor_command("quit") self.wait_for_shutdown() @@ -815,8 +734,8 @@ class Machine: status, _ = self.execute("[ -e /tmp/.X11-unix/X0 ]") return status == 0 - with self.nested("waiting for the X11 server"): - retry(check_x) + self.logger.info("waiting for the X11 server") + retry(check_x) def get_window_names(self) -> List[str]: return self.succeed( @@ -829,15 +748,14 @@ class Machine: def window_is_visible(last_try: bool) -> bool: names = self.get_window_names() if last_try: - self.log( - "Last chance to match {} on the window list,".format(regexp) - + " which currently contains: " - + ", ".join(names) + self.logger.info( + f"Last chance to match {regexp} on the window list, " + + f"which currently contains: {', '.join(names)}" ) return any(pattern.search(name) for name in names) - with self.nested("Waiting for a window to appear"): - retry(window_is_visible) + self.logger.info("Waiting for a window to appear") + retry(window_is_visible) def sleep(self, secs: int) -> None: time.sleep(secs) @@ -865,23 +783,22 @@ class Machine: def create_machine(args: Dict[str, Any]) -> Machine: global log - args["log"] = log args["redirectSerial"] = os.environ.get("USE_SERIAL", "0") == "1" return Machine(args) def start_all() -> None: global machines - with log.nested("starting all VMs"): - for machine in machines: - machine.start() + logger.info("starting all VMs") + for machine in machines: + machine.start() def join_all() -> None: global machines - with log.nested("waiting for all VMs to finish"): - for machine in machines: - machine.wait_for_shutdown() + logger.info("waiting for all VMs to finish") + for machine in machines: + machine.wait_for_shutdown() def test_script() -> None: @@ -892,13 +809,12 @@ def run_tests() -> None: global machines tests = os.environ.get("tests", None) if tests is not None: - with log.nested("running the VM test script"): - try: - exec(tests, globals()) - except Exception as e: - eprint("error: ") - traceback.print_exc() - sys.exit(1) + logger.info("running the VM test script") + try: + exec(tests, globals()) + except Exception: + logging.exception("error:") + sys.exit(1) else: ptpython.repl.embed(locals(), globals()) @@ -911,13 +827,13 @@ def run_tests() -> None: @contextmanager def subtest(name: str) -> Iterator[None]: - with log.nested(name): - try: - yield - return True - except Exception as e: - log.log(f'Test "{name}" failed with error: "{e}"') - raise e + logger.info(name) + try: + yield + return True + except Exception as e: + logger.info(f'Test "{name}" failed with error: "{e}"') + raise e return False @@ -933,8 +849,6 @@ def main() -> None: ) (cli_args, vm_scripts) = arg_parser.parse_known_args() - log = Logger() - vlan_nrs = list(dict.fromkeys(os.environ.get("VLANS", "").split())) vde_sockets = [create_vlan(v) for v in vlan_nrs] for nr, vde_socket, _, _ in vde_sockets: @@ -952,15 +866,14 @@ def main() -> None: @atexit.register def clean_up() -> None: - with log.nested("cleaning up"): - for machine in machines: - if machine.pid is None: - continue - log.log("killing {} (pid {})".format(machine.name, machine.pid)) - machine.process.kill() - for _, _, process, _ in vde_sockets: - process.terminate() - log.close() + logger.info("cleaning up") + for machine in machines: + if machine.pid is None: + continue + logger.info(f"killing {machine.name} (pid {machine.pid})") + machine.process.kill() + for _, _, process, _ in vde_sockets: + process.terminate() tic = time.time() run_tests() diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index c6939c7d698..4812567b8c6 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -62,7 +62,7 @@ rec { '' mkdir -p $out - LOGFILE=/dev/null tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver + tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver for i in */xchg/coverage-data; do mkdir -p $out/coverage-data From f3c0a09c76db18102028c3f4146f09d36ca6dac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Aug 2020 10:15:24 +0100 Subject: [PATCH 15/69] nixos/testdriver: sort imports --- nixos/lib/test-driver/test-driver.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 7a0eb264bef..a39bcd1dd30 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -1,17 +1,13 @@ #! /somewhere/python3 -from contextlib import contextmanager -from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List -import queue -import io -import _thread import argparse import atexit import base64 +import io +import logging import os import pathlib -import logging -import ptpython.repl import pty +import queue import re import shlex import shutil @@ -19,7 +15,12 @@ import socket import subprocess import sys import tempfile +import _thread import time +from contextlib import contextmanager +from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple + +import ptpython.repl CHAR_TO_KEY = { "A": "shift-a", From e21e5a94839383e542f2e4b5629e9087658e0984 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sun, 23 Aug 2020 13:17:53 +0300 Subject: [PATCH 16/69] nixos/security/misc: add option unprivilegedUsernsClone --- nixos/modules/profiles/hardened.nix | 5 ++++- nixos/modules/security/misc.nix | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/nixos/modules/profiles/hardened.nix b/nixos/modules/profiles/hardened.nix index ef8c0d74f06..7bff79e8273 100644 --- a/nixos/modules/profiles/hardened.nix +++ b/nixos/modules/profiles/hardened.nix @@ -1,7 +1,7 @@ # A profile with most (vanilla) hardening options enabled by default, # potentially at the cost of features and performance. -{ lib, pkgs, ... }: +{ config, lib, pkgs, ... }: with lib; @@ -27,6 +27,9 @@ with lib; security.forcePageTableIsolation = mkDefault true; + # This is required by podman to run containers in rootless mode. + security.unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable; + security.virtualisation.flushL1DataCache = mkDefault "always"; security.apparmor.enable = mkDefault true; diff --git a/nixos/modules/security/misc.nix b/nixos/modules/security/misc.nix index 16e3bfb1419..d51dbbb77f7 100644 --- a/nixos/modules/security/misc.nix +++ b/nixos/modules/security/misc.nix @@ -27,6 +27,16 @@ with lib; ''; }; + security.unprivilegedUsernsClone = mkOption { + type = types.bool; + default = false; + description = '' + When disabled, unprivileged users will not be able to create new namespaces. + By default unprivileged user namespaces are disabled. + This option only works in a hardened profile. + ''; + }; + security.protectKernelImage = mkOption { type = types.bool; default = false; @@ -115,6 +125,10 @@ with lib; ]; }) + (mkIf config.security.unprivilegedUsernsClone { + boot.kernel.sysctl."kernel.unprivileged_userns_clone" = mkDefault true; + }) + (mkIf config.security.protectKernelImage { # Disable hibernation (allows replacing the running kernel) boot.kernelParams = [ "nohibernate" ]; From 87214dbd10bea1877b6146520002c22b63c268b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 25 Aug 2020 14:50:47 +0100 Subject: [PATCH 17/69] nixos/test-driver: re-introduce log() Appearantly this is used in tests --- nixos/lib/test-driver/test-driver.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index a39bcd1dd30..99c6eb06de3 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -320,6 +320,9 @@ class Machine: + "'{}' but it is in state ‘{}’".format(require_state, state) ) + def log(self, message: str) -> None: + self.logger.info(message) + def execute(self, command: str) -> Tuple[int, str]: self.connect() From 8fd02cfde5c9eeee40fae967a216d38dcce1ee0c Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Tue, 25 Aug 2020 14:39:45 -0300 Subject: [PATCH 18/69] tty-solitaire: init at 1.3.0 --- .../misc/tty-solitaire/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/applications/misc/tty-solitaire/default.nix diff --git a/pkgs/applications/misc/tty-solitaire/default.nix b/pkgs/applications/misc/tty-solitaire/default.nix new file mode 100644 index 00000000000..00e6efb713e --- /dev/null +++ b/pkgs/applications/misc/tty-solitaire/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchFromGitHub, ncurses }: + +stdenv.mkDerivation rec { + pname = "tty-solitaire"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "mpereira"; + repo = pname; + rev = "v${version}"; + sha256 = "0kix7wfy2bda8cw5kfm7bm5acd5fqmdl9g52ms9bza4kf2jnb754"; + }; + + buildInputs = [ ncurses ]; + + patchPhase = "sed -i -e '/^CFLAGS *?= *-g *$/d' Makefile"; + + makeFlags = [ "CC=cc" "PREFIX=${placeholder "out"}" ]; + + meta = with stdenv.lib; { + description = "Klondike Solitaire in your ncurses terminal"; + license = licenses.mit; + homepage = "https://github.com/mpereira/tty-solitaire"; + platforms = ncurses.meta.platforms; + maintainers = [ maintainers.AndersonTorres ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ee91ac59ab..6d19f1476c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23136,6 +23136,8 @@ in terminus = callPackage ../applications/misc/terminus { }; + tty-solitaire = callPackage ../applications/misc/tty-solitaire { }; + lxterminal = callPackage ../applications/misc/lxterminal { }; aminal = callPackage ../applications/misc/aminal { From a4701ba18d312c148acd0a82b89a566e21265021 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 25 Aug 2020 20:13:27 +0000 Subject: [PATCH 19/69] fasm: 1.73.24 -> 1.73.25 --- pkgs/development/compilers/fasm/bin.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/fasm/bin.nix b/pkgs/development/compilers/fasm/bin.nix index c595c86615b..8013b443162 100644 --- a/pkgs/development/compilers/fasm/bin.nix +++ b/pkgs/development/compilers/fasm/bin.nix @@ -3,11 +3,11 @@ stdenvNoCC.mkDerivation rec { pname = "fasm-bin"; - version = "1.73.24"; + version = "1.73.25"; src = fetchurl { url = "https://flatassembler.net/fasm-${version}.tgz"; - sha256 = "142vxhs8mh8isvlzq7ir0asmqda410phzxmk9gk9b43dldskkj7k"; + sha256 = "0k3h61mfwslyb34kf4dnapfwl8jxlmrp4dv666wc057hkj047knn"; }; installPhase = '' From 4252ba90f4e8628607c9f3f3aa52e121bca87532 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 22:31:42 +0200 Subject: [PATCH 20/69] chromium: 84.0.4147.135 -> 85.0.4183.83 https://chromereleases.googleblog.com/2020/08/stable-channel-update-for-desktop_25.html This update includes 20 security fixes. CVEs: CVE-2020-6558 CVE-2020-6559 CVE-2020-6560 CVE-2020-6561 CVE-2020-6562 CVE-2020-6563 CVE-2020-6564 CVE-2020-6565 CVE-2020-6566 CVE-2020-6567 CVE-2020-6568 CVE-2020-6569 CVE-2020-6570 CVE-2020-6571 --- .../browsers/chromium/upstream-info.nix | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.nix b/pkgs/applications/networking/browsers/chromium/upstream-info.nix index 14e9f306bf9..5639ff2b679 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.nix +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.nix @@ -1,18 +1,18 @@ # This file is autogenerated from update.sh in the same directory. { beta = { - sha256 = "0i7vd0w1swvxw46wiy1xrni02xa7yvccw4cp9v2dc2lm5r43dw5q"; - sha256bin64 = "0by3fgmd54zj5q5znazrl3vf42ik3rhirwy5815i7isqiq7bb6lq"; - version = "85.0.4183.69"; + sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10"; + sha256bin64 = "12nm7h70pbzwc5rc7kcwfwgjs0h8cdnys5wlfjkbq6irwb6m1lm6"; + version = "85.0.4183.83"; }; dev = { - sha256 = "1yasmx3alal3gygyjvvjk799z0b6p6nm7q10m0qyls2mpfvxpcyw"; - sha256bin64 = "0lp93z9qwdbjblmj0d514plk44hs0yqw1v7vr5mnrrx6l9gm0yg0"; - version = "86.0.4229.0"; + sha256 = "16yj47x580i8p88m88f5bcs85qmrfwmyp9na7yrnk0lnq06wbj4i"; + sha256bin64 = "0i81xcfdn65j2i4vfx52v4a9vlar8y9ykqdhshymqfz4qqqk37d1"; + version = "86.0.4238.0"; }; stable = { - sha256 = "1n4n95gllqmsrzxmcp9p4gz95gndq2v3vknfvm8p1qfhjqah0hfx"; - sha256bin64 = "1ak903wm8zq6pri88md2wdij3izr6kz9d4avyqnpmd68ch16vfnj"; - version = "84.0.4147.135"; + sha256 = "0fz781bxx1rnjwfix2dgzq5w1lg3x6a9vd9k49gh4z5q092slr10"; + sha256bin64 = "0fa3la2nvqr0w40j2qkbwnh36924fsp2ajsla6aky6hz08mq2q1g"; + version = "85.0.4183.83"; }; } From 25aed428aa9974615e628f842aaf4a0db926cdec Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 23:03:35 +0200 Subject: [PATCH 21/69] chromium: Make the gnChromium overrides depend on the version This is more robust than depending on the channel, though the version should only matter if the configuration phase fails. This also switches to the intended version for `chromium` which should be higher since M85 is in the stable channel. Thanks `@volth` for pointing this out. --- .../networking/browsers/chromium/default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 2429baba4b3..f4ddd755fa1 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -28,7 +28,7 @@ let callPackage = newScope chromium; - chromium = { + chromium = rec { inherit stdenv llvmPackages; upstream-info = (callPackage ./update.nix {}).getChannel channel; @@ -36,15 +36,6 @@ let mkChromiumDerivation = callPackage ./common.nix ({ inherit gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs cupsSupport pulseSupport useOzone; # TODO: Remove after we can update gn for the stable channel (backward incompatible changes): - gnChromium = gn.overrideAttrs (oldAttrs: { - version = "2020-03-23"; - src = fetchgit { - url = "https://gn.googlesource.com/gn"; - rev = "5ed3c9cc67b090d5e311e4bd2aba072173e82db9"; - sha256 = "00y2d35wvqmx9glaqhfb62wdgbfpwr77v0934nnvh9ks71vnsjqy"; - }; - }); - } // lib.optionalAttrs (channel == "beta") { gnChromium = gn.overrideAttrs (oldAttrs: { version = "2020-05-19"; src = fetchgit { @@ -53,7 +44,7 @@ let sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17"; }; }); - } // lib.optionalAttrs (channel == "dev") { + } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "86") { gnChromium = gn.overrideAttrs (oldAttrs: { version = "2020-07-20"; src = fetchgit { From b1b8caed568c8bf9ef42e3c446715d4a403de4c0 Mon Sep 17 00:00:00 2001 From: Johannes Arnold Date: Tue, 25 Aug 2020 23:29:31 +0200 Subject: [PATCH 22/69] octoprint: 1.4.0 -> 1.4.2 --- pkgs/applications/misc/octoprint/default.nix | 237 ++++++++++++------- 1 file changed, 147 insertions(+), 90 deletions(-) diff --git a/pkgs/applications/misc/octoprint/default.nix b/pkgs/applications/misc/octoprint/default.nix index 793ea927a01..4434bc6d113 100644 --- a/pkgs/applications/misc/octoprint/default.nix +++ b/pkgs/applications/misc/octoprint/default.nix @@ -1,114 +1,171 @@ -{ pkgs, stdenv, lib, fetchFromGitHub, python3 -# To include additional plugins, pass them here as an overlay. +{ pkgs +, stdenv +, lib +, fetchFromGitHub +, python3 + # To include additional plugins, pass them here as an overlay. , packageOverrides ? self: super: {} }: let mkOverride = attrname: version: sha256: - self: super: { - ${attrname} = super.${attrname}.overridePythonAttrs (oldAttrs: { + self: super: { + ${attrname} = super.${attrname}.overridePythonAttrs ( + oldAttrs: { inherit version; src = oldAttrs.src.override { inherit version sha256; }; - }); - }; + } + ); + }; py = python3.override { self = py; - packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ - (mkOverride "flask" "0.12.5" "fac2b9d443e49f7e7358a444a3db5950bdd0324674d92ba67f8f1f15f876b14f") - (mkOverride "flask_assets" "0.12" "0ivqsihk994rxw58vdgzrx4d77d7lpzjm4qxb38hjdgvi5xm4cb0") - (mkOverride "flaskbabel" "0.12.2" "11jwp8vvq1gnm31qh6ihy2h393hy18yn9yjp569g60r0wj1x2sii") - (mkOverride "flask_login" "0.4.1" "1v2j8zd558xfmgn3rfbw0xz4vizjcnk8kqw52q4f4d9ygfnc25f8") - (mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a") - (mkOverride "tornado" "4.5.3" "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d") - (mkOverride "psutil" "5.6.7" "ffad8eb2ac614518bbe3c0b8eb9dffdb3a8d2e3a7d5da51c5b974fb723a5c5aa") - (mkOverride "watchdog" "0.9.0" "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn") - (mkOverride "werkzeug" "0.16.1" "010zmhyfbp4d56c1rgalwi188imjlkv9g7rm25jrvify6xnqalxk") - (mkOverride "websocket_client" "0.56.0" "0fpxjyr74klnyis3yf6m54askl0h5dchxcwbfjsq92xng0455m8z") - (mkOverride "wrapt" "1.11.2" "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn") + packageOverrides = lib.foldr lib.composeExtensions (self: super: {}) ( + [ + # the following dependencies are non trivial to update since later versions introduce backwards incompatible + # changes that might affect plugins, or due to other observed problems + (mkOverride "markupsafe" "1.1.1" "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b") + (mkOverride "rsa" "4.0" "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487") + (mkOverride "markdown" "3.1.1" "2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a") + (mkOverride "tornado" "5.1.1" "4e5158d97583502a7e2739951553cbd88a72076f152b4b11b64b9a10c4c49409") + (mkOverride "unidecode" "0.04.21" "280a6ab88e1f2eb5af79edff450021a0d3f0448952847cd79677e55e58bad051") - # Octoprint holds back jinja2 to 2.8.1 due to breaking changes. - # This old version does not have updated test config for pytest 4, - # and pypi tarball doesn't contain tests dir anyways. - (self: super: { - jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec { - version = "2.8.1"; - src = oldAttrs.src.override { - inherit version; - sha256 = "14aqmhkc9rw5w0v311jhixdm6ym8vsm29dhyxyrjfqxljwx1yd1m"; - }; - doCheck = false; - }); + # Built-in dependency + ( + self: super: { + octoprint-filecheck = self.buildPythonPackage rec { + pname = "OctoPrint-FileCheck"; + version = "2020.08.07"; - httpretty = super.httpretty.overridePythonAttrs (oldAttrs: rec { - doCheck = false; - }); + src = fetchFromGitHub { + owner = "OctoPrint"; + repo = "OctoPrint-FileCheck"; + rev = version; + sha256 = "05ys05l5x7d2bkg3yqrga6m65v3g5fcnnzbfab7j9w2pzjdapx5b"; + }; + doCheck = false; + }; + } + ) - celery = super.celery.overridePythonAttrs (oldAttrs: rec { - doCheck = false; - }); - }) - (self: super: { - octoprint = self.buildPythonPackage rec { - pname = "OctoPrint"; - version = "1.4.0"; + # Built-in dependency + ( + self: super: { + octoprint-firmwarecheck = self.buildPythonPackage rec { + pname = "OctoPrint-FirmwareCheck"; + version = "2020.06.22"; - src = fetchFromGitHub { - owner = "foosel"; - repo = "OctoPrint"; - rev = version; - sha256 = "0387228544v28d69dcdg2zr5gp6qavkfr6dydpjgj5awxv3w25d5"; - }; + src = fetchFromGitHub { + owner = "OctoPrint"; + repo = "OctoPrint-FirmwareCheck"; + rev = version; + sha256 = "19y7hrgg9z8hl7cwqkvg8nc8bk0wwrsfvjd1wawy33wn60psqv1h"; + }; + doCheck = false; + }; + } + ) - propagatedBuildInputs = with super; [ - awesome-slugify flask flask_assets rsa requests pkginfo watchdog - semantic-version werkzeug flaskbabel tornado - psutil pyserial flask_login netaddr markdown - pylru pyyaml sarge feedparser netifaces click websocket_client - scandir chainmap future wrapt monotonic emoji jinja2 - frozendict cachelib sentry-sdk filetype markupsafe - ] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ]; + ( + self: super: { + octoprint = self.buildPythonPackage rec { + pname = "OctoPrint"; + version = "1.4.2"; - checkInputs = with super; [ pytestCheckHook mock ddt ]; + src = fetchFromGitHub { + owner = "OctoPrint"; + repo = "OctoPrint"; + rev = version; + sha256 = "1bblrjwkccy1ifw7lf55g3k9lq1sqzwd49vj8bfzj2w07a7qda62"; + }; - postPatch = let - ignoreVersionConstraints = [ - "sentry-sdk" - ]; - in '' - sed -r -i \ - ${lib.concatStringsSep "\n" (map (e: - ''-e 's@${e}[<>=]+.*@${e}",@g' \'' - ) ignoreVersionConstraints)} - setup.py - ''; + propagatedBuildInputs = with super; [ + octoprint-firmwarecheck + octoprint-filecheck + markupsafe + tornado + markdown + rsa + regex + flask + jinja2 + flask_login + flask-babel + flask_assets + werkzeug + itsdangerous + cachelib + pyyaml + pyserial + netaddr + watchdog + sarge + netifaces + pylru + pkginfo + requests + semantic-version + psutil + click + feedparser + future + websocket_client + wrapt + emoji + frozendict + sentry-sdk + filetype + unidecode + blinker + ] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ]; - dontUseSetuptoolsCheck = true; + checkInputs = with super; [ pytestCheckHook mock ddt ]; - preCheck = '' - export HOME=$(mktemp -d) - rm pytest.ini - ''; + postPatch = let + ignoreVersionConstraints = [ + "sentry-sdk" + ]; + in + '' + sed -r -i \ + ${lib.concatStringsSep "\n" ( + map ( + e: + ''-e 's@${e}[<>=]+.*@${e}",@g' \'' + ) ignoreVersionConstraints + )} + setup.py + ''; - disabledTests = [ - "test_check_setup" # Why should it be able to call pip? - ] ++ lib.optionals stdenv.isDarwin [ - "test_set_external_modification" - ]; + dontUseSetuptoolsCheck = true; - passthru.python = self.python; + preCheck = '' + export HOME=$(mktemp -d) + rm pytest.ini + ''; - meta = with stdenv.lib; { - homepage = "https://octoprint.org/"; - description = "The snappy web interface for your 3D printer"; - license = licenses.agpl3; - maintainers = with maintainers; [ abbradar gebner WhittlesJr ]; - }; - }; - }) - (import ./plugins.nix {inherit pkgs;}) - packageOverrides - ]); + disabledTests = [ + "test_check_setup" # Why should it be able to call pip? + ] ++ lib.optionals stdenv.isDarwin [ + "test_set_external_modification" + ]; + + passthru.python = self.python; + + meta = with stdenv.lib; { + homepage = "https://octoprint.org/"; + description = "The snappy web interface for your 3D printer"; + license = licenses.agpl3; + maintainers = with maintainers; [ abbradar gebner WhittlesJr ]; + }; + }; + } + ) + (import ./plugins.nix { inherit pkgs; }) + packageOverrides + ] + ); }; -in with py.pkgs; toPythonApplication octoprint +in + with py.pkgs; toPythonApplication octoprint From d35cb151534861162478079877818e71e6838ac1 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 24 Jun 2020 10:36:36 +1200 Subject: [PATCH 23/69] nixos/shadowsocks: support plugins --- .../services/networking/shadowsocks.nix | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/shadowsocks.nix b/nixos/modules/services/networking/shadowsocks.nix index af12db590f0..4fd988297f6 100644 --- a/nixos/modules/services/networking/shadowsocks.nix +++ b/nixos/modules/services/networking/shadowsocks.nix @@ -11,8 +11,13 @@ let method = cfg.encryptionMethod; mode = cfg.mode; user = "nobody"; - fast_open = true; - } // optionalAttrs (cfg.password != null) { password = cfg.password; }; + fast_open = cfg.fastOpen; + } // optionalAttrs (cfg.plugin != null) { + plugin = cfg.plugin; + plugin_opts = cfg.pluginOpts; + } // optionalAttrs (cfg.password != null) { + password = cfg.password; + }; configFile = pkgs.writeText "shadowsocks.json" (builtins.toJSON opts); @@ -74,6 +79,14 @@ in ''; }; + fastOpen = mkOption { + type = types.bool; + default = true; + description = '' + use TCP fast-open + ''; + }; + encryptionMethod = mkOption { type = types.str; default = "chacha20-ietf-poly1305"; @@ -82,6 +95,23 @@ in ''; }; + plugin = mkOption { + type = types.nullOr types.str; + default = null; + example = "\${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin"; + description = '' + SIP003 plugin for shadowsocks + ''; + }; + + pluginOpts = mkOption { + type = types.str; + default = ""; + example = "server;host=example.com"; + description = '' + Options to pass to the plugin if one was specified + ''; + }; }; }; @@ -99,7 +129,7 @@ in description = "shadowsocks-libev Daemon"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.shadowsocks-libev ] ++ optional (cfg.passwordFile != null) pkgs.jq; + path = [ pkgs.shadowsocks-libev cfg.plugin ] ++ optional (cfg.passwordFile != null) pkgs.jq; serviceConfig.PrivateTmp = true; script = '' ${optionalString (cfg.passwordFile != null) '' From ef6c9fbd6b18dbea1ea6548ac8cb1aa625420563 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 26 Aug 2020 13:38:16 +1200 Subject: [PATCH 24/69] maintainers: add hmenke --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fe06e428ff0..c6d59b621d0 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9468,4 +9468,14 @@ github = "yevhenshymotiuk"; githubId = 44244245; }; + hmenke = { + name = "Henri Menke"; + email = "henri@henrimenke.de"; + github = "hmenke"; + githubId = 1903556; + keys = [{ + longkeyid = "rsa4096/0xD65C9AFB4C224DA3"; + fingerprint = "F1C5 760E 45B9 9A44 72E9 6BFB D65C 9AFB 4C22 4DA3"; + }]; + }; } From 27f281bc50a81302a2c9dc8885fafa1ecd87f0e9 Mon Sep 17 00:00:00 2001 From: Henri Menke Date: Wed, 26 Aug 2020 13:39:43 +1200 Subject: [PATCH 25/69] nixos/shadowsocks: add test --- nixos/tests/all-tests.nix | 1 + nixos/tests/shadowsocks.nix | 80 +++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 nixos/tests/shadowsocks.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 7b8e1b2b56d..fe9b83fbe10 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -307,6 +307,7 @@ in sanoid = handleTest ./sanoid.nix {}; sddm = handleTest ./sddm.nix {}; service-runner = handleTest ./service-runner.nix {}; + shadowsocks = handleTest ./shadowsocks.nix {}; shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {}; shiori = handleTest ./shiori.nix {}; signal-desktop = handleTest ./signal-desktop.nix {}; diff --git a/nixos/tests/shadowsocks.nix b/nixos/tests/shadowsocks.nix new file mode 100644 index 00000000000..6cb288f7611 --- /dev/null +++ b/nixos/tests/shadowsocks.nix @@ -0,0 +1,80 @@ +import ./make-test-python.nix ({ pkgs, lib, ... }: { + name = "shadowsocks"; + meta = { + maintainers = with lib.maintainers; [ hmenke ]; + }; + + nodes = { + server = { + boot.kernel.sysctl."net.ipv4.ip_forward" = "1"; + networking.useDHCP = false; + networking.interfaces.eth1.ipv4.addresses = [ + { address = "192.168.0.1"; prefixLength = 24; } + ]; + networking.firewall.rejectPackets = true; + networking.firewall.allowedTCPPorts = [ 8488 ]; + networking.firewall.allowedUDPPorts = [ 8488 ]; + services.shadowsocks = { + enable = true; + encryptionMethod = "chacha20-ietf-poly1305"; + password = "pa$$w0rd"; + localAddress = [ "0.0.0.0" ]; + port = 8488; + fastOpen = false; + mode = "tcp_and_udp"; + plugin = "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin"; + pluginOpts = "server;host=nixos.org"; + }; + services.nginx = { + enable = true; + virtualHosts.server = { + locations."/".root = pkgs.writeTextDir "index.html" "It works!"; + }; + }; + }; + + client = { + networking.useDHCP = false; + networking.interfaces.eth1.ipv4.addresses = [ + { address = "192.168.0.2"; prefixLength = 24; } + ]; + systemd.services.shadowsocks-client = { + description = "connect to shadowsocks"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + path = with pkgs; [ + shadowsocks-libev + shadowsocks-v2ray-plugin + ]; + script = '' + exec ss-local \ + -s 192.168.0.1 \ + -p 8488 \ + -l 1080 \ + -k 'pa$$w0rd' \ + -m chacha20-ietf-poly1305 \ + -a nobody \ + --plugin "${pkgs.shadowsocks-v2ray-plugin}/bin/v2ray-plugin" \ + --plugin-opts "host=nixos.org" + ''; + }; + }; + }; + + testScript = '' + start_all() + + server.wait_for_unit("shadowsocks-libev.service") + client.wait_for_unit("shadowsocks-client.service") + + client.fail( + "${pkgs.curl}/bin/curl 192.168.0.1:80" + ) + + msg = client.succeed( + "${pkgs.curl}/bin/curl --socks5 localhost:1080 192.168.0.1:80" + ) + assert msg == "It works!", "Could not connect through shadowsocks" + ''; + } +) From d2cb83d72c3f6ab8fb8faccafb3bf98380522c0d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 04:52:10 +0000 Subject: [PATCH 26/69] k9s: 0.21.2 -> 0.21.7 --- pkgs/applications/networking/cluster/k9s/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/k9s/default.nix b/pkgs/applications/networking/cluster/k9s/default.nix index 1e700f2339c..3c793cc9ec3 100644 --- a/pkgs/applications/networking/cluster/k9s/default.nix +++ b/pkgs/applications/networking/cluster/k9s/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "k9s"; - version = "0.21.2"; + version = "0.21.7"; src = fetchFromGitHub { owner = "derailed"; repo = "k9s"; rev = "v${version}"; - sha256 = "06yjc4lrqr3y7428xkfcgfg3aal71r437ij2hqd2yjxsq8r7zvif"; + sha256 = "1rw1vzxfjzklzdpcxz7mplvlmggavaym260s7vzvbgvd1snf38cb"; }; buildFlagsArray = '' @@ -18,7 +18,7 @@ buildGoModule rec { -X github.com/derailed/k9s/cmd.commit=${src.rev} ''; - vendorSha256 = "1hmqvcvlffd8cpqcnn2f9mnyiwdhw8k46sl2p6rk16yrj06la9mr"; + vendorSha256 = "05rsbi40pihdh212d5zn6cchnkrqd6rsyl3vfsw77ksybwakrbf7"; doCheck = false; From a45fa65ff36f9cb360cc33fc7a208933aec552eb Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 05:16:50 +0000 Subject: [PATCH 27/69] istioctl: 1.6.7 -> 1.7.0 --- pkgs/applications/networking/cluster/istioctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/istioctl/default.nix b/pkgs/applications/networking/cluster/istioctl/default.nix index 59dd92a4d22..59be45bb536 100644 --- a/pkgs/applications/networking/cluster/istioctl/default.nix +++ b/pkgs/applications/networking/cluster/istioctl/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "istioctl"; - version = "1.6.7"; + version = "1.7.0"; src = fetchFromGitHub { owner = "istio"; repo = "istio"; rev = version; - sha256 = "0zqp78ilr39j4pyqyk8a0rc0dlmkgzdd2ksfjd7vyjns5mrrjfj7"; + sha256 = "0541j1wdhlbm2spl1w3m0hig7lqn05xk1xws8748wfzbr8wkir31"; }; - vendorSha256 = "0cc0lmjsxrn3f78k95wklf3yn5k7h8slwnwmssy1i1h0bkcg1bai"; + vendorSha256 = "0sz92nspfclqxnx0mf80jxqqwxanqsx9nl9hg7f9izks7jw544vx"; doCheck = false; From 25d7d4752f76b07dbdb14cd6c3e1a11decd1be11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 20 Aug 2020 20:08:48 +0200 Subject: [PATCH 28/69] intel-gmmlib: 20.2.3 -> 20.2.5 --- pkgs/development/libraries/intel-gmmlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/intel-gmmlib/default.nix b/pkgs/development/libraries/intel-gmmlib/default.nix index c1e2fa5a6f6..ac378a8e646 100644 --- a/pkgs/development/libraries/intel-gmmlib/default.nix +++ b/pkgs/development/libraries/intel-gmmlib/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "intel-gmmlib"; - version = "20.2.3"; + version = "20.2.5"; src = fetchFromGitHub { owner = "intel"; repo = "gmmlib"; rev = "${pname}-${version}"; - sha256 = "1gsjcsad70pxafhw0jhxdrnfqwv8ffp5sawbgylvc009jlzxh5l8"; + sha256 = "0jg3kc74iqmbclx77a6dp4h85va8wi210x4zf5jypiq35c57r8hh"; }; nativeBuildInputs = [ cmake ]; From e71aaab72a3bcf72691fddd62f04703e5a307b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 20 Aug 2020 20:09:11 +0200 Subject: [PATCH 29/69] intel-compute-runtime: 20.02.15268 -> 20.33.17675 --- .../linux/intel-compute-runtime/default.nix | 9 +++------ .../linux/intel-compute-runtime/etc-dir.patch | 15 --------------- 2 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch diff --git a/pkgs/os-specific/linux/intel-compute-runtime/default.nix b/pkgs/os-specific/linux/intel-compute-runtime/default.nix index 5a3a5bf7a4d..bba3549daf6 100644 --- a/pkgs/os-specific/linux/intel-compute-runtime/default.nix +++ b/pkgs/os-specific/linux/intel-compute-runtime/default.nix @@ -11,18 +11,15 @@ stdenv.mkDerivation rec { pname = "intel-compute-runtime"; - version = "20.02.15268"; + version = "20.33.17675"; src = fetchFromGitHub { owner = "intel"; repo = "compute-runtime"; rev = version; - sha256 = "138gi92w85bn6haw5x38k39pgiyvvzfhiwpvz6hqlx2j03n8cs2k"; + sha256 = "1ckzspf05skdrjh947gv96finxbv5dpgc84hppm5pdsp5q70iyxp"; }; - # Build script tries to write the ICD to /etc - patches = [ ./etc-dir.patch ]; - nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ intel-gmmlib intel-graphics-compiler libva ]; @@ -31,7 +28,7 @@ stdenv.mkDerivation rec { "-DSKIP_UNIT_TESTS=1" "-DIGC_DIR=${intel-graphics-compiler}" - "-DETC_DIR=${placeholder "out"}/etc" + "-DOCL_ICD_VENDORDIR=${placeholder "out"}/etc/OpenCL/vendors" # The install script assumes this path is relative to CMAKE_INSTALL_PREFIX "-DCMAKE_INSTALL_LIBDIR=lib" diff --git a/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch b/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch deleted file mode 100644 index d9a80ffa6f9..00000000000 --- a/pkgs/os-specific/linux/intel-compute-runtime/etc-dir.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/package.cmake b/package.cmake -index 24960d5..e9a21e7 100644 ---- a/package.cmake -+++ b/package.cmake -@@ -24,7 +24,9 @@ if(UNIX) - - get_os_release_info(os_name os_version) - -- if("${os_name}" STREQUAL "clear-linux-os") -+ if(DEFINED ETC_DIR) -+ set(_dir_etc ${ETC_DIR}) -+ elseif("${os_name}" STREQUAL "clear-linux-os") - # clear-linux-os distribution avoids /etc for distribution defaults. - set(_dir_etc "/usr/share/defaults/etc") - else() From 46184ba62f1365eda1f02d2c8c2b48289f960428 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 16 Aug 2020 03:02:33 +0000 Subject: [PATCH 30/69] poedit: 2.3.1 -> 2.4.1 --- pkgs/tools/text/poedit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/poedit/default.nix b/pkgs/tools/text/poedit/default.nix index ccd99a272b5..05241033c6a 100644 --- a/pkgs/tools/text/poedit/default.nix +++ b/pkgs/tools/text/poedit/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "poedit"; - version = "2.3.1"; + version = "2.4.1"; src = fetchurl { url = "https://github.com/vslavik/poedit/archive/v${version}-oss.tar.gz"; - sha256 = "04f9za35rwyr7mabk8f8izc0fgvc3sfx45v8dml1xmi634n174ds"; + sha256 = "0pvd903j2x3h9wh38fhlcn23d0jkjlqnfbdpbvnbhy6al1ngx72w"; }; nativeBuildInputs = [ autoconf automake asciidoc wrapGAppsHook From df2317a6e3bc49f8a31d1da5c9694e317820df01 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 1 Aug 2020 07:04:17 +0000 Subject: [PATCH 31/69] flexibee: 2020.2.1.2 -> 2020.2.3.1 --- pkgs/applications/office/flexibee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/flexibee/default.nix b/pkgs/applications/office/flexibee/default.nix index 452fc7aecdb..f33eb98a48b 100644 --- a/pkgs/applications/office/flexibee/default.nix +++ b/pkgs/applications/office/flexibee/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, makeWrapper, jre }: let - version = "2020.2.1.2"; + version = "2020.2.3.1"; majorVersion = builtins.substring 0 6 version; in @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz"; - sha256 = "1a382lwyscvl5gdax5vs0shzmbnhjgggrv0hcwid8kf2s98diw5n"; + sha256 = "05wzg7f6mzz7r6azzb8k2g5fakkqh6762y4q9qkmrzbixvxh4lz9"; }; nativeBuildInputs = [ makeWrapper ]; From 8593feb957b9d53602c505c861bcc6437a8adc1f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 1 Aug 2020 10:07:10 +0000 Subject: [PATCH 32/69] fswebcam: 20140113 -> 20200725 --- pkgs/os-specific/linux/fswebcam/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/fswebcam/default.nix b/pkgs/os-specific/linux/fswebcam/default.nix index 53a1bdbc4c7..fc1a2563382 100644 --- a/pkgs/os-specific/linux/fswebcam/default.nix +++ b/pkgs/os-specific/linux/fswebcam/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libv4l, gd }: stdenv.mkDerivation rec { - name = "fswebcam-20140113"; + name = "fswebcam-20200725"; src = fetchurl { url = "https://www.sanslogic.co.uk/fswebcam/files/${name}.tar.gz"; - sha256 = "3ee389f72a7737700d22e0c954720b1e3bbadc8a0daad6426c25489ba9dc3199"; + sha256 = "1dazsrcaw9s30zz3jpxamk9lkff5dkmflp1s0jjjvdbwa0k6k6ii"; }; buildInputs = From 8e6d8fe9f37a4565aa3c9bfe938003118c96e1f0 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 31 Jul 2020 05:18:07 +0000 Subject: [PATCH 33/69] node-problem-detector: 0.8.2 -> 0.8.3 --- .../networking/cluster/node-problem-detector/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/node-problem-detector/default.nix b/pkgs/applications/networking/cluster/node-problem-detector/default.nix index 48dabaac90e..3ff0e4b397c 100644 --- a/pkgs/applications/networking/cluster/node-problem-detector/default.nix +++ b/pkgs/applications/networking/cluster/node-problem-detector/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "node-problem-detector"; - version = "0.8.2"; + version = "0.8.3"; src = fetchFromGitHub { owner = "kubernetes"; repo = pname; rev = "v${version}"; - sha256 = "0cphlaf9k2va879jgqd6fzdgkscpwg29j1cpr677i3zj3hfgaw1g"; + sha256 = "1sga5l8bvqgm0j71yj3l1ykqvchxa7cg8pkfvjsrqlikgrfb54f3"; }; vendorSha256 = null; From 6f7bd51fc9552a6179ba0747d01b91b401fc9ea8 Mon Sep 17 00:00:00 2001 From: Raghav Sood Date: Wed, 26 Aug 2020 15:41:08 +0800 Subject: [PATCH 34/69] go-ethereum: 1.9.19 -> 1.9.20 --- pkgs/applications/blockchains/go-ethereum.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index f69489c7ffe..ab6033ee357 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "go-ethereum"; - version = "1.9.19"; + version = "1.9.20"; src = fetchFromGitHub { owner = "ethereum"; repo = pname; rev = "v${version}"; - sha256 = "08wf7qklk31dky2z0l2j9vbyr8721gkvy4dsc60afwrwihwd8lrp"; + sha256 = "031cbl8yqw5g5yrm5h1x8s5ckdw2xkym46009l579zvafn2vcnj7"; }; runVend = true; From f222501d3da1ad005f41978fc215e2e0b809b264 Mon Sep 17 00:00:00 2001 From: Raghav Sood Date: Wed, 26 Aug 2020 16:05:49 +0800 Subject: [PATCH 35/69] go-ethereum: Add RaghavSood to maintainers --- pkgs/applications/blockchains/go-ethereum.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index ab6033ee357..5c3f2207643 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -42,6 +42,6 @@ buildGoModule rec { homepage = "https://geth.ethereum.org/"; description = "Official golang implementation of the Ethereum protocol"; license = with licenses; [ lgpl3 gpl3 ]; - maintainers = with maintainers; [ adisbladis lionello xrelkd ]; + maintainers = with maintainers; [ adisbladis lionello xrelkd RaghavSood ]; }; } From 4a19316bfd4afdca35455f4a4c802630c13f1630 Mon Sep 17 00:00:00 2001 From: Yevhen Shymotyuk Date: Mon, 24 Aug 2020 10:58:42 +0300 Subject: [PATCH 36/69] python3Packages.pipx: init at 0.15.5.0 --- .../python-modules/pipx/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/pipx/default.nix diff --git a/pkgs/development/python-modules/pipx/default.nix b/pkgs/development/python-modules/pipx/default.nix new file mode 100644 index 00000000000..e39c791d9c4 --- /dev/null +++ b/pkgs/development/python-modules/pipx/default.nix @@ -0,0 +1,59 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, userpath +, argcomplete +, packaging +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pipx"; + version = "0.15.5.0"; + + disabled = pythonOlder "3.6"; + + # no tests in the pypi tarball, so we directly fetch from github + src = fetchFromGitHub { + owner = "pipxproject"; + repo = pname; + rev = version; + sha256 = "13z032i8r9f6d09hssvyjpxjacb4wgms5bh2i37da2ili9bh72m6"; + }; + + propagatedBuildInputs = [ userpath argcomplete packaging ]; + + # avoid inconclusive venv assertion, see https://github.com/pipxproject/pipx/pull/477 + # remove after PR is merged + postPatch = '' + substituteInPlace tests/helpers.py \ + --replace 'assert getattr(sys, "base_prefix", sys.prefix) != sys.prefix, "Tests require venv"' "" + ''; + + checkInputs = [ pytestCheckHook ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + # disable tests, which require internet connection + disabledTests = [ + "install" + "inject" + "ensure_null_pythonpath" + "missing_interpreter" + "cache" + "internet" + "runpip" + "upgrade" + ]; + + meta = with lib; { + description = + "Install and Run Python Applications in Isolated Environments"; + homepage = "https://github.com/pipxproject/pipx"; + license = licenses.mit; + maintainers = with maintainers; [ yevhenshymotiuk ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bde2da684f8..57bf95b4606 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5346,6 +5346,8 @@ in { pip = callPackage ../development/python-modules/pip { }; + pipx = callPackage ../development/python-modules/pipx { }; + pip-tools = callPackage ../development/python-modules/pip-tools { git = pkgs.gitMinimal; glibcLocales = pkgs.glibcLocales; From 62f394c31ce111afd1556f1f28e8d4b4c25bb311 Mon Sep 17 00:00:00 2001 From: ImExtends Date: Wed, 26 Aug 2020 11:26:53 +0200 Subject: [PATCH 37/69] adding extends to maintainer list --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fe06e428ff0..45cc79aa053 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2717,6 +2717,12 @@ githubId = 857308; name = "Joe Hermaszewski"; }; + extends = { + email = "sharosari@gmail.com"; + github = "ImExtends"; + githubId = 55919390; + name = "Vincent VILLIAUMEY"; + }; eyjhb = { email = "eyjhbb@gmail.com"; github = "eyJhb"; From 2820750f2d16e29b0296591f014eaf5c6594a859 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 09:34:13 +0000 Subject: [PATCH 38/69] lftp: 4.9.1 -> 4.9.2 --- pkgs/tools/networking/lftp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/lftp/default.nix b/pkgs/tools/networking/lftp/default.nix index 3bd61a0bd49..53568615a62 100644 --- a/pkgs/tools/networking/lftp/default.nix +++ b/pkgs/tools/networking/lftp/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "lftp"; - version = "4.9.1"; + version = "4.9.2"; src = fetchurl { urls = [ @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { "https://ftp.st.ryukoku.ac.jp/pub/network/ftp/lftp/${pname}-${version}.tar.xz" "https://lftp.yar.ru/ftp/${pname}-${version}.tar.xz" ]; - sha256 = "0jq2g8h1bx06ya9fsja748vwb2qrca4wsfrgi3fmaa8hznpgqsar"; + sha256 = "03b7y0h3mf4jfq5y8zw6hv9v44z3n6i8hc1iswax96y3z7sc85y5"; }; nativeBuildInputs = [ pkgconfig ]; From d8f5a66b0c7215120b4034e42b1c08ac4c54f761 Mon Sep 17 00:00:00 2001 From: ImExtends Date: Wed, 26 Aug 2020 11:35:00 +0200 Subject: [PATCH 39/69] Electron Player: init at 2.0.8 --- .../video/electronplayer/electronplayer.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/video/electronplayer/electronplayer.nix diff --git a/pkgs/applications/video/electronplayer/electronplayer.nix b/pkgs/applications/video/electronplayer/electronplayer.nix new file mode 100644 index 00000000000..577c85c6b27 --- /dev/null +++ b/pkgs/applications/video/electronplayer/electronplayer.nix @@ -0,0 +1,33 @@ +{ appimageTools, stdenv, fetchurl }: +let + pname = "electronplayer"; + version = "2.0.8"; + name = "${pname}-${version}"; + + #TODO: remove the -rc4 from the tag in the url when possible + src = fetchurl { + url = "https://github.com/oscartbeaumont/ElectronPlayer/releases/download/v${version}-rc4/${name}.AppImage"; + sha256 = "wAsmSFdbRPnYnDyWQSbtyj+GLJLN7ibksUE7cegfkhI="; + }; + + appimageContents = appimageTools.extractType2 { inherit name src; }; +in appimageTools.wrapType2 { + inherit name src; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + + install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun' 'Exec=ElectronPlayer' + cp -r ${appimageContents}/usr/share/icons $out/share + ''; + + meta = with stdenv.lib; { + description = "An electron based web video services player"; + homepage = "https://github.com/oscartbeaumont/ElectronPlayer"; + license = licenses.mit; + maintainers = with maintainers; [ extends ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 694516f80a2..5026259e1c7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1852,6 +1852,8 @@ in eksctl = callPackage ../tools/admin/eksctl { }; + electronplayer = callPackage ../applications/video/electronplayer/electronplayer.nix { }; + element-desktop = callPackage ../applications/networking/instant-messengers/element/element-desktop.nix { }; element-web = callPackage ../applications/networking/instant-messengers/element/element-web.nix { From c9dcac1b311c3f6fdc9136f4ba734d5c9f521f46 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 09:53:55 +0000 Subject: [PATCH 40/69] libmatroska: 1.6.1 -> 1.6.2 --- pkgs/development/libraries/libmatroska/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libmatroska/default.nix b/pkgs/development/libraries/libmatroska/default.nix index 16cdf416b24..5d065636a92 100644 --- a/pkgs/development/libraries/libmatroska/default.nix +++ b/pkgs/development/libraries/libmatroska/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "libmatroska"; - version = "1.6.1"; + version = "1.6.2"; src = fetchFromGitHub { owner = "Matroska-Org"; repo = "libmatroska"; rev = "release-${version}"; - sha256 = "1ws07ldcm5gy8z8p627vknqcb8iw1hxdby24g0xi6hbfy66p6qxs"; + sha256 = "0yhr9hhgljva1fx3b0r4s3wkkypdfgsysbl35a4g3krkbhaa9rsd"; }; nativeBuildInputs = [ cmake pkgconfig ]; From 4d43de37b26e5d887d9a1b20e2e0294a560b42b9 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 16 Aug 2020 10:10:20 +0200 Subject: [PATCH 41/69] nixos/nixpkgs.nix: Correct crossSystem default literal The default is null and the documentation should reflect that. --- nixos/modules/misc/nixpkgs.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index 4f5a9250eaa..25ac94b8e0f 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -178,8 +178,6 @@ in type = types.nullOr types.attrs; # TODO utilize lib.systems.parsedPlatform default = null; example = { system = "aarch64-linux"; config = "aarch64-unknown-linux-gnu"; }; - defaultText = literalExample - ''(import "''${nixos}/../lib").lib.systems.examples.aarch64-multiplatform''; description = '' Specifies the platform for which NixOS should be built. Specify this only if it is different from From 64a2de1fc0c16b1a5ff9afe8c85aeb4dcfa019bb Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 26 Aug 2020 22:03:45 +1000 Subject: [PATCH 42/69] .github/workflow/pending-{set,clear}: switch to curl --- .github/workflows/pending-clear.yml | 26 ++++++-------------------- .github/workflows/pending-set.yml | 26 ++++++-------------------- 2 files changed, 12 insertions(+), 40 deletions(-) diff --git a/.github/workflows/pending-clear.yml b/.github/workflows/pending-clear.yml index e9eb9395bc4..d06b1e2143f 100644 --- a/.github/workflows/pending-clear.yml +++ b/.github/workflows/pending-clear.yml @@ -12,24 +12,10 @@ jobs: if: github.repository_owner == 'NixOS' && github.event.check_suite.app.name == 'OfBorg' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GSU_VERSION: "0.5.0" - GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6" - GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download" run: | - curl -sSf -O -L -C - \ - "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ - if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then - echo "checksum mismatch" - exit 1 - fi - chmod +x github-status-updater_linux_amd64 && \ - ./github-status-updater_linux_amd64 \ - -action update_state \ - -token "$GITHUB_TOKEN" \ - -owner NixOS \ - -repo nixpkgs \ - -state success \ - -context "Wait for ofborg" \ - -description " " \ - -url " " \ - -ref "${{ github.event.check_suite.head_sha }}" + curl \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d '{"state": "success", "target_url": " ", "description": " ", "context": "Wait for ofborg"}' \ + "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.check_suite.head_sha }}" diff --git a/.github/workflows/pending-set.yml b/.github/workflows/pending-set.yml index 36104706b6f..f59ac9439ea 100644 --- a/.github/workflows/pending-set.yml +++ b/.github/workflows/pending-set.yml @@ -11,24 +11,10 @@ jobs: if: github.repository_owner == 'NixOS' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GSU_VERSION: "0.5.0" - GSU_HASH: "49df54dc0ed5eaa037400b66be8114bd62fa0af51ed36565f6203dc312711cc6" - GSU_URL: "https://github.com/cloudposse/github-status-updater/releases/download" run: | - curl -sSf -O -L -C - \ - "$GSU_URL/$GSU_VERSION/github-status-updater_linux_amd64" && \ - if [ "$(shasum -a 256 github-status-updater_linux_amd64 | cut -c1-64)" != "$GSU_HASH" ]; then - echo "checksum mismatch" - exit 1 - fi - chmod +x github-status-updater_linux_amd64 && \ - ./github-status-updater_linux_amd64 \ - -action update_state \ - -token "$GITHUB_TOKEN" \ - -owner NixOS \ - -repo nixpkgs \ - -state failure \ - -context "Wait for ofborg" \ - -description "This failed status will be cleared when ofborg finishes eval." \ - -url " " \ - -ref "${{ github.event.pull_request.head.sha }}" + curl \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token $GITHUB_TOKEN" \ + -d '{"state": "failure", "target_url": " ", "description": "This failed status will be cleared when ofborg finishes eval.", "context": "Wait for ofborg"}' \ + "https://api.github.com/repos/NixOS/nixpkgs/statuses/${{ github.event.pull_request.head.sha }}" From 4a8262149139a9dee25a63a2d2c2888ede7d73dd Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 14:30:46 +0200 Subject: [PATCH 43/69] llvm_11: Enable build-id when linking libLLVM shared libs This is used by mesa.drivers (still on LLVM 9) as a cache key. I've ported that change to LLVM 11 to test it and so that it doesn't get lost in future versions. Credit for the change goes to David McFarland. See #93946 for details. Co-Authored-By: David McFarland --- pkgs/development/compilers/llvm/11/llvm.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/llvm/11/llvm.nix b/pkgs/development/compilers/llvm/11/llvm.nix index 9cd0da4f4f9..f15a7d12b80 100644 --- a/pkgs/development/compilers/llvm/11/llvm.nix +++ b/pkgs/development/compilers/llvm/11/llvm.nix @@ -95,6 +95,9 @@ in stdenv.mkDerivation (rec { ln -sv $PWD/lib $out ''; + # E.g. mesa.drivers use the build-id as a cache key (see #93946): + LDFLAGS = optionalString enableSharedLibraries "-Wl,--build-id=sha1"; + cmakeFlags = with stdenv; [ "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}" "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc From 2213c464f6f7ce28078b829afda30cb007ff713a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 13:32:35 +0200 Subject: [PATCH 44/69] chromiumDev: Drop nix_plugin_paths_68.patch Ok, so I was about to update the patch (didn't apply anymore) when I also started looking at it's usage and realized that NIX_CHROMIUM_PLUGIN_PATH_ (and other substrings) only appears in the patch itself (i.e. it seemed like we don't need this patch anymore). Turns out that we have this patch since 2014 (1b84fbf0cac) and it was only ever used for NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE (and from the log it isn't clear if/when or how well that worked). But in 2019 that last usage got removed (545d58a1ef8) so we should be able to safely drop this patch now :) \o/ (I just wanted to note that as it seemed somewhat of a funny story :D But there is of course nothing wrong with it.) Git history (git log --oneline -S NIX_CHROMIUM_PLUGIN_PATH_): 7205bd64a38d73ff8c46a5bb9d4732da1a26ac02 ungoogled-chromium: init at 81.0.4044.92-2 545d58a1ef8abb5a493654a84b9d6a3ca87a7909 chromium: fix widevine cd3283f9218b70fdf39640ba1be6fa16e137c209 chromium: 67.0.3396.99 -> 68.0.3440.75 72d7b5ddb14a8b5903f01c7b40f216a0a6149fb8 chromium: fix nix_plugin_paths for 68+ 7a3a16dd8040e7ba675b50ca47d023ee61f087d3 chromium: Remove plugin paths patch for version 50 79d18eb6045b33e081fbce4b66374ea75dfeeb5f chromium: Update dev channel to v52.0.2743.10 c7a3645e7bfe8bd6db7d3d9a320c2f07ea582347 chromium: Remove stuff for versions <= v51 8b97ca270e84c38bb0fb1da829da318ed7dbda8a chromium: Update all channels to latest versions b9093f1c641846882fdced70269a4ee09c2c376b chromium: Updates, fixes #11492 471cdd15e2dd6ac1c20aa18e177e590d67de2c44 chromium: Update beta and dev channels. 5c6aa391fc480898fa80b34df4037e4ee8b2d8a6 chromium: Cleanup old patch and update stable af54ddf8b635e2897db64d775317e33a42c259e2 chromium: Drop plugin_paths patch for old versions. 6a8afa4bb35ee9cffb8e62f5a294adc781b9d348 chromium: Fix plugin_paths patch for version 44. 0aad4b7ee418a5a4a6aa0c2da8a590480a63562a chromium: Update all channels to latest versions. 1b84fbf0cacaa3999979602919c3ee8df7ae9c6d chromium: Allow env vars for passing plugin paths. --- pkgs/applications/networking/browsers/chromium/common.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index e538fb66bf9..45d5fc9e3f2 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -144,8 +144,9 @@ let ++ optional pulseSupport libpulseaudio ++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ]; - patches = [ + patches = optionals (versionRange "68" "86") [ ./patches/nix_plugin_paths_68.patch + ] ++ [ ./patches/remove-webp-include-69.patch ./patches/no-build-timestamps.patch ./patches/widevine-79.patch From bf0e13a322bbbd7f920d34f36974ab747d81ab89 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 13:52:36 +0200 Subject: [PATCH 45/69] chromiumDev: Drop the optional VA-API patches I didn't look into this yet but IIRC M86 will finally have a flag for Linux to enable VA-API. So we shouldn't need enable-video-acceleration-on-linux.patch anymore. But we likely need to update enable-vdpau-support-for-nvidia.patch when/before M86 hits the stable channel if we want to keep VDPAU support. --- pkgs/applications/networking/browsers/chromium/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index 45d5fc9e3f2..fc243f8b041 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -160,7 +160,7 @@ let # # ++ optionals (channel == "dev") [ ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) ] # ++ optional (versionRange "68" "72") ( githubPatch "" "0000000000000000000000000000000000000000000000000000000000000000" ) - ] ++ optionals (useVaapi) [ # Improvements for the VA-API build: + ] ++ optionals (useVaapi && versionRange "68" "86") [ # Improvements for the VA-API build: ./patches/enable-vdpau-support-for-nvidia.patch # https://aur.archlinux.org/cgit/aur.git/tree/vdpau-support.patch?h=chromium-vaapi ./patches/enable-video-acceleration-on-linux.patch # Can be controlled at runtime (i.e. without rebuilding Chromium) ]; From 8815c9e1866d656594bd2576c59d7a83183fbd4b Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 14:22:31 +0200 Subject: [PATCH 46/69] chromiumDev: Fix "patchShebangs ." Note: The following might also need to be updated: substituteStream(): WARNING: pattern '/usr/share/xcb' doesn't match anything in file 'ui/gfx/x/BUILD.gn' --- pkgs/applications/networking/browsers/chromium/common.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index fc243f8b041..7016887e99d 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -165,7 +165,13 @@ let ./patches/enable-video-acceleration-on-linux.patch # Can be controlled at runtime (i.e. without rebuilding Chromium) ]; - postPatch = '' + postPatch = optionalString (!versionRange "0" "86") '' + # Required for patchShebangs (unsupported interpreter directive, basename: invalid option -- '*', etc.): + substituteInPlace native_client/SConstruct \ + --replace "#! -*- python -*-" "" + substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \ + --replace "/usr/bin/env -S make -f" "/usr/bin/make -f" + '' + '' # We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \ --replace \ From db1afe3c375d8257c3c1001f377d08f31cc904fa Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 12:34:46 +0000 Subject: [PATCH 47/69] mediainfo-gui: 20.03 -> 20.08 --- pkgs/applications/misc/mediainfo-gui/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/mediainfo-gui/default.nix b/pkgs/applications/misc/mediainfo-gui/default.nix index d38113981aa..96833bb25d3 100644 --- a/pkgs/applications/misc/mediainfo-gui/default.nix +++ b/pkgs/applications/misc/mediainfo-gui/default.nix @@ -2,11 +2,11 @@ , desktop-file-utils, libSM, imagemagick }: stdenv.mkDerivation rec { - version = "20.03"; + version = "20.08"; pname = "mediainfo-gui"; src = fetchurl { url = "https://mediaarea.net/download/source/mediainfo/${version}/mediainfo_${version}.tar.xz"; - sha256 = "1f1shnycf0f1fwka9k9s250l228xjkg0k4k73h8bpld8msighgnw"; + sha256 = "1baf2dj5s3g1x4ssqli1b2r1203syk42m09zhp36qcinmfixv11l"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; From 1d8caa0db058c3ac5ad55db7bc353a56110a88f0 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 26 Aug 2020 06:24:21 -0700 Subject: [PATCH 48/69] gerrit: 3.2.2 -> 3.2.3 (#96304) --- pkgs/applications/version-management/gerrit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/gerrit/default.nix b/pkgs/applications/version-management/gerrit/default.nix index 6412a6da9a6..5b4808e87a6 100644 --- a/pkgs/applications/version-management/gerrit/default.nix +++ b/pkgs/applications/version-management/gerrit/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "gerrit"; - version = "3.2.2"; + version = "3.2.3"; src = fetchurl { url = "https://gerrit-releases.storage.googleapis.com/gerrit-${version}.war"; - sha256 = "08i6rb8hawj44gg57mbhwjjmfn7mc45racl8gjsyrcyb8jm6zj1s"; + sha256 = "0hdxbn5qqqjzpqfcydz33nc351zanxp0j2k0ivizx4dn40fnavd7"; }; buildCommand = '' From e3f6f9be0f6d6fce8d8699dc11e2f7b2da07b2c3 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 26 Aug 2020 15:24:02 +0200 Subject: [PATCH 49/69] poetry2nix: 1.11.0 -> 1.12.0 --- .../tools/poetry2nix/poetry2nix/default.nix | 21 ++- .../poetry2nix/poetry2nix/hooks/default.nix | 12 ++ .../poetry2nix/hooks/wheel-unpack-hook.sh | 18 +++ .../poetry2nix/poetry2nix/mk-poetry-dep.nix | 14 +- .../tools/poetry2nix/poetry2nix/overrides.nix | 125 ++++++++++++++++-- .../tools/poetry2nix/poetry2nix/pep425.nix | 2 +- .../poetry2nix/poetry2nix/shell-scripts.nix | 41 ++++++ 7 files changed, 216 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/tools/poetry2nix/poetry2nix/hooks/wheel-unpack-hook.sh create mode 100644 pkgs/development/tools/poetry2nix/poetry2nix/shell-scripts.nix diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix index 5fb646fae88..cca876ca1e6 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/default.nix @@ -24,7 +24,7 @@ in lib.makeScope pkgs.newScope (self: { # Poetry2nix version - version = "1.11.0"; + version = "1.12.0"; /* Returns an attrset { python, poetryPackages, pyProject, poetryLock } for the given pyproject/lockfile. @@ -114,7 +114,7 @@ lib.makeScope pkgs.newScope (self: { __toPluginAble = toPluginAble self; - inherit (hooks) pipBuildHook removePathDependenciesHook poetry2nixFixupHook; + inherit (hooks) pipBuildHook removePathDependenciesHook poetry2nixFixupHook wheelUnpackHook; } ) # Null out any filtered packages, we don't want python.pkgs from nixpkgs @@ -159,13 +159,28 @@ lib.makeScope pkgs.newScope (self: { } ); + inherit (py) pyProject; + + # Add executables from tool.poetry.scripts + scripts = pyProject.tool.poetry.scripts or { }; + hasScripts = scripts != { }; + scriptsPackage = import ./shell-scripts.nix { + inherit scripts lib; + inherit (py) python; + }; + + hasEditable = editablePackageSources != { }; editablePackage = import ./editable.nix { inherit pkgs lib poetryLib editablePackageSources; inherit (py) pyProject python; }; in - py.python.withPackages (_: py.poetryPackages ++ lib.optional (editablePackageSources != { }) editablePackage); + py.python.withPackages ( + _: py.poetryPackages + ++ lib.optional hasEditable editablePackage + ++ lib.optional hasScripts scriptsPackage + ); /* Creates a Python application from pyproject.toml and poetry.lock diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/hooks/default.nix b/pkgs/development/tools/poetry2nix/poetry2nix/hooks/default.nix index 001a3d09c6b..e248a5e2235 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/hooks/default.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/hooks/default.nix @@ -49,4 +49,16 @@ in } ./fixup-hook.sh ) { }; + # When the "wheel" package itself is a wheel the nixpkgs hook (which pulls in "wheel") leads to infinite recursion + # It doesn't _really_ depend on wheel though, it just copies the wheel. + wheelUnpackHook = callPackage + ({}: + makeSetupHook + { + name = "wheel-unpack-hook.sh"; + deps = [ ]; + } ./wheel-unpack-hook.sh + ) { }; + + } diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/hooks/wheel-unpack-hook.sh b/pkgs/development/tools/poetry2nix/poetry2nix/hooks/wheel-unpack-hook.sh new file mode 100644 index 00000000000..fca808a933b --- /dev/null +++ b/pkgs/development/tools/poetry2nix/poetry2nix/hooks/wheel-unpack-hook.sh @@ -0,0 +1,18 @@ +# Setup hook to use in case a wheel is fetched +echo "Sourcing wheel setup hook" + +wheelUnpackPhase(){ + echo "Executing wheelUnpackPhase" + runHook preUnpack + + mkdir -p dist + cp "$src" "dist/$(stripHash "$src")" + +# runHook postUnpack # Calls find...? + echo "Finished executing wheelUnpackPhase" +} + +if [ -z "${dontUseWheelUnpack-}" ] && [ -z "${unpackPhase-}" ]; then + echo "Using wheelUnpackPhase" + unpackPhase=wheelUnpackPhase +fi diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix index 6b784fd8fc5..2791d7dfcb4 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/mk-poetry-dep.nix @@ -47,10 +47,16 @@ pythonPackages.callPackage isGit = isSource && source.type == "git"; isLocal = isSource && source.type == "directory"; localDepPath = toPath source.url; - pyProject = poetryLib.readTOML (localDepPath + "/pyproject.toml"); - buildSystemPkgs = poetryLib.getBuildSystemPkgs { - inherit pythonPackages pyProject; - }; + + buildSystemPkgs = + let + pyProjectPath = localDepPath + "/pyproject.toml"; + pyProject = poetryLib.readTOML pyProjectPath; + in + if builtins.pathExists pyProjectPath then poetryLib.getBuildSystemPkgs { + inherit pythonPackages pyProject; + } else [ ]; + fileInfo = let isBdist = f: lib.strings.hasSuffix "whl" f.file; diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix index 202261ecdb9..d722ec71b9a 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix @@ -12,6 +12,40 @@ self: super: } ); + ansible = super.ansible.overridePythonAttrs ( + old: { + + prePatch = pkgs.python.pkgs.ansible.prePatch or ""; + + postInstall = pkgs.python.pkgs.ansible.postInstall or ""; + + # Inputs copied from nixpkgs as ansible doesn't specify it's dependencies + # in a correct manner. + propagatedBuildInputs = old.propagatedBuildInputs ++ [ + self.pycrypto + self.paramiko + self.jinja2 + self.pyyaml + self.httplib2 + self.six + self.netaddr + self.dnspython + self.jmespath + self.dopy + self.ncclient + ]; + } + ); + + ansible-lint = super.ansible-lint.overridePythonAttrs ( + old: { + buildInputs = old.buildInputs ++ [ self.setuptools-scm-git-archive ]; + preBuild = '' + export HOME=$(mktemp -d) + ''; + } + ); + astroid = super.astroid.overridePythonAttrs ( old: rec { buildInputs = old.buildInputs ++ [ self.pytest-runner ]; @@ -135,6 +169,15 @@ self: super: } ); + h3 = super.h3.overridePythonAttrs ( + old: { + preBuild = (old.preBuild or "") + '' + substituteInPlace h3/h3.py \ + --replace "'{}/{}'.format(_dirname, libh3_path)" '"${pkgs.h3}/lib/libh3${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}"' + ''; + } + ); + h5py = super.h5py.overridePythonAttrs ( old: if old.format != "wheel" then rec { @@ -324,6 +367,13 @@ self: super: pkgs.pkgconfig ]; + postPatch = '' + cat > setup.cfg <> $out/bin/${bin} + #!${python.interpreter} + import sys + import re + + # Insert "" to add CWD to import path + sys.path.insert(0, "") + + from ${module} import ${fn} + + if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', "", sys.argv[0]) + sys.exit(${fn}()) + EOF + chmod +x $out/bin/${bin} + ''; +in +python.pkgs.buildPythonPackage { + name = "poetry2nix-env-scripts"; + dontUnpack = true; + dontUseSetuptoolsBuild = true; + dontConfigure = true; + dontUseSetuptoolsCheck = true; + + installPhase = '' + mkdir -p $out/bin + ${lib.concatStringsSep "\n" (lib.mapAttrsToList mkScript scripts)} + ''; +} From ead6de5d3d71a935b0aa9d96d2c750296a79926f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20He=C3=9F?= Date: Wed, 26 Aug 2020 10:51:10 +0200 Subject: [PATCH 50/69] tests/postgresql-wal-receiver: Port to Python ... and remove some weirdnesses. - Port to Python - Drop the extra pkgs, config, system args - Drop all `with` - Don't override the standard PostgreSQL directory - Use pkgs and lib from the test runner Tested with: - postgresql_12 - postgresql_11 - postgresql_10 - postgresql_9_6 - postgresql_9_5 Closes #96347 cc @flokli --- nixos/tests/postgresql-wal-receiver.nix | 202 ++++++++++++------------ 1 file changed, 105 insertions(+), 97 deletions(-) diff --git a/nixos/tests/postgresql-wal-receiver.nix b/nixos/tests/postgresql-wal-receiver.nix index c50746aa838..3be95187fe2 100644 --- a/nixos/tests/postgresql-wal-receiver.nix +++ b/nixos/tests/postgresql-wal-receiver.nix @@ -1,103 +1,111 @@ -{ system ? builtins.currentSystem -, config ? { } -, pkgs ? import ../.. { inherit system config; } }: - -with import ../lib/testing.nix { inherit system pkgs; }; -with pkgs.lib; - let - makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: let + # Makes a test for a PostgreSQL package, given by name and looked up from `pkgs`. + makePostgresqlWalReceiverTest = postgresqlPackage: + { + name = postgresqlPackage; + value = + import ./make-test-python.nix ({ pkgs, lib, ... }: let - postgresqlDataDir = "/var/db/postgresql/test"; - replicationUser = "wal_receiver_user"; - replicationSlot = "wal_receiver_slot"; - replicationConn = "postgresql://${replicationUser}@localhost"; - baseBackupDir = "/tmp/pg_basebackup"; - walBackupDir = "/tmp/pg_wal"; - atLeast12 = versionAtLeast postgresqlPackage.version "12.0"; - restoreCommand = '' - restore_command = 'cp ${walBackupDir}/%f %p' - ''; - - recoveryFile = if atLeast12 - then pkgs.writeTextDir "recovery.signal" "" - else pkgs.writeTextDir "recovery.conf" "${restoreCommand}"; - - in makeTest { - name = "postgresql-wal-receiver-${subTestName}"; - meta.maintainers = with maintainers; [ pacien ]; - - machine = { ... }: { - # Needed because this test uses a non-default 'services.postgresql.dataDir'. - systemd.tmpfiles.rules = [ - "d /var/db/postgresql 0700 postgres postgres" - ]; - services.postgresql = { - package = postgresqlPackage; - enable = true; - dataDir = postgresqlDataDir; - extraConfig = '' - wal_level = archive # alias for replica on pg >= 9.6 - max_wal_senders = 10 - max_replication_slots = 10 - '' + optionalString atLeast12 '' - ${restoreCommand} - recovery_end_command = 'touch recovery.done' + pkg = pkgs."${postgresqlPackage}"; + postgresqlDataDir = "/var/lib/postgresql/${pkg.psqlSchema}"; + replicationUser = "wal_receiver_user"; + replicationSlot = "wal_receiver_slot"; + replicationConn = "postgresql://${replicationUser}@localhost"; + baseBackupDir = "/tmp/pg_basebackup"; + walBackupDir = "/tmp/pg_wal"; + atLeast12 = lib.versionAtLeast pkg.version "12.0"; + restoreCommand = '' + restore_command = 'cp ${walBackupDir}/%f %p' ''; - authentication = '' - host replication ${replicationUser} all trust - ''; - initialScript = pkgs.writeText "init.sql" '' - create user ${replicationUser} replication; - select * from pg_create_physical_replication_slot('${replicationSlot}'); - ''; - }; - services.postgresqlWalReceiver.receivers.main = { - inherit postgresqlPackage; - connection = replicationConn; - slot = replicationSlot; - directory = walBackupDir; - }; - # This is only to speedup test, it isn't time racing. Service is set to autorestart always, - # default 60sec is fine for real system, but is too much for a test - systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = mkForce 5; + recoveryFile = if atLeast12 + then pkgs.writeTextDir "recovery.signal" "" + else pkgs.writeTextDir "recovery.conf" "${restoreCommand}"; + + in { + name = "postgresql-wal-receiver-${postgresqlPackage}"; + meta.maintainers = with lib.maintainers; [ pacien ]; + + machine = { ... }: { + services.postgresql = { + package = pkg; + enable = true; + extraConfig = '' + wal_level = archive # alias for replica on pg >= 9.6 + max_wal_senders = 10 + max_replication_slots = 10 + '' + lib.optionalString atLeast12 '' + ${restoreCommand} + recovery_end_command = 'touch recovery.done' + ''; + authentication = '' + host replication ${replicationUser} all trust + ''; + initialScript = pkgs.writeText "init.sql" '' + create user ${replicationUser} replication; + select * from pg_create_physical_replication_slot('${replicationSlot}'); + ''; + }; + + services.postgresqlWalReceiver.receivers.main = { + postgresqlPackage = pkg; + connection = replicationConn; + slot = replicationSlot; + directory = walBackupDir; + }; + # This is only to speedup test, it isn't time racing. Service is set to autorestart always, + # default 60sec is fine for real system, but is too much for a test + systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = lib.mkForce 5; + }; + + testScript = '' + # make an initial base backup + machine.wait_for_unit("postgresql") + machine.wait_for_unit("postgresql-wal-receiver-main") + # WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other + # required only for 9.4 + machine.sleep(5) + machine.succeed( + "${pkg}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}" + ) + + # create a dummy table with 100 records + machine.succeed( + "sudo -u postgres psql --command='create table dummy as select * from generate_series(1, 100) as val;'" + ) + + # stop postgres and destroy data + machine.systemctl("stop postgresql") + machine.systemctl("stop postgresql-wal-receiver-main") + machine.succeed("rm -r ${postgresqlDataDir}/{base,global,pg_*}") + + # restore the base backup + machine.succeed( + "cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}" + ) + + # prepare WAL and recovery + machine.succeed("chmod a+rX -R ${walBackupDir}") + machine.execute( + "for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done" + ) # make use of partial segments too + machine.succeed( + "cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*" + ) + + # replay WAL + machine.systemctl("start postgresql") + machine.wait_for_file("${postgresqlDataDir}/recovery.done") + machine.systemctl("restart postgresql") + machine.wait_for_unit("postgresql") + + # check that our records have been restored + machine.succeed( + "test $(sudo -u postgres psql --pset='pager=off' --tuples-only --command='select count(distinct val) from dummy;') -eq 100" + ) + ''; + }); }; - testScript = '' - # make an initial base backup - $machine->waitForUnit('postgresql'); - $machine->waitForUnit('postgresql-wal-receiver-main'); - # WAL receiver healthchecks PG every 5 seconds, so let's be sure they have connected each other - # required only for 9.4 - $machine->sleep(5); - $machine->succeed('${postgresqlPackage}/bin/pg_basebackup --dbname=${replicationConn} --pgdata=${baseBackupDir}'); - - # create a dummy table with 100 records - $machine->succeed('sudo -u postgres psql --command="create table dummy as select * from generate_series(1, 100) as val;"'); - - # stop postgres and destroy data - $machine->systemctl('stop postgresql'); - $machine->systemctl('stop postgresql-wal-receiver-main'); - $machine->succeed('rm -r ${postgresqlDataDir}/{base,global,pg_*}'); - - # restore the base backup - $machine->succeed('cp -r ${baseBackupDir}/* ${postgresqlDataDir} && chown postgres:postgres -R ${postgresqlDataDir}'); - - # prepare WAL and recovery - $machine->succeed('chmod a+rX -R ${walBackupDir}'); - $machine->execute('for part in ${walBackupDir}/*.partial; do mv $part ''${part%%.*}; done'); # make use of partial segments too - $machine->succeed('cp ${recoveryFile}/* ${postgresqlDataDir}/ && chmod 666 ${postgresqlDataDir}/recovery*'); - - # replay WAL - $machine->systemctl('start postgresql'); - $machine->waitForFile('${postgresqlDataDir}/recovery.done'); - $machine->systemctl('restart postgresql'); - $machine->waitForUnit('postgresql'); - - # check that our records have been restored - $machine->succeed('test $(sudo -u postgres psql --pset="pager=off" --tuples-only --command="select count(distinct val) from dummy;") -eq 100'); - ''; - }; - -in mapAttrs makePostgresqlWalReceiverTest (import ../../pkgs/servers/sql/postgresql pkgs) +# Maps the generic function over all attributes of PostgreSQL packages +in builtins.listToAttrs (map makePostgresqlWalReceiverTest (builtins.attrNames (import ../../pkgs/servers/sql/postgresql { }))) From 2446a98e33590c6d096ce7ece305a186b89d5966 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 26 Aug 2020 17:23:27 +0200 Subject: [PATCH 51/69] libunibreak: fix wrong revision --- pkgs/development/libraries/libunibreak/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libunibreak/default.nix b/pkgs/development/libraries/libunibreak/default.nix index 8c6650df3cb..d30c84b52a2 100644 --- a/pkgs/development/libraries/libunibreak/default.nix +++ b/pkgs/development/libraries/libunibreak/default.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation rec { version = "4.3"; src = let - rev_version = stdenv.lib.replaceStrings ["-"] ["_"] version; + rev_version = stdenv.lib.replaceStrings ["."] ["_"] version; in fetchFromGitHub { owner = "adah1972"; repo = pname; From e02793de2fa7d993723424e1053961f9772653a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 26 Aug 2020 18:12:16 +0200 Subject: [PATCH 52/69] nixos installer tests: add a missing package Tested it locally fixes #96361 nix-build nixos/release-combined.nix -A nixos.tests.installer.lvm.x86_64-linux -Q --- nixos/tests/installer.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 50c6af485da..a1ee7646430 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -317,6 +317,7 @@ let texinfo unionfs-fuse xorg.lndir + (lvm2.override { udev = null; }) # for initrd (extra-utils) # add curl so that rather than seeing the test attempt to download # curl's tarball, we see what it's trying to download From b6fc6b38b7315af1431f375b3c68d8997e2ad49d Mon Sep 17 00:00:00 2001 From: Pamplemousse Date: Thu, 20 Aug 2020 10:14:44 -0700 Subject: [PATCH 53/69] python3Packages.pwntools: Allow to use any debugger Signed-off-by: Pamplemousse --- pkgs/development/python-modules/pwntools/default.nix | 9 ++++++++- pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pwntools/default.nix b/pkgs/development/python-modules/pwntools/default.nix index c7aae24f1dd..623140546e1 100644 --- a/pkgs/development/python-modules/pwntools/default.nix +++ b/pkgs/development/python-modules/pwntools/default.nix @@ -1,8 +1,10 @@ { stdenv , buildPythonPackage +, debugger , fetchPypi , isPy3k , Mako +, makeWrapper , packaging , pysocks , pygments @@ -58,10 +60,15 @@ buildPythonPackage rec { doCheck = false; # no setuptools tests for the package + postFixup = '' + mkdir -p "$out/bin" + makeWrapper "${debugger}/bin/${stdenv.lib.strings.getName debugger}" "$out/bin/pwntools-gdb" + ''; + meta = with stdenv.lib; { homepage = "http://pwntools.com"; description = "CTF framework and exploit development library"; license = licenses.mit; - maintainers = with maintainers; [ bennofs kristoff3r ]; + maintainers = with maintainers; [ bennofs kristoff3r pamplemousse ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be21cc88773..6eed8a8d532 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26948,6 +26948,8 @@ in pyload = callPackage ../applications/networking/pyload {}; + pwntools = with python3Packages; toPythonApplication pwntools; + uae = callPackage ../misc/emulators/uae { }; fsuae = callPackage ../misc/emulators/fs-uae { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 57bf95b4606..a47c2314cd1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7468,7 +7468,7 @@ in { packet-python = callPackage ../development/python-modules/packet-python { }; - pwntools = callPackage ../development/python-modules/pwntools { }; + pwntools = callPackage ../development/python-modules/pwntools { debugger = pkgs.gdb; }; ROPGadget = callPackage ../development/python-modules/ROPGadget { }; From 94e086071e23d35b2e9b9ab60af88823c80c94c6 Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Wed, 26 Aug 2020 16:33:53 +0300 Subject: [PATCH 54/69] vimPlugins: update --- pkgs/misc/vim-plugins/generated.nix | 196 ++++++++++++++-------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 0db9069b748..4cf12a63698 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -65,12 +65,12 @@ let ale = buildVimPluginFrom2Nix { pname = "ale"; - version = "2020-08-20"; + version = "2020-08-24"; src = fetchFromGitHub { owner = "dense-analysis"; repo = "ale"; - rev = "2b785688ead505dcbc1007374d3dca9914aa247a"; - sha256 = "1n91vm354fd45vvg4skvx7s9mpjpsk1l61n2x5ylqr8dlm7vgjkw"; + rev = "3e2abe3f25493af63af91a6013447e378e09f6ec"; + sha256 = "1lxcwvjxrr2wdz5rzai2wd96zxhxmf81jyd62pcqhr5l9jil9ry7"; }; meta.homepage = "https://github.com/dense-analysis/ale/"; }; @@ -401,12 +401,12 @@ let coc-eslint = buildVimPluginFrom2Nix { pname = "coc-eslint"; - version = "2020-05-21"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-eslint"; - rev = "eed42192dab175bbf249e21c18c85cbd5afdd92a"; - sha256 = "1a9csiyj7abksar917acfjgypmc28rcfsqga0p1550mjxvkjr2ia"; + rev = "ba4d02c324e3eb5d5f111fe510f623ef14ee340c"; + sha256 = "1badkyfa8zznwlb9a6kqxnyylcjb72rfjrzb48pvx2dr7s631x8g"; }; meta.homepage = "https://github.com/neoclide/coc-eslint/"; }; @@ -425,12 +425,12 @@ let coc-fzf = buildVimPluginFrom2Nix { pname = "coc-fzf"; - version = "2020-08-20"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "antoinemadec"; repo = "coc-fzf"; - rev = "341ea7db0ab85a2ecb3a067ca721c1327fcd7013"; - sha256 = "0gqs6xdnmg33xraxqv10jl7dhaca19dlidmc86zdki2hg1bckr9b"; + rev = "606b437c4b6de1910c325eb631ee6b0f9bff8dd6"; + sha256 = "0a3vrimi87i6y6nc79smh2jiya2ciafxj0aifn6xhqnklj46isdh"; }; meta.homepage = "https://github.com/antoinemadec/coc-fzf/"; }; @@ -449,12 +449,12 @@ let coc-go = buildVimPluginFrom2Nix { pname = "coc-go"; - version = "2020-08-12"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "josa42"; repo = "coc-go"; - rev = "b068394634189ede2fb96b742cadcaa852bf46b0"; - sha256 = "099dgk3kc814hgnpd0jhc6sz3d7512i86i99n6hq6yswsg7n1d51"; + rev = "fbac3db20cc5e728b6f1c86bbb73414254c3dce3"; + sha256 = "1d9izf0ypnpbwg15kz3fd62gzz6c5h5568ydc7h5hxh4zj5qfg5h"; }; meta.homepage = "https://github.com/josa42/coc-go/"; }; @@ -557,12 +557,12 @@ let coc-metals = buildVimPluginFrom2Nix { pname = "coc-metals"; - version = "2020-08-19"; + version = "2020-08-21"; src = fetchFromGitHub { owner = "ckipp01"; repo = "coc-metals"; - rev = "14c820dad44b057e2b8343f7d8896529cd973ee6"; - sha256 = "0569by8x73dpb3hapbx73x9fg2wzzb965mkkifqgdq4wdg6wizkx"; + rev = "e2f5e3c2bc6a8226cea5a607585f6db554e15846"; + sha256 = "0kp8q5ds9b64acmkc006664460lfcahly65bx5x95rvy0wy8z5b1"; }; meta.homepage = "https://github.com/ckipp01/coc-metals/"; }; @@ -641,12 +641,12 @@ let coc-rust-analyzer = buildVimPluginFrom2Nix { pname = "coc-rust-analyzer"; - version = "2020-08-20"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "fannheyward"; repo = "coc-rust-analyzer"; - rev = "ac57b7b3cdaee3cfb56b76a8fc13444337f09276"; - sha256 = "0n26d63qifhnsrpwq8x587mh9y83rmayc2car222hjqbrg705r28"; + rev = "fff876cee397d0d696cba74907e33aadfba4d601"; + sha256 = "0318a19qbp3rpcgqwqshzhrpcbsqcskl993yjxmgmpjxh4r85kh2"; }; meta.homepage = "https://github.com/fannheyward/coc-rust-analyzer/"; }; @@ -749,24 +749,24 @@ let coc-tsserver = buildVimPluginFrom2Nix { pname = "coc-tsserver"; - version = "2020-08-20"; + version = "2020-08-21"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tsserver"; - rev = "e4f3ab555b35a0057d22dcc8bb7b7af7e43546d6"; - sha256 = "0i1fpvbl228jhh50fbz8cppv2v20zy0zywb1qgh9hsmw6pfgjg1w"; + rev = "516f2bd75afee70bb8668aa2ecbc00ebfd5984a0"; + sha256 = "1qdgm9w9d9n0aq5y77zlhxzjdilxky7n4ipl6y6gr2pirxw5idw5"; }; meta.homepage = "https://github.com/neoclide/coc-tsserver/"; }; coc-vetur = buildVimPluginFrom2Nix { pname = "coc-vetur"; - version = "2020-06-28"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-vetur"; - rev = "37c70071a93aeacf23ac651cd6e9f7ed11582033"; - sha256 = "037p3zkavfyh75wclibd2iwd1ds8kzi72q8zy7rwdchwxw57xwhj"; + rev = "217251dd0fe87d951e630e8fa9d4cde84da0ec91"; + sha256 = "13ni7j70pcz9w856hrgnbm0jsv7a22f1r42wnvif5lvhrcfw3y9d"; }; meta.homepage = "https://github.com/neoclide/coc-vetur/"; }; @@ -833,12 +833,12 @@ let coc-nvim = buildVimPluginFrom2Nix { pname = "coc-nvim"; - version = "2020-08-08"; + version = "2020-08-26"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc.nvim"; - rev = "806ce47583d66d0b574a3c993526033971e700cf"; - sha256 = "1v29l7jrp1n141q8lywas5jflbjid6rryym732ga41yjqkrmlvip"; + rev = "52c18cefd06879924a8469fc493af58fb3e7f1f4"; + sha256 = "1ddcmfy6mgmmqmj7a5v1dhz5z43wz2wfyzaxbg6hchb3j0h8dmc5"; }; meta.homepage = "https://github.com/neoclide/coc.nvim/"; }; @@ -882,12 +882,12 @@ let committia-vim = buildVimPluginFrom2Nix { pname = "committia-vim"; - version = "2020-05-14"; + version = "2020-08-26"; src = fetchFromGitHub { owner = "rhysd"; repo = "committia.vim"; - rev = "2cded48477a5e308c77a0d289cc9b540669b701f"; - sha256 = "1g6ykdh7d16q6nvpvmxx4ss8w7cisx5r8qmbrrvhpwmbb3894pxp"; + rev = "6c8e22b24283a4cc3f05339520e990af8e803915"; + sha256 = "05rjwn6fjwxd07c5imddkmxxpl8gq09iys385drrsvsqdx9f93vw"; }; meta.homepage = "https://github.com/rhysd/committia.vim/"; }; @@ -1280,12 +1280,12 @@ let deoplete-lsp = buildVimPluginFrom2Nix { pname = "deoplete-lsp"; - version = "2020-07-13"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete-lsp"; - rev = "ae0b7d023a33f0692652a21f532051e8718e1800"; - sha256 = "00008andpp08l6fm8qadp8ycm59s8gx2m1vskmzg3lw905fk0gra"; + rev = "4fd2507dd295d9c114febabb0c9cf31da87df008"; + sha256 = "1alwf8gjvgj5q3sbrqxrm0f2nbf6drk6dxqipk9pmvbj50iadyf1"; }; meta.homepage = "https://github.com/Shougo/deoplete-lsp/"; }; @@ -1364,12 +1364,12 @@ let deoplete-nvim = buildVimPluginFrom2Nix { pname = "deoplete-nvim"; - version = "2020-08-10"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "Shougo"; repo = "deoplete.nvim"; - rev = "ba3913cc52b457877836f7423b0929b770dda42b"; - sha256 = "16hn83ns278x9p280b0gpk4b4vhg50004bpnff7d3inf3x6pli4j"; + rev = "7ab4c1bde7f9bd8824219594b07e4c1aa0814d4e"; + sha256 = "13p59bxad46pxcihsns2vybjv8m6vhka9vbjvsvn6nwgck4rs1w3"; }; meta.homepage = "https://github.com/Shougo/deoplete.nvim/"; }; @@ -2592,12 +2592,12 @@ let neoformat = buildVimPluginFrom2Nix { pname = "neoformat"; - version = "2020-08-16"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "sbdchd"; repo = "neoformat"; - rev = "56a9d6259981d0d9c2b33a4d65ccbb674af70baa"; - sha256 = "0kn35l7kfqa0zvh1l8mdl3755hv1rx6xp5wjib9acsbk2czhg5nx"; + rev = "491d83c50c9b17c896850bbd7ec00f2019e2f110"; + sha256 = "0mj20dyf2hj9wr1df6rv7yn3mcb8z20bivclm8ircni2gi64bdb9"; }; meta.homepage = "https://github.com/sbdchd/neoformat/"; }; @@ -2832,12 +2832,12 @@ let nvim-gdb = buildVimPluginFrom2Nix { pname = "nvim-gdb"; - version = "2020-08-16"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "sakhnik"; repo = "nvim-gdb"; - rev = "47b0828287b410b56ff1a31906c4d5709d143d4a"; - sha256 = "0kl2d58plpnlz2w9haadmbpmkb04bjwgfrs1scwi04mcc8dfpbmn"; + rev = "004dc3cfa93fb56baeaed55291cf356dd1b18f9b"; + sha256 = "0x4r0s9rm2zk8rrvw2m1rfmagmy68d88bmxiqps2c3fb9zd1c7ny"; }; meta.homepage = "https://github.com/sakhnik/nvim-gdb/"; }; @@ -2880,12 +2880,12 @@ let nvim-treesitter = buildVimPluginFrom2Nix { pname = "nvim-treesitter"; - version = "2020-08-20"; + version = "2020-08-26"; src = fetchFromGitHub { owner = "nvim-treesitter"; repo = "nvim-treesitter"; - rev = "5c0ca925af3332769f04c122ecb5bb9a5ca36dd0"; - sha256 = "0fmciqdmg5fy1jx2wind0vyykfdvdbls0lyrn85xi4c7d8yg74h2"; + rev = "e8fa0d0b31954314528bb88de3b8357af75d21fd"; + sha256 = "0rczmzzcc82499bbbvz4bfpv8llkzz21hx7i2pz3471c2c97s3hn"; }; meta.homepage = "https://github.com/nvim-treesitter/nvim-treesitter/"; }; @@ -3577,12 +3577,12 @@ let syntastic = buildVimPluginFrom2Nix { pname = "syntastic"; - version = "2020-08-14"; + version = "2020-08-24"; src = fetchFromGitHub { owner = "vim-syntastic"; repo = "syntastic"; - rev = "25b816d9b0016eff68e7025fe52fb67ef253920e"; - sha256 = "1hb9f1p7sqpb7kc0rih9kaixwg4s9a6z86ycnc6kxp1iz97d6ai1"; + rev = "9041bc76b4084dda00933744c0dce4bdf43d15c7"; + sha256 = "076z5cs7gjl4hl92fzplabl0wq87hxzsgvmdna6vrzkh7ki2m3cb"; }; meta.homepage = "https://github.com/vim-syntastic/syntastic/"; }; @@ -3625,12 +3625,12 @@ let tagbar = buildVimPluginFrom2Nix { pname = "tagbar"; - version = "2020-08-17"; + version = "2020-08-26"; src = fetchFromGitHub { owner = "majutsushi"; repo = "tagbar"; - rev = "a81c01c29406df6aa59be221a17953c18ed57ccc"; - sha256 = "1amqxazfjnljylkj5jz3in927mkkhbvchs9pb5cnijfbvrf3dh5s"; + rev = "40413d8760146471757c69f08be68b24431f9474"; + sha256 = "1194kp8qzpjvv64lplb49n64ksyv5dbn25sng448b2fgd6wqk9ji"; }; meta.homepage = "https://github.com/majutsushi/tagbar/"; }; @@ -3661,12 +3661,12 @@ let tcomment_vim = buildVimPluginFrom2Nix { pname = "tcomment_vim"; - version = "2020-06-18"; + version = "2020-08-23"; src = fetchFromGitHub { owner = "tomtom"; repo = "tcomment_vim"; - rev = "920d465b56bcf96c976fa22e9558d51aa55dcd9c"; - sha256 = "0n7gwdyzim4f92mxnjz4zwfiyapyjhbf21b1l3dq9b07x9m40365"; + rev = "25bdb50a6c5934d4ac9313cef0d7d2168d84803b"; + sha256 = "04dmdydrc4v055qkjn5gfvibyzd30fg00abnk8ijvabfcmhvlh40"; }; meta.homepage = "https://github.com/tomtom/tcomment_vim/"; }; @@ -4142,24 +4142,24 @@ let vim-airline = buildVimPluginFrom2Nix { pname = "vim-airline"; - version = "2020-08-20"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline"; - rev = "ef4666bd86ea1d6ac06a709cde0cde3df537c9e3"; - sha256 = "0rql6vbfr78pnjpbavpkdh47bh4jlzcg5pjf7xcl0273v03b6rbf"; + rev = "5d3cfa40453fd8216be6ca68e9bd3846eed05176"; + sha256 = "150mdgmbyqp263rzmhp09a07547whalkbvzr9mi4jaq7paj21762"; }; meta.homepage = "https://github.com/vim-airline/vim-airline/"; }; vim-airline-themes = buildVimPluginFrom2Nix { pname = "vim-airline-themes"; - version = "2020-06-26"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline-themes"; - rev = "04fa4fc40f21d9490954213c1ee06c7fdea66a6d"; - sha256 = "0dzckj0449rw37v5kwmfm5wa9spfhsbfr56i30mb063zmv8wk551"; + rev = "fd855c601c3d53b68f3971e1191f84c728d4d651"; + sha256 = "07s45ck4001lxrzpxcvqsyqfg6j61js4131gxi150y7jb2wwyjjd"; }; meta.homepage = "https://github.com/vim-airline/vim-airline-themes/"; }; @@ -4238,12 +4238,12 @@ let vim-bazel = buildVimPluginFrom2Nix { pname = "vim-bazel"; - version = "2019-08-14"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "bazelbuild"; repo = "vim-bazel"; - rev = "7c4987b4266d117a9f1d4c7fe7f4dfba33dfc8c8"; - sha256 = "182w8ibr34z86nmx6byabkah0q9fgrzml8m2ardaqzqjqr2ya5yg"; + rev = "85a044d854e5e48f72414726c255112be31e2cac"; + sha256 = "1hcfbl958v39w00kyfg75rcxs9xzaqnd98i4y322ayqfgrhd95n8"; }; meta.homepage = "https://github.com/bazelbuild/vim-bazel/"; }; @@ -4922,12 +4922,12 @@ let vim-floaterm = buildVimPluginFrom2Nix { pname = "vim-floaterm"; - version = "2020-08-21"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "voldikss"; repo = "vim-floaterm"; - rev = "2de1b9bdea54baeb40bc6f3fe761309b4435d156"; - sha256 = "09m31j8cgd8pnyd4p2rh7bj74gh27df98cjy13diljaa56jd6grr"; + rev = "cc2ff0a07af75cd752afebbf3be62e6ebe234f2d"; + sha256 = "1q1jmbmx79ii5g991hcp6xd2nzcdqlv4m065vwc8hdpk3ghgc9d4"; }; meta.homepage = "https://github.com/voldikss/vim-floaterm/"; }; @@ -5306,12 +5306,12 @@ let vim-illuminate = buildVimPluginFrom2Nix { pname = "vim-illuminate"; - version = "2020-06-09"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "RRethy"; repo = "vim-illuminate"; - rev = "0778289e391c419f7a3af9de8229f798ee292013"; - sha256 = "1l5s5f4fw96w437rdf85lym7g75hnz8sb2fdj9hygyg0sp42r0cf"; + rev = "56e7df8f402a8302fa7f6cb21760d366a105d94c"; + sha256 = "0j4986pdh06q5d0bq4k6lq0b6bgi1fazng106ykhg3aaxjqqhs37"; }; meta.homepage = "https://github.com/RRethy/vim-illuminate/"; }; @@ -6159,12 +6159,12 @@ let vim-polyglot = buildVimPluginFrom2Nix { pname = "vim-polyglot"; - version = "2020-08-18"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "sheerun"; repo = "vim-polyglot"; - rev = "0df1bfa0c5f3efb6688566d5656a330034772037"; - sha256 = "1ba96gk3qs1d2zaxs24dk624z9b9ip7yx4vg0klasf4xq8s6kwjs"; + rev = "f0d6ecff07c88e7a406bc082d1ce98a5282b451c"; + sha256 = "1a8z7753a4g4zyi9dr24mkwhpi18r2wbnf9djjl4r4hr0hc7qcc1"; }; meta.homepage = "https://github.com/sheerun/vim-polyglot/"; }; @@ -6291,12 +6291,12 @@ let vim-quickrun = buildVimPluginFrom2Nix { pname = "vim-quickrun"; - version = "2020-07-25"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "thinca"; repo = "vim-quickrun"; - rev = "3f49e05fb6072d6b7bc7fe20d0356cf15ef3b9de"; - sha256 = "02kyp6l6m1nybfqx3d88yi34isrid355wiln6cskvxz2hpx532g8"; + rev = "c688f336a4aeb002319994f4fb4a8873f204f0ab"; + sha256 = "1wzcvshwn4gvjbcmni1r473001m5ipamggkcpwsa7xr74sj4rn73"; }; meta.homepage = "https://github.com/thinca/vim-quickrun/"; }; @@ -6327,12 +6327,12 @@ let vim-rails = buildVimPluginFrom2Nix { pname = "vim-rails"; - version = "2020-06-19"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-rails"; - rev = "187742a3c18d93e6968f024d7db0f4fc5548408e"; - sha256 = "132rvyn5pwg5xkm6q64k33vm6q9hfpng0wq25387l8l8a7hvj3az"; + rev = "858a379bcb389d67abdb7e0eb1b0a1fa78d8ba39"; + sha256 = "077jxka05w452g7vrlx1dly85ddqv8z8fh3xklq6dvz016x306m4"; }; meta.homepage = "https://github.com/tpope/vim-rails/"; }; @@ -6387,12 +6387,12 @@ let vim-ruby = buildVimPluginFrom2Nix { pname = "vim-ruby"; - version = "2020-08-03"; + version = "2020-08-22"; src = fetchFromGitHub { owner = "vim-ruby"; repo = "vim-ruby"; - rev = "fe2e520c62dfe10b9bc192b6c2651ef0519b1070"; - sha256 = "1xh6h5wg242mzqshka5m3693r25www46p29cr92yi995a2izm2fw"; + rev = "35dce70cdc2d7bf3c2031cc5eac2a47ddfb8c17b"; + sha256 = "0cc36cnqaz2q45287pfdkfxpb91dlhqi5a8kf8ghz61dny2xnv8r"; }; meta.homepage = "https://github.com/vim-ruby/vim-ruby/"; }; @@ -6844,12 +6844,12 @@ let vim-test = buildVimPluginFrom2Nix { pname = "vim-test"; - version = "2020-08-12"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "vim-test"; repo = "vim-test"; - rev = "edacfbe57fdbba4788e8c280d37606470b9b70ca"; - sha256 = "1bi2rsszdpv7vj1xk536lzm54dzk1z41hfp0qr1pzz9lv8fa4sgv"; + rev = "45c495d78143f73fc034781601ff44ca90e05687"; + sha256 = "0h3yjc5g8cklq988bilqjp8wv19yb16rmjphjhifa1c2fp23n7nk"; }; meta.homepage = "https://github.com/vim-test/vim-test/"; }; @@ -6928,12 +6928,12 @@ let vim-themis = buildVimPluginFrom2Nix { pname = "vim-themis"; - version = "2020-07-29"; + version = "2020-08-23"; src = fetchFromGitHub { owner = "thinca"; repo = "vim-themis"; - rev = "47bc9855d7c2b1452d8a0abda91bda35837f8552"; - sha256 = "083k1v9gmmmhmll61kywgd1cn1l2qkfk6sqjjkcv6az01rkrm521"; + rev = "51bec3386b661d28fda7736006475b8b2ebe343d"; + sha256 = "05988ila63kj1r62v7ii76972fgw2300h4dbaml81i643yw0p81p"; }; meta.homepage = "https://github.com/thinca/vim-themis/"; }; @@ -7120,12 +7120,12 @@ let vim-vsnip = buildVimPluginFrom2Nix { pname = "vim-vsnip"; - version = "2020-08-21"; + version = "2020-08-23"; src = fetchFromGitHub { owner = "hrsh7th"; repo = "vim-vsnip"; - rev = "bf0d6c142721d3c1e3ce1f35b205655657db13c9"; - sha256 = "1z90g90h0yc9xiwl4bwbq3nawks0rzsbxr1ryy07w3qjcg7kwrdp"; + rev = "28867f3dd99efdae7f56b18f6555fc78f30e043b"; + sha256 = "1av7cvpb8iqnpjbq1cg667k5yhgr8m4vkj6c030a82cy1j49m931"; }; meta.homepage = "https://github.com/hrsh7th/vim-vsnip/"; }; @@ -7376,8 +7376,8 @@ let src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "e14617591fcf59b638d25320215a80f437009119"; - sha256 = "10nlqbqfna5lvlk6rd4zsr5056vx2d22n6hm8sdpxp094nrqbdic"; + rev = "e27836fdf5b919ba8f4357abe16561ca4d0f60b1"; + sha256 = "1i5w7yijxa37jpn7k4whr3ri2d4nrmlrv94inanlpff006938fdd"; }; meta.homepage = "https://github.com/lervag/vimtex/"; }; @@ -7553,12 +7553,12 @@ let YouCompleteMe = buildVimPluginFrom2Nix { pname = "YouCompleteMe"; - version = "2020-08-05"; + version = "2020-08-25"; src = fetchFromGitHub { owner = "ycm-core"; repo = "YouCompleteMe"; - rev = "bcfd153813ac1f99947b706991eba2861f54a8a2"; - sha256 = "1mqgqzfx6v7ps8gk7qgs8mihb35i3q100m39sd8wl1ihgcsq3w1r"; + rev = "2afee9d9771cf53eec63ab854bcd491fe277109e"; + sha256 = "08dmzy789zg8s9m5gm4rlg9jrs9fv546x6lvziiamn70jbrfrrlg"; fetchSubmodules = true; }; meta.homepage = "https://github.com/ycm-core/YouCompleteMe/"; @@ -7590,12 +7590,12 @@ let zenburn = buildVimPluginFrom2Nix { pname = "zenburn"; - version = "2020-01-23"; + version = "2020-08-24"; src = fetchFromGitHub { owner = "jnurmine"; repo = "zenburn"; - rev = "ec6f369a000602e37e7c066b725f9d6bd12538f4"; - sha256 = "1ff5ac8lp7fq854kgf03c5h695lm60giw0qda5z428mmzwq0xask"; + rev = "de2cc6c93593938b9628e03eb424e318e5ec7959"; + sha256 = "17kvlbb49l3alqdd2bf6llvvhs0c9p75qn7i1kb1qavyipxi38a3"; }; meta.homepage = "https://github.com/jnurmine/zenburn/"; }; From 55c5ee95d0caaae1d57b9249a7c0265cf9b9577f Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Wed, 26 Aug 2020 16:34:17 +0300 Subject: [PATCH 55/69] vimPlugins.vim-lsp: init at 2020-08-24 --- pkgs/misc/vim-plugins/generated.nix | 12 ++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 13 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 4cf12a63698..cfb45ee4da7 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -5665,6 +5665,18 @@ let meta.homepage = "https://github.com/natebosch/vim-lsc/"; }; + vim-lsp = buildVimPluginFrom2Nix { + pname = "vim-lsp"; + version = "2020-08-24"; + src = fetchFromGitHub { + owner = "prabirshrestha"; + repo = "vim-lsp"; + rev = "69dc272277da464242bf729eb3b57ad79c5a0aed"; + sha256 = "0vxkfwdsfsfc91vjhdfbph2287hhr14jr5kzyblk5f1aldgr8901"; + }; + meta.homepage = "https://github.com/prabirshrestha/vim-lsp/"; + }; + vim-maktaba = buildVimPluginFrom2Nix { pname = "vim-maktaba"; version = "2020-08-06"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 6b521cadfc3..79b9012ab33 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -420,6 +420,7 @@ ponko2/deoplete-fish posva/vim-vue powerman/vim-plugin-AnsiEsc PProvost/vim-ps1 +prabirshrestha/vim-lsp preservim/nerdcommenter preservim/nerdtree psliwka/vim-smoothie From a1871050cc96e59773315bb78c24237d416897cf Mon Sep 17 00:00:00 2001 From: Justinas Stankevicius Date: Wed, 26 Aug 2020 16:44:54 +0300 Subject: [PATCH 56/69] vimPlugins.deoplete-vim-lsp: init at 2020-07-24 --- pkgs/misc/vim-plugins/generated.nix | 12 ++++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 13 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index cfb45ee4da7..f555e25dca2 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -1350,6 +1350,18 @@ let meta.homepage = "https://github.com/carlitux/deoplete-ternjs/"; }; + deoplete-vim-lsp = buildVimPluginFrom2Nix { + pname = "deoplete-vim-lsp"; + version = "2020-07-24"; + src = fetchFromGitHub { + owner = "lighttiger2505"; + repo = "deoplete-vim-lsp"; + rev = "2ea06074dc07c67ccffc24b976b92e17e9d795d1"; + sha256 = "03rpw1z5fgglba7vymi3ln810nh5x3x9hjqlm41shdik9pgmg867"; + }; + meta.homepage = "https://github.com/lighttiger2505/deoplete-vim-lsp/"; + }; + deoplete-zsh = buildVimPluginFrom2Nix { pname = "deoplete-zsh"; version = "2019-11-10"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 79b9012ab33..c8b3f9cfa90 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -249,6 +249,7 @@ lepture/vim-jinja lervag/vimtex lfilho/cosco.vim lifepillar/vim-mucomplete +lighttiger2505/deoplete-vim-lsp lilydjwg/colorizer liuchengxu/vim-clap liuchengxu/vim-which-key From 7f3a18d33b8159d2993484c7b35cf685bff7e4f9 Mon Sep 17 00:00:00 2001 From: V Date: Mon, 24 Aug 2020 17:14:31 +0200 Subject: [PATCH 57/69] featherpad: use qt5's mkDerivation --- pkgs/applications/editors/featherpad/default.nix | 12 ++++++------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/editors/featherpad/default.nix b/pkgs/applications/editors/featherpad/default.nix index c6089fd5308..8343472fa70 100644 --- a/pkgs/applications/editors/featherpad/default.nix +++ b/pkgs/applications/editors/featherpad/default.nix @@ -1,18 +1,18 @@ -{ stdenv, pkgconfig, qt5, fetchFromGitHub }: - -with qt5; - -stdenv.mkDerivation rec { - version = "0.10.0"; +{ stdenv, mkDerivation, pkgconfig, qmake, qttools, qtbase, qtsvg, qtx11extras, fetchFromGitHub }: +mkDerivation rec { pname = "featherpad"; + version = "0.10.0"; + src = fetchFromGitHub { owner = "tsujan"; repo = "FeatherPad"; rev = "V${version}"; sha256 = "1wrbs6kni9s3x39cckm9kzpglryxn5vyarilvh9pafbzpc6rc57p"; }; + nativeBuildInputs = [ qmake pkgconfig qttools ]; buildInputs = [ qtbase qtsvg qtx11extras ]; + meta = with stdenv.lib; { description = "Lightweight Qt5 Plain-Text Editor for Linux"; homepage = "https://github.com/tsujan/FeatherPad"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6eed8a8d532..216afec3be0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3555,7 +3555,7 @@ in fdtools = callPackage ../tools/misc/fdtools { }; - featherpad = callPackage ../applications/editors/featherpad {}; + featherpad = qt5.callPackage ../applications/editors/featherpad {}; feedreader = callPackage ../applications/networking/feedreaders/feedreader {}; From dc7912706e959646d82a97477f5ec637fbef4c27 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Thu, 20 Aug 2020 11:19:28 +0200 Subject: [PATCH 58/69] cmake-format: 0.6.11 -> 0.6.13 --- pkgs/development/tools/cmake-format/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/cmake-format/default.nix b/pkgs/development/tools/cmake-format/default.nix index b0e97de5500..0d9edebe19b 100644 --- a/pkgs/development/tools/cmake-format/default.nix +++ b/pkgs/development/tools/cmake-format/default.nix @@ -10,12 +10,15 @@ buildPythonApplication rec { pname = "cmake-format"; - version = "0.6.11"; + version = "0.6.13"; + # The source distribution does not build because of missing files. + format = "wheel"; src = fetchPypi { - inherit version; - pname = "cmake_format"; - sha256 = "1wvmv8242xjkxgr266dkn4vrn5wm94fwn333pn7sxm5warhhwgda"; + inherit version format; + python = "py3"; + pname = "cmakelang"; + sha256 = "0kmggnfbv6bba75l3zfzqwk0swi90brjka307m2kcz2w35kr8jvn"; }; propagatedBuildInputs = [ autopep8 flake8 jinja2 pylint pyyaml ]; From d0ad3119865b68a72236140598a8df8eb908a6cf Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:28:41 -0400 Subject: [PATCH 59/69] linux: 4.14.194 -> 4.14.195 --- pkgs/os-specific/linux/kernel/linux-4.14.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index 4807ff7dba4..04d121de307 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.14.194"; + version = "4.14.195"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1q7ssi2790bqjn8s8ra5ihma70hmxykahink7iq5h78738id191y"; + sha256 = "08d08la3h48fbdlr3h8zbvdghydx3x9cwb4yrnm0n93hhrwjhkrr"; }; } // (args.argsOverride or {})) From c49e127ce96af7d84f3378fc87559b53a4f909ef Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:28:55 -0400 Subject: [PATCH 60/69] linux: 4.19.141 -> 4.19.142 --- pkgs/os-specific/linux/kernel/linux-4.19.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix index e0c9c69061a..2eb697be684 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.19.141"; + version = "4.19.142"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "0511vb9rfpy5l6cz69v0v97rw2rk2pscc4hkz2pfmgikagm1shm4"; + sha256 = "19372sri4962dqf5rbr211lrfpckmj11kxsginfcwwid4hfdn4k9"; }; } // (args.argsOverride or {})) From 45b6f02faa87ce67cfde27be6fca6a06fd24dfc8 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:29:01 -0400 Subject: [PATCH 61/69] linux: 4.4.233 -> 4.4.234 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 033599900ff..0be1f1bef7b 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.233"; + version = "4.4.234"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1z77dikgkvkp9ggwxp07hl8vxsf9kq57rhfdpbvhny1x13fqkrlp"; + sha256 = "123354h05fip161rzlxc8h0cn5lh0d1gz06gc5b7zyz9i2lxv539"; }; } // (args.argsOverride or {})) From 214cfd9c45445f90d48378bf129078b6f26f983a Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:29:08 -0400 Subject: [PATCH 62/69] linux: 4.9.233 -> 4.9.234 --- pkgs/os-specific/linux/kernel/linux-4.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index c1da330e4ae..8ec9b8e51a3 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.233"; + version = "4.9.234"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "19dcwylhy5iqq3dmppqf7s9wy9d16m103djn1n183c9acnqclv9a"; + sha256 = "1qw26x2qc29yr094c7scw68m9yz4j0b2c4f92rvi3s31s928avvm"; }; } // (args.argsOverride or {})) From b5e903cedb331f9ee268ceebffb58069f1dae9fb Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:29:15 -0400 Subject: [PATCH 63/69] linux: 5.4.60 -> 5.4.61 --- pkgs/os-specific/linux/kernel/linux-5.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.4.nix b/pkgs/os-specific/linux/kernel/linux-5.4.nix index 1c903902b61..4c5d4bcd8e8 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.4.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.4.60"; + version = "5.4.61"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "08x2a78n23371k7l5p677mihnl58dpjh7r7bvyiwj3y4hlisplmd"; + sha256 = "197y2yb60m1k8i7mig4pa9wsrklfxq81ba3zfahwb2b31w2kvwc6"; }; } // (args.argsOverride or {})) From 82f405456093cb4e297ed35f815c91e04b0c3a03 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:29:23 -0400 Subject: [PATCH 64/69] linux: 5.7.17 -> 5.7.18 --- pkgs/os-specific/linux/kernel/linux-5.7.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.7.nix b/pkgs/os-specific/linux/kernel/linux-5.7.nix index 8583b3b1628..187bb0dd6bb 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.7.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.7.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.7.17"; + version = "5.7.18"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "09ajavdyvr0025rwvwfp9yv2z8q779nan1i6dck2kkdxr48kd36c"; + sha256 = "0p54icpxacrx8k09qam2hx22azh9xz9fzyif2z73qagk3syz5pd4"; }; } // (args.argsOverride or {})) From 1a94103f12166004259317c0bcd3de29ca3e532d Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 26 Aug 2020 13:29:31 -0400 Subject: [PATCH 65/69] linux: 5.8.3 -> 5.8.4 --- pkgs/os-specific/linux/kernel/linux-5.8.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.8.nix b/pkgs/os-specific/linux/kernel/linux-5.8.nix index 44ce98ce65e..5d545f184f3 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.8.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.8.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.8.3"; + version = "5.8.4"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0y8prifvkywqsx5lk80bh31m505vinmicpvdrirgg0c9scg7x8lf"; + sha256 = "15hyz92wsk6fxqr1rq0k77qw76jka2igpc9xviwa0j4a5qrr43fv"; }; } // (args.argsOverride or {})) From 2f5277d92eca0b19096255a67c65bd4864ae54c1 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Wed, 26 Aug 2020 21:57:28 +0200 Subject: [PATCH 66/69] nix-build-uncached: remove the nix wrap (#96357) Nix is one of those few things where it's actually better to use the version that is on the host. This avoids having to deal with Nix compatibility issues, and download a second version of Nix on hosts like GitHub Actions. --- pkgs/development/tools/misc/nix-build-uncached/default.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkgs/development/tools/misc/nix-build-uncached/default.nix b/pkgs/development/tools/misc/nix-build-uncached/default.nix index 9bff7acc81d..eca2dc96662 100644 --- a/pkgs/development/tools/misc/nix-build-uncached/default.nix +++ b/pkgs/development/tools/misc/nix-build-uncached/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub, nix, makeWrapper }: +{ lib, buildGoModule, fetchFromGitHub, makeWrapper }: buildGoModule rec { pname = "nix-build-uncached"; @@ -17,11 +17,6 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - postInstall = '' - wrapProgram $out/bin/nix-build-uncached \ - --prefix PATH ":" ${lib.makeBinPath [ nix ]} - ''; - meta = with lib; { description = "A CI friendly wrapper around nix-build"; license = licenses.mit; From 9a96d71f71681bd7addb1fd5e2fe879cbf0e1105 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 25 Aug 2020 23:28:00 +0200 Subject: [PATCH 67/69] chromiumDev: Unbreak the build by using LLVM 11 --- pkgs/applications/networking/browsers/chromium/browser.nix | 1 - pkgs/applications/networking/browsers/chromium/default.nix | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/browser.nix b/pkgs/applications/networking/browsers/chromium/browser.nix index 51e3fb032f2..7c0609730c2 100644 --- a/pkgs/applications/networking/browsers/chromium/browser.nix +++ b/pkgs/applications/networking/browsers/chromium/browser.nix @@ -90,6 +90,5 @@ mkChromiumDerivation (base: rec { platforms = platforms.linux; hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else []; timeout = 172800; # 48 hours - broken = channel == "dev"; # Requires LLVM 11 }; }) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index f4ddd755fa1..efaaefce65a 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -1,4 +1,4 @@ -{ newScope, config, stdenv, llvmPackages_9, llvmPackages_10 +{ newScope, config, stdenv, llvmPackages_10, llvmPackages_11 , makeWrapper, ed, gnugrep, coreutils , glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit , libva ? null @@ -45,6 +45,7 @@ let }; }); } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "86") { + llvmPackages = llvmPackages_11; gnChromium = gn.overrideAttrs (oldAttrs: { version = "2020-07-20"; src = fetchgit { From 5bd2c3719a5af1a4a8d430e5e33ba3092bdb9f7e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Aug 2020 12:52:58 +0200 Subject: [PATCH 68/69] python3Packages.google_api_python_client: 1.10.0 -> 1.10.1 --- .../python-modules/google-api-python-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix index 2a7f7629704..690f2abb659 100644 --- a/pkgs/development/python-modules/google-api-python-client/default.nix +++ b/pkgs/development/python-modules/google-api-python-client/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "google-api-python-client"; - version = "1.10.0"; + version = "1.10.1"; src = fetchPypi { inherit pname version; - sha256 = "01zzlr21rgl1skl7ayppp0qwn6s883i50xcvxs8jxzr4c5zz097s"; + sha256 = "0v4yzrmrp1l3nlkw9ibllgblwy8y45anzfkkky2vghkl6w8411xa"; }; # No tests included in archive From 0b8312660aaa34cc87bdf5e3776bcaf4c5ba3c59 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 26 Aug 2020 16:15:05 -0500 Subject: [PATCH 69/69] gcc10: fix building darwin->linux cross compiler same as 459c60dda2406d2207d2afd90f210ffc87efde54 but for gcc10 --- pkgs/development/compilers/gcc/10/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/gcc/10/default.nix b/pkgs/development/compilers/gcc/10/default.nix index ae723a14531..aa34798cc58 100644 --- a/pkgs/development/compilers/gcc/10/default.nix +++ b/pkgs/development/compilers/gcc/10/default.nix @@ -11,7 +11,7 @@ , enableLTO ? true , texinfo ? null , perl ? null # optional, for texi2pod (then pod2man) -, gmp, mpfr, libmpc, gettext, which +, gmp, mpfr, libmpc, gettext, which, patchelf , libelf # optional, for link-time optimizations (LTO) , isl ? null # optional, for the Graphite optimization framework. , zlib ? null @@ -151,11 +151,14 @@ stdenv.mkDerivation ({ # For building runtime libs depsBuildTarget = - if hostPlatform == buildPlatform then [ - targetPackages.stdenv.cc.bintools # newly-built gcc will be used - ] else assert targetPlatform == hostPlatform; [ # build != host == target - stdenv.cc - ]; + ( + if hostPlatform == buildPlatform then [ + targetPackages.stdenv.cc.bintools # newly-built gcc will be used + ] else assert targetPlatform == hostPlatform; [ # build != host == target + stdenv.cc + ] + ) + ++ optional targetPlatform.isLinux patchelf; buildInputs = [ gmp mpfr libmpc libelf