From 0202ad1ef92e385a5445092239ad1f1e1dc2cbf3 Mon Sep 17 00:00:00 2001 From: Matt Snider Date: Thu, 1 Oct 2020 23:25:28 +0200 Subject: [PATCH 01/25] jdt-language-server: init at 1.8.0 --- .../tools/jdt-language-server/default.nix | 103 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 105 insertions(+) create mode 100644 pkgs/development/tools/jdt-language-server/default.nix diff --git a/pkgs/development/tools/jdt-language-server/default.nix b/pkgs/development/tools/jdt-language-server/default.nix new file mode 100644 index 000000000000..e79d212c7d4a --- /dev/null +++ b/pkgs/development/tools/jdt-language-server/default.nix @@ -0,0 +1,103 @@ +{ lib +, stdenv +, fetchurl +, makeWrapper +, jdk +}: + +stdenv.mkDerivation rec { + pname = "jdt-language-server"; + version = "1.8.0"; + timestamp = "202201261434"; + + src = fetchurl { + url = "https://download.eclipse.org/jdtls/milestones/${version}/jdt-language-server-${version}-${timestamp}.tar.gz"; + sha256 = "0wlnsr72hncdqrbpgfl9hgwqw9d9rppq4iymnjmgfn51rjcqadv8"; + }; + + sourceRoot = "."; + + buildInputs = [ + jdk + ]; + + nativeBuildInputs = [ + makeWrapper + ]; + + installPhase = + let + # The application ships with config directories for linux and mac + configDir = if stdenv.isDarwin then "config_mac" else "config_linux"; + in + '' + # Copy jars + install -D -t $out/share/java/plugins/ plugins/*.jar + + # Copy config directories for linux and mac + install -Dm 444 -t $out/share/config ${configDir}/* + + # Get latest version of launcher jar + # e.g. org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar + launcher="$(ls $out/share/java/plugins/org.eclipse.equinox.launcher_* | sort -V | tail -n1)" + + # The wrapper script will create a directory in the user's cache, copy in the config + # files since this dir can't be read-only, and by default use this as the runtime dir. + # + # The following options are required as per the upstream documentation: + # + # -Declipse.application=org.eclipse.jdt.ls.core.id1 + # -Dosgi.bundles.defaultStartLevel=4 + # -Declipse.product=org.eclipse.jdt.ls.core.product + # -noverify + # --add-modules=ALL-SYSTEM + # --add-opens java.base/java.util=ALL-UNNAMED + # --add-opens java.base/java.lang=ALL-UNNAMED + # + # The following options configure the server to run without writing logs to the nix store: + # + # -Dosgi.sharedConfiguration.area.readOnly=true + # -Dosgi.checkConfiguration=true + # -Dosgi.configuration.cascaded=true + # -Dosgi.sharedConfiguration.area=$out/share/config + # + # Other options which the caller may change: + # + # -Dlog.level: + # Log level. + # This can be overidden by setting JAVA_OPTS. + # + # The caller must specify the following: + # + # -data: + # The application stores runtime data here. We set this to /$PWD + # so that projects don't collide with each other. + # This can be overidden by specifying -configuration to the wrapper. + # + # Java options, such as -Xms and Xmx can be specified by setting JAVA_OPTS. + # + makeWrapper ${jdk}/bin/java $out/bin/jdt-language-server \ + --add-flags "-Declipse.application=org.eclipse.jdt.ls.core.id1" \ + --add-flags "-Dosgi.bundles.defaultStartLevel=4" \ + --add-flags "-Declipse.product=org.eclipse.jdt.ls.core.product" \ + --add-flags "-Dosgi.sharedConfiguration.area=$out/share/config" \ + --add-flags "-Dosgi.sharedConfiguration.area.readOnly=true" \ + --add-flags "-Dosgi.checkConfiguration=true" \ + --add-flags "-Dosgi.configuration.cascaded=true" \ + --add-flags "-Dlog.level=ALL" \ + --add-flags "-noverify" \ + --add-flags "\$JAVA_OPTS" \ + --add-flags "-jar $launcher" \ + --add-flags "--add-modules=ALL-SYSTEM" \ + --add-flags "--add-opens java.base/java.util=ALL-UNNAMED" \ + --add-flags "--add-opens java.base/java.lang=ALL-UNNAMED" + ''; + + meta = with lib; { + homepage = "https://github.com/eclipse/eclipse.jdt.ls"; + description = "Java language server"; + license = licenses.epl20; + maintainers = with maintainers; [ matt-snider ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0fabdff4f250..0214c0089658 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20367,6 +20367,8 @@ in iwona = callPackage ../data/fonts/iwona { }; + jdt-language-server = callPackage ../development/tools/jdt-language-server {}; + jetbrains-mono = callPackage ../data/fonts/jetbrains-mono { }; jost = callPackage ../data/fonts/jost { }; From b7b2c002ed6b821d95f93ef3463313fc12175169 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 5 Apr 2022 05:59:36 +0000 Subject: [PATCH 02/25] moonlight-qt: 3.2.0 -> 4.0.0 --- pkgs/applications/misc/moonlight-qt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/moonlight-qt/default.nix b/pkgs/applications/misc/moonlight-qt/default.nix index c29813517496..c486b25c44cd 100644 --- a/pkgs/applications/misc/moonlight-qt/default.nix +++ b/pkgs/applications/misc/moonlight-qt/default.nix @@ -20,13 +20,13 @@ stdenv.mkDerivation rec { pname = "moonlight-qt"; - version = "3.2.0"; + version = "4.0.0"; src = fetchFromGitHub { owner = "moonlight-stream"; repo = pname; rev = "v${version}"; - sha256 = "sha256-nvVBjBcuHKSn66Q7iTzslGOCkH6zMFf62zx5dDXSosI="; + sha256 = "sha256-CfOphr8QILCZg+UrImp5JO/1DTqoan5EwiQeTKR15Fo="; fetchSubmodules = true; }; From c190b08bb7793004a4706e008a7d0f9b2be3df70 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Sat, 9 Apr 2022 01:05:35 +0100 Subject: [PATCH 03/25] lib: add callLocklessFlake This is essentially a copy of the function of the same name, from flake-compat. callLocklessFlake is useful when trying to utilise a flake.nix without a lock file, often for when you want to create a subflake from within a parent flake. Co-authored-by: Tom Bereknyei Co-authored-by: Robert Hensing --- lib/default.nix | 2 +- lib/trivial.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/default.nix b/lib/default.nix index 1f06283790a8..7d20acc67948 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -64,7 +64,7 @@ let hasAttr head isAttrs isBool isInt isList isString length lessThan listToAttrs pathExists readFile replaceStrings seq stringLength sub substring tail trace; - inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor + inherit (self.trivial) id callLocklessFlake const pipe concat or and bitAnd bitOr bitXor bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum info showWarnings nixpkgsVersion version isInOldestRelease diff --git a/lib/trivial.nix b/lib/trivial.nix index 18616a189c26..0b9b6bd910f0 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -13,6 +13,22 @@ rec { # The value to return x: x; + /* imports a flake.nix without acknowledging its lock file, useful for + referencing subflakes from a parent flake. The second argument allows + specifying the inputs of this flake. + + Example: + callLocklessFlake { + path = ./directoryContainingFlake; + inputs = { inherit nixpkgs; }; + } + */ + callLocklessFlake = { path, inputs ? {} }: let + self = {outPath = path;} // + ((import (path + "/flake.nix")).outputs (inputs // {self = self;})); + in + self; + /* The constant function Ignores the second argument. If called with only one argument, From cad8bbe58905a14651a469be78f89cad55ee7c15 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 12 Apr 2022 18:55:41 +0100 Subject: [PATCH 04/25] lib: init flakes.nix This commit creates flakes.nix, which is a library containing functions which relate to interacting with flakes. It also moves related functions from trivial.nix into it. --- lib/default.nix | 6 +++++- lib/flakes.nix | 22 ++++++++++++++++++++++ lib/trivial.nix | 16 ---------------- 3 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 lib/flakes.nix diff --git a/lib/default.nix b/lib/default.nix index 7d20acc67948..8d7cc20ae482 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -11,6 +11,9 @@ let callLibs = file: import file { lib = self; }; in { + # interacting with flakes + flakes = callLibs ./flakes.nix; + # often used, or depending on very little trivial = callLibs ./trivial.nix; fixedPoints = callLibs ./fixed-points.nix; @@ -59,12 +62,13 @@ let # linux kernel configuration kernel = callLibs ./kernel.nix; + inherit (self.flakes) callLocklessFlake; inherit (builtins) add addErrorContext attrNames concatLists deepSeq elem elemAt filter genericClosure genList getAttr hasAttr head isAttrs isBool isInt isList isString length lessThan listToAttrs pathExists readFile replaceStrings seq stringLength sub substring tail trace; - inherit (self.trivial) id callLocklessFlake const pipe concat or and bitAnd bitOr bitXor + inherit (self.trivial) id const pipe concat or and bitAnd bitOr bitXor bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum info showWarnings nixpkgsVersion version isInOldestRelease diff --git a/lib/flakes.nix b/lib/flakes.nix new file mode 100644 index 000000000000..4dc027b6c9b3 --- /dev/null +++ b/lib/flakes.nix @@ -0,0 +1,22 @@ +{ lib }: + +rec { + + /* imports a flake.nix without acknowledging its lock file, useful for + referencing subflakes from a parent flake. The second argument allows + specifying the inputs of this flake. + + Example: + callLocklessFlake { + path = ./directoryContainingFlake; + inputs = { inherit nixpkgs; }; + } + */ + callLocklessFlake = { path, inputs ? { } }: + let + self = { outPath = path; } // + ((import (path + "/flake.nix")).outputs (inputs // { self = self; })); + in + self; + +} diff --git a/lib/trivial.nix b/lib/trivial.nix index 0b9b6bd910f0..18616a189c26 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -13,22 +13,6 @@ rec { # The value to return x: x; - /* imports a flake.nix without acknowledging its lock file, useful for - referencing subflakes from a parent flake. The second argument allows - specifying the inputs of this flake. - - Example: - callLocklessFlake { - path = ./directoryContainingFlake; - inputs = { inherit nixpkgs; }; - } - */ - callLocklessFlake = { path, inputs ? {} }: let - self = {outPath = path;} // - ((import (path + "/flake.nix")).outputs (inputs // {self = self;})); - in - self; - /* The constant function Ignores the second argument. If called with only one argument, From cc052779fba0d9f0efa5980f42661798598b2ed1 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 12 Apr 2022 19:47:48 +0100 Subject: [PATCH 05/25] lib/tests: add test for callLocklessFlake --- lib/tests/misc.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index fcccf89cc888..9ca1d7ca50c7 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -22,6 +22,15 @@ in runTests { +# FLAKES + + testCallLocklessFlake = { + expr = callLocklessFlake { + path = ./..; + inputs = {}; + }; + expected = { lib = import ./..; outPath = ./..; }; + }; # TRIVIAL From ec59145c3b8d69bf1e270fdcfa651348880ad8e4 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 12 Apr 2022 20:38:55 +0100 Subject: [PATCH 06/25] lib/tests: use subflake to test callLocklessFlake --- lib/tests/flakes/subflakeTest/flake.nix | 8 ++++++++ lib/tests/flakes/subflakeTest/subflake/flake.nix | 5 +++++ lib/tests/misc.nix | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 lib/tests/flakes/subflakeTest/flake.nix create mode 100644 lib/tests/flakes/subflakeTest/subflake/flake.nix diff --git a/lib/tests/flakes/subflakeTest/flake.nix b/lib/tests/flakes/subflakeTest/flake.nix new file mode 100644 index 000000000000..3dca262cace6 --- /dev/null +++ b/lib/tests/flakes/subflakeTest/flake.nix @@ -0,0 +1,8 @@ +{ + inputs = { + subflake.url = "path:subflake"; + }; + outputs = { self, subflake }: { + x = subflake; + }; +} diff --git a/lib/tests/flakes/subflakeTest/subflake/flake.nix b/lib/tests/flakes/subflakeTest/subflake/flake.nix new file mode 100644 index 000000000000..9ae32d72ef6f --- /dev/null +++ b/lib/tests/flakes/subflakeTest/subflake/flake.nix @@ -0,0 +1,5 @@ +{ + outputs = { self }: { + y = 1; + }; +} diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 9ca1d7ca50c7..e11fe648cc92 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -26,10 +26,10 @@ runTests { testCallLocklessFlake = { expr = callLocklessFlake { - path = ./..; - inputs = {}; + path = ./flakes/subflakeTest; + inputs = { subflake = ./flakes/subflakeTest/subflake; }; }; - expected = { lib = import ./..; outPath = ./..; }; + expected = { x = ./flakes/subflakeTest/subflake; outPath = ./flakes/subflakeTest; }; }; # TRIVIAL From 3f128cc0247a95cfdcbb34a96c230422706b1715 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 12 Apr 2022 21:13:26 +0100 Subject: [PATCH 07/25] lib/tests: evaluate value from subflake with callLocklessFlake --- lib/tests/flakes/subflakeTest/flake.nix | 10 +++++----- lib/tests/flakes/subflakeTest/subflake/flake.nix | 2 +- lib/tests/misc.nix | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tests/flakes/subflakeTest/flake.nix b/lib/tests/flakes/subflakeTest/flake.nix index 3dca262cace6..3a8edd5e8c50 100644 --- a/lib/tests/flakes/subflakeTest/flake.nix +++ b/lib/tests/flakes/subflakeTest/flake.nix @@ -1,8 +1,8 @@ { - inputs = { - subflake.url = "path:subflake"; - }; - outputs = { self, subflake }: { - x = subflake; + outputs = { self, subflake, callLocklessFlake }: rec { + x = (callLocklessFlake { + path = subflake; + inputs = {}; + }).subflakeOutput; }; } diff --git a/lib/tests/flakes/subflakeTest/subflake/flake.nix b/lib/tests/flakes/subflakeTest/subflake/flake.nix index 9ae32d72ef6f..41566b52090c 100644 --- a/lib/tests/flakes/subflakeTest/subflake/flake.nix +++ b/lib/tests/flakes/subflakeTest/subflake/flake.nix @@ -1,5 +1,5 @@ { outputs = { self }: { - y = 1; + subflakeOutput = 1; }; } diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index e11fe648cc92..dcb56d0c1fc6 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -27,9 +27,9 @@ runTests { testCallLocklessFlake = { expr = callLocklessFlake { path = ./flakes/subflakeTest; - inputs = { subflake = ./flakes/subflakeTest/subflake; }; + inputs = { subflake = ./flakes/subflakeTest/subflake; inherit callLocklessFlake; }; }; - expected = { x = ./flakes/subflakeTest/subflake; outPath = ./flakes/subflakeTest; }; + expected = { x = 1; outPath = ./flakes/subflakeTest; }; }; # TRIVIAL From 752a0828229d2a6975bfbc7efafb921ee0569788 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 15 Apr 2022 04:35:28 +0000 Subject: [PATCH 08/25] python310Packages.tern: 2.9.1 -> 2.10.0 --- pkgs/development/python-modules/tern/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tern/default.nix b/pkgs/development/python-modules/tern/default.nix index 2e7aa7086291..c0bceca72b80 100644 --- a/pkgs/development/python-modules/tern/default.nix +++ b/pkgs/development/python-modules/tern/default.nix @@ -17,11 +17,11 @@ buildPythonPackage rec { pname = "tern"; - version = "2.9.1"; + version = "2.10.0"; src = fetchPypi { inherit pname version; - sha256 = "c7ce55a500061e1160b040e75dc38d0eccc790a2b70fa3b7ad1b4fb715c18fc9"; + sha256 = "sha256-KpkEnpItHC/9IswfboFZ5nCcGaM9bWFX/i+6jxGN5hg="; }; preBuild = '' From 2dfffd1700e6c482ca1a4e23e85afdc4e12f9ea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 30 Apr 2022 02:31:15 +0200 Subject: [PATCH 09/25] namecoin: fix version parsing for nix-env, reduce with lib usage --- pkgs/applications/blockchains/namecoin/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/blockchains/namecoin/default.nix b/pkgs/applications/blockchains/namecoin/default.nix index d5c739e00f4a..e9b9d1044107 100644 --- a/pkgs/applications/blockchains/namecoin/default.nix +++ b/pkgs/applications/blockchains/namecoin/default.nix @@ -1,15 +1,14 @@ { lib, stdenv, fetchFromGitHub, openssl, boost, libevent, autoreconfHook, db4, miniupnpc, eject, pkg-config, qt4, protobuf, qrencode, hexdump , withGui }: -with lib; stdenv.mkDerivation rec { - pname = "namecoin" + optionalString (!withGui) "d"; - version = "nc22.0"; + pname = "namecoin" + lib.optionalString (!withGui) "d"; + version = "22.0"; src = fetchFromGitHub { owner = "namecoin"; repo = "namecoin-core"; - rev = version; + rev = "nc${version}"; sha256 = "sha256-Z3CLDe0c4IpFPPTie8yoh0kcuvGmiegSgl4ITNSDkgY="; }; @@ -26,7 +25,7 @@ stdenv.mkDerivation rec { db4 miniupnpc eject - ] ++ optionals withGui [ + ] ++ lib.optionals withGui [ qt4 protobuf qrencode @@ -38,7 +37,7 @@ stdenv.mkDerivation rec { "--with-boost-libdir=${boost.out}/lib" ]; - meta = { + meta = with lib; { description = "Decentralized open source information registration and transfer system based on the Bitcoin cryptocurrency"; homepage = "https://namecoin.org"; license = licenses.mit; From ac0a7e8e053c405ae151ab62097f6588daabf531 Mon Sep 17 00:00:00 2001 From: squalus Date: Fri, 29 Apr 2022 19:13:14 -0700 Subject: [PATCH 10/25] proj: support cross compile Add a cmakeFlag to point to a sqlite3 binary that can be run at build time --- pkgs/development/libraries/proj/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/proj/default.nix b/pkgs/development/libraries/proj/default.nix index a8e42fb6fb17..a5a19dc9db2e 100644 --- a/pkgs/development/libraries/proj/default.nix +++ b/pkgs/development/libraries/proj/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , cmake , pkg-config +, buildPackages , sqlite , libtiff , curl @@ -33,6 +34,7 @@ stdenv.mkDerivation rec { "-DUSE_EXTERNAL_GTEST=ON" "-DRUN_NETWORK_DEPENDENT_TESTS=OFF" "-DNLOHMANN_JSON_ORIGIN=external" + "-DEXE_SQLITE3=${buildPackages.sqlite}/bin/sqlite3" ]; preCheck = From 2a4c1524c515e6081500026f9973df33f4a04ccf Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 30 Apr 2022 04:20:00 +0000 Subject: [PATCH 11/25] sqls: 0.2.20 -> 0.2.22 --- pkgs/applications/misc/sqls/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/sqls/default.nix b/pkgs/applications/misc/sqls/default.nix index 2c89d31df35a..6ac9275570a3 100644 --- a/pkgs/applications/misc/sqls/default.nix +++ b/pkgs/applications/misc/sqls/default.nix @@ -2,19 +2,21 @@ buildGoModule rec { pname = "sqls"; - version = "0.2.20"; + version = "0.2.22"; src = fetchFromGitHub { owner = "lighttiger2505"; repo = pname; rev = "v${version}"; - sha256 = "sha256-QYxiWxgzuD+JymlXlVmzZOtex70JC93VmWljAFQJMPQ="; + sha256 = "sha256-xtvm/NVL98dRzQL1id/WwT/NdsnB7qTRVR7jfrRsabY="; }; - vendorSha256 = "sha256-fo5g6anMcKqdzLG8KCJ/T4uTOp1Z5Du4EtCHYkLgUpo="; + vendorSha256 = "sha256-sowzyhvNr7Ek3ex4BP415HhHSKnqPHy5EbnECDVZOGw="; ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.revision=${src.rev}" ]; + doCheck = false; + meta = with lib; { homepage = "https://github.com/lighttiger2505/sqls"; description = "SQL language server written in Go"; From 5ca04535ec9aaa66397cb43eb1cfe460f39b6689 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 30 Apr 2022 04:20:00 +0000 Subject: [PATCH 12/25] redis: 6.2.6 -> 7.0.0 https://github.com/redis/redis/releases/tag/7.0.0 --- pkgs/servers/nosql/redis/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nosql/redis/default.nix b/pkgs/servers/nosql/redis/default.nix index f42acee87b51..a99523cfd703 100644 --- a/pkgs/servers/nosql/redis/default.nix +++ b/pkgs/servers/nosql/redis/default.nix @@ -7,11 +7,11 @@ stdenv.mkDerivation rec { pname = "redis"; - version = "6.2.6"; + version = "7.0.0"; src = fetchurl { url = "https://download.redis.io/releases/${pname}-${version}.tar.gz"; - sha256 = "1ariw5x33hmmm3d5al0j3307l5kf3vhmn78wpyaz67hia1x8nasv"; + sha256 = "sha256-KE2L0f2F1qVaBe5OfDHDGXetVsvzRO2DeQvusUi6pyA="; }; # Cross-compiling fixes @@ -56,6 +56,12 @@ stdenv.mkDerivation rec { substituteInPlace tests/integration/replication.tcl \ --replace 'foreach mdl {no yes}' 'foreach mdl {}' + substituteInPlace tests/support/server.tcl \ + --replace 'exec /usr/bin/env' 'exec env' + + sed -i '/^proc wait_load_handlers_disconnected/{n ; s/wait_for_condition 50 100/wait_for_condition 50 500/; }' \ + tests/support/util.tcl + ./runtest \ --no-latency \ --timeout 2000 \ From 9dce04dcfdb313103ce1d47013bedf93f7317279 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 30 Apr 2022 13:10:39 +0200 Subject: [PATCH 13/25] nifi: 1.16.0 -> 1.16.1 https://cwiki.apache.org/confluence/display/NIFI/Release+Notes#ReleaseNotes-Version1.16.1 Fixes Improper Restriction of XML External Entity References in Multiple Components. https://nifi.apache.org/security.html#CVE-2022-29265 Fixes: CVE-2022-29265 --- pkgs/servers/web-apps/nifi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/web-apps/nifi/default.nix b/pkgs/servers/web-apps/nifi/default.nix index f25c1931501e..b53b53aaf5c7 100644 --- a/pkgs/servers/web-apps/nifi/default.nix +++ b/pkgs/servers/web-apps/nifi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "nifi"; - version = "1.16.0"; + version = "1.16.1"; src = fetchurl { url = "https://dlcdn.apache.org/nifi/${version}/nifi-${version}-bin.tar.gz"; - sha256 = "sha256-BE990mVSocO+UuMa9kULJcbXbqiX8oquZQTQKSRPe4g="; + sha256 = "sha256-wC+oKq8QGEKuD6B22Ny92NK0z3SBKmRoTEit3vAXJQs="; }; nativeBuildInputs = [ makeWrapper ]; From 2397fb11140150d1836d5a93bb59871b0866e6c1 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 1 May 2022 04:20:00 +0000 Subject: [PATCH 14/25] racket: 8.4 -> 8.5 https://github.com/racket/racket/releases/tag/v8.5 --- pkgs/development/interpreters/racket/default.nix | 4 ++-- pkgs/development/interpreters/racket/minimal.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/racket/default.nix b/pkgs/development/interpreters/racket/default.nix index bd96562d9e5d..77dffd20595b 100644 --- a/pkgs/development/interpreters/racket/default.nix +++ b/pkgs/development/interpreters/racket/default.nix @@ -49,7 +49,7 @@ in stdenv.mkDerivation rec { pname = "racket"; - version = "8.4"; # always change at once with ./minimal.nix + version = "8.5"; # always change at once with ./minimal.nix src = (lib.makeOverridable ({ name, sha256 }: fetchurl { @@ -58,7 +58,7 @@ stdenv.mkDerivation rec { } )) { name = "${pname}-${version}"; - sha256 = "sha256-uJ+vL+FtBNILkFbwi7qZ6yBA1Rcr7o886zmZ/tFuatM="; + sha256 = "sha256-dWnOnpxh5zmou9eqVdcfhuCr8ts1CTqqEF1j/dk0jhs="; }; FONTCONFIG_FILE = fontsConf; diff --git a/pkgs/development/interpreters/racket/minimal.nix b/pkgs/development/interpreters/racket/minimal.nix index b73cdaff5d3e..a5ddab67c416 100644 --- a/pkgs/development/interpreters/racket/minimal.nix +++ b/pkgs/development/interpreters/racket/minimal.nix @@ -6,7 +6,7 @@ racket.overrideAttrs (oldAttrs: rec { version = oldAttrs.version; src = oldAttrs.src.override { name = "${pname}-${version}"; - sha256 = "sha256-FZlUWvjtioe4S8gPetj7vdneVX6jEFguJo4j2wJsKAw="; + sha256 = "sha256-VdWF46yfuqz76ECm7HTOPnvun+heMiE/Gz5Pb1k8rjk="; }; meta = oldAttrs.meta // { From a2e763508e6b118432847f6a452e022e9f3b2171 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 10:22:43 +0200 Subject: [PATCH 15/25] checkov: 2.0.1098 -> 2.0.1102 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index 29a34ce62711..92bcfec2790e 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -32,13 +32,13 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.1098"; + version = "2.0.1102"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = version; - hash = "sha256-CFH7zb3f50tlYhRiZ/q0b8PDhithVhaeRTtsXvan+bw="; + hash = "sha256-OPYlgj8jdgCQJddy9UUXMjHJtQcoMrZbghgPUdyUV5Y="; }; nativeBuildInputs = with py.pkgs; [ From 2b42ab1b4c69d6b368782c21b496f980afab956e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 11:13:47 +0200 Subject: [PATCH 16/25] python310Packages.xknx: 0.21.0 -> 0.21.1 --- pkgs/development/python-modules/xknx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xknx/default.nix b/pkgs/development/python-modules/xknx/default.nix index 3706e87bbeb0..efb944c4a71d 100644 --- a/pkgs/development/python-modules/xknx/default.nix +++ b/pkgs/development/python-modules/xknx/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "xknx"; - version = "0.21.0"; + version = "0.21.1"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "XKNX"; repo = pname; rev = "refs/tags/${version}"; - sha256 = "sha256-9fpWl9mYhYwc8Ig4uCF1RJvWS3LqrZQx88IrdaSPo7c="; + sha256 = "sha256-QNy/jUh/kIj6sabWnmC5L00ikBTrVmOEp6mFBya29WM="; }; propagatedBuildInputs = [ From 15d265a48763490d304c810996564ac1dde8808b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 11:24:55 +0200 Subject: [PATCH 17/25] python310Packages.pysensibo: 1.0.12 -> 1.0.13 --- pkgs/development/python-modules/pysensibo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysensibo/default.nix b/pkgs/development/python-modules/pysensibo/default.nix index a4973efe5049..f0a78ba994d1 100644 --- a/pkgs/development/python-modules/pysensibo/default.nix +++ b/pkgs/development/python-modules/pysensibo/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pysensibo"; - version = "1.0.12"; + version = "1.0.13"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "andrey-git"; repo = pname; rev = version; - hash = "sha256-gXdyVEBcYCUOo8PHzsJLkjtnX1B1iRS/DAxdQDU3HaY="; + hash = "sha256-GMzO29UHlRxFDPMfVtPiOCYkdjGm1lfdl6oZdk4ujTY="; }; propagatedBuildInputs = [ From bb413ed67c72ab904b814795c0c8b399fe8004b0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 11:34:20 +0200 Subject: [PATCH 18/25] python310Packages.elkm1-lib: 1.3.5 -> 1.3.6 --- pkgs/development/python-modules/elkm1-lib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/elkm1-lib/default.nix b/pkgs/development/python-modules/elkm1-lib/default.nix index 41a6436c3bc9..57c51964fc8d 100644 --- a/pkgs/development/python-modules/elkm1-lib/default.nix +++ b/pkgs/development/python-modules/elkm1-lib/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "elkm1-lib"; - version = "1.3.5"; + version = "1.3.6"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "gwww"; repo = "elkm1"; rev = version; - hash = "sha256-sYE7bZcMXsf+4r9Rs4d0XaUqdWVZfDU9/xPqIiiJkUQ="; + hash = "sha256-aIqwb2YHw/kYHBqydelTRs2+75WimgJ+4X0BYcwogh8="; }; nativeBuildInputs = [ From 344752d02cdb580294e20f2bd8243b040e23ce75 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 12:28:07 +0200 Subject: [PATCH 19/25] python310Packages.fastjsonschema: 2.15.2 -> 2.15.3 --- .../python-modules/fastjsonschema/default.nix | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/fastjsonschema/default.nix b/pkgs/development/python-modules/fastjsonschema/default.nix index 415f226b783c..23a552a9b4cd 100644 --- a/pkgs/development/python-modules/fastjsonschema/default.nix +++ b/pkgs/development/python-modules/fastjsonschema/default.nix @@ -1,24 +1,23 @@ { lib , buildPythonPackage , fetchFromGitHub -, fetchpatch , pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "fastjsonschema"; - version = "2.15.2"; + version = "2.15.3"; format = "setuptools"; - disabled = pythonOlder "3.3"; + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "horejsek"; repo = "python-fastjsonschema"; rev = "v${version}"; fetchSubmodules = true; - hash = "sha256-zrdQVFfLZxZRr9qvss4CI3LJK97xl+bY+AcPzcweYeU="; + sha256 = "sha256-WKnjSlKtMGpWKPbPr7hpS6Dg0+9i/nWVYmar0N3Q9Pc="; }; checkInputs = [ @@ -27,16 +26,6 @@ buildPythonPackage rec { dontUseSetuptoolsCheck = true; - patches = [ - # Can be removed with the next release, https://github.com/horejsek/python-fastjsonschema/pull/134 - (fetchpatch { - name = "fix-exception-name.patch"; - url = "https://github.com/horejsek/python-fastjsonschema/commit/f639dcba0299926d688e1d8d08a6a91bfe70ce8b.patch"; - sha256 = "sha256-yPV5ZNeyAobLrYf5QHanPsEomBPJ/7ZN2148R8NO4/U="; - }) - ]; - - disabledTests = [ "benchmark" # these tests require network access From 17cf602ea4ccd5da3650e622c172ec7b214c67fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 14:34:10 +0200 Subject: [PATCH 20/25] python310Packages.typical: update check part --- .../python-modules/typical/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/typical/default.nix b/pkgs/development/python-modules/typical/default.nix index 96a07802b1c8..066c3f452ed1 100644 --- a/pkgs/development/python-modules/typical/default.nix +++ b/pkgs/development/python-modules/typical/default.nix @@ -14,7 +14,7 @@ , pytestCheckHook , pythonOlder , sqlalchemy -, typing-extensions +, ujson }: buildPythonPackage rec { @@ -22,7 +22,8 @@ buildPythonPackage rec { version = "2.8.0"; format = "pyproject"; - disabled = pythonOlder "3.7"; + # Support for typing-extensions >= 4.0.0 on Python < 3.10 is missing + disabled = pythonOlder "3.10"; src = fetchFromGitHub { owner = "seandstewart"; @@ -36,13 +37,12 @@ buildPythonPackage rec { ]; propagatedBuildInputs = [ - inflection - pendulum fastjsonschema - orjson future-typing - ] ++ lib.optionals (pythonOlder "3.10") [ - typing-extensions + inflection + orjson + pendulum + ujson ]; checkInputs = [ @@ -63,13 +63,14 @@ buildPythonPackage rec { ]; disabledTests = [ - # We use orjson - "test_ujson" # ConstraintValueError: Given value <{'key... "test_tagged_union_validate" + # TypeError: 'NoneType' object cannot be interpreted as an integer + "test_ujson" ]; disabledTestPaths = [ + # We don't care about benchmarks "benchmark/" # Tests are failing on Hydra "tests/mypy/test_mypy.py" From f4d55de9214231e58064924ba269fd76e0e31086 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 1 May 2022 18:22:33 +0200 Subject: [PATCH 21/25] python310Packages.pysensibo: 1.0.13 -> 1.0.14 --- pkgs/development/python-modules/pysensibo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysensibo/default.nix b/pkgs/development/python-modules/pysensibo/default.nix index f0a78ba994d1..98cf9444b0e6 100644 --- a/pkgs/development/python-modules/pysensibo/default.nix +++ b/pkgs/development/python-modules/pysensibo/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "pysensibo"; - version = "1.0.13"; + version = "1.0.14"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "andrey-git"; repo = pname; rev = version; - hash = "sha256-GMzO29UHlRxFDPMfVtPiOCYkdjGm1lfdl6oZdk4ujTY="; + hash = "sha256-r2YIQ6JPyRWzfXprj3tFwrsAR0NtmVLncWZAsLkAzSA="; }; propagatedBuildInputs = [ From 39b8c1025b4280f2f5013948e2ebf1cc05327d96 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sun, 1 May 2022 12:20:32 -0500 Subject: [PATCH 22/25] fq: 0.0.6 -> 0.0.7 --- pkgs/development/tools/fq/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/fq/default.nix b/pkgs/development/tools/fq/default.nix index add4e21be89d..76757e1f8914 100644 --- a/pkgs/development/tools/fq/default.nix +++ b/pkgs/development/tools/fq/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "fq"; - version = "0.0.6"; + version = "0.0.7"; src = fetchFromGitHub { owner = "wader"; repo = "fq"; rev = "v${version}"; - sha256 = "sha256-/9TBnhFGYNOcCsQKUF0uuJEgnF+qRGly/5z1s3sYhqY="; + sha256 = "sha256-4bCJcLpU/k87p884jw9Gq1i6ocuD4vMn4PuOStihssE="; }; - vendorSha256 = "sha256-zvtYyNJO4QoTes3vf6CFa3dYMJqkp0PG9pnOk+aO97Y="; + vendorSha256 = "sha256-XsMhxQ83nQO3fQ1EN2XxcZeN+I96h8mcAq+TNIvbTyo="; ldflags = [ "-s" From 67f45a43621047fead6bdd5c87509c51a88b9871 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 1 May 2022 00:03:47 +0200 Subject: [PATCH 23/25] luaPackages.luaexpat: 1.3.0-1 -> 1.4.1-1 --- maintainers/scripts/luarocks-packages.csv | 2 +- .../lua-modules/generated-packages.nix | 26 +++++++++----- pkgs/development/lua-modules/luaexpat.patch | 36 ------------------- pkgs/development/lua-modules/overrides.nix | 3 -- 4 files changed, 18 insertions(+), 49 deletions(-) delete mode 100644 pkgs/development/lua-modules/luaexpat.patch diff --git a/maintainers/scripts/luarocks-packages.csv b/maintainers/scripts/luarocks-packages.csv index bdda8020a3da..c8c8fb233d59 100644 --- a/maintainers/scripts/luarocks-packages.csv +++ b/maintainers/scripts/luarocks-packages.csv @@ -52,7 +52,7 @@ luadbi-postgresql,,,,,, luadbi-sqlite3,,,,,, luaepnf,,,,,, luaevent,,,,,, -luaexpat,,,,1.3.0-1,,arobyn flosse +luaexpat,,,,1.4.1-1,,arobyn flosse luaffi,,,http://luarocks.org/dev,,, luafilesystem,,,,1.7.0-2,,flosse lualogging,,,,,, diff --git a/pkgs/development/lua-modules/generated-packages.nix b/pkgs/development/lua-modules/generated-packages.nix index 4269d7eb0d7e..8fd6543b27d5 100644 --- a/pkgs/development/lua-modules/generated-packages.nix +++ b/pkgs/development/lua-modules/generated-packages.nix @@ -1602,25 +1602,33 @@ buildLuarocksPackage { }) {}; luaexpat = callPackage({ buildLuarocksPackage, luaOlder, luaAtLeast -, fetchurl, lua +, fetchgit, lua }: buildLuarocksPackage { pname = "luaexpat"; - version = "1.3.0-1"; + version = "1.4.1-1"; knownRockspec = (fetchurl { - url = "https://luarocks.org/luaexpat-1.3.0-1.rockspec"; - sha256 = "14f7y2acycbgrx95w3darx5l1qm52a09f7njkqmhyk10w615lrw4"; + url = "https://luarocks.org/luaexpat-1.4.1-1.rockspec"; + sha256 = "1abwd385x7wnza7qqz5s4aj6m2l1c23pjmbgnpq73q0s17pn1h0c"; }).outPath; - src = fetchurl { - url = "http://matthewwild.co.uk/projects/luaexpat/luaexpat-1.3.0.tar.gz"; - sha256 = "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h"; - }; + src = fetchgit ( removeAttrs (builtins.fromJSON ''{ + "url": "https://github.com/lunarmodules/luaexpat.git", + "rev": "7d99eec9685087e6b3a57a09d672591c2aa0f4f6", + "date": "2022-04-01T17:08:05+02:00", + "path": "/nix/store/b6jyh79ggjdqgizk9amzh74lq4lwm3nm-luaexpat", + "sha256": "0yia3xpf6pwmy10yg2dnyfg3v774jay24qfyvm9pj21h2ad7ckm1", + "fetchLFS": false, + "fetchSubmodules": true, + "deepClone": false, + "leaveDotGit": false +} + '') ["date" "path"]) ; disabled = with lua; (luaOlder "5.1"); propagatedBuildInputs = [ lua ]; meta = { - homepage = "http://www.keplerproject.org/luaexpat/"; + homepage = "https://lunarmodules.github.io/luaexpat"; description = "XML Expat parsing"; maintainers = with lib.maintainers; [ arobyn flosse ]; license.fullName = "MIT/X11"; diff --git a/pkgs/development/lua-modules/luaexpat.patch b/pkgs/development/lua-modules/luaexpat.patch deleted file mode 100644 index 3dd609108426..000000000000 --- a/pkgs/development/lua-modules/luaexpat.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/src/lxplib.c b/src/lxplib.c -index 1c972db..5712611 100644 ---- a/src/lxplib.c -+++ b/src/lxplib.c -@@ -590,7 +590,7 @@ static void set_info (lua_State *L) { - /* - ** Adapted from Lua 5.2.0 - */ --static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { -+static void compat_luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { - luaL_checkstack(L, nup, "too many upvalues"); - for (; l->name != NULL; l++) { /* fill the table with given functions */ - int i; -@@ -602,6 +602,8 @@ static void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { - } - lua_pop(L, nup); /* remove upvalues */ - } -+#else -+#define compat_luaL_setfuncs(L, reg, nup) luaL_setfuncs(L, reg, nup) - #endif - - -@@ -612,11 +614,11 @@ int luaopen_lxp (lua_State *L) { - lua_pushvalue(L, -2); - lua_rawset(L, -3); - -- luaL_setfuncs (L, lxp_meths, 0); -+ compat_luaL_setfuncs (L, lxp_meths, 0); - lua_pop (L, 1); /* remove metatable */ - - lua_newtable (L); -- luaL_setfuncs (L, lxp_funcs, 0); -+ compat_luaL_setfuncs (L, lxp_funcs, 0); - set_info (L); - return 1; - } diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index b659bd9382ad..1411038e0c7f 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -206,9 +206,6 @@ with prev; externalDeps = [ { name = "EXPAT"; dep = pkgs.expat; } ]; - patches = [ - ./luaexpat.patch - ]; }); # TODO Somehow automatically amend buildInputs for things that need luaffi From 1b8e123255df22c3ee8feeb3d7e6fd093ff4bbaf Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 1 May 2022 01:10:49 +0200 Subject: [PATCH 24/25] vim/update.py: fix handling of redirects --- maintainers/scripts/pluginupdate.py | 74 ++++++++++++++--------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/maintainers/scripts/pluginupdate.py b/maintainers/scripts/pluginupdate.py index 3cfdb1387053..b24d75a6b4d0 100644 --- a/maintainers/scripts/pluginupdate.py +++ b/maintainers/scripts/pluginupdate.py @@ -87,7 +87,8 @@ def make_request(url: str, token=None) -> urllib.request.Request: return urllib.request.Request(url, headers=headers) -Redirects = Dict['Repo', 'Repo'] +# a dictionary of plugins and their new repositories +Redirects = Dict['PluginDesc', 'Repo'] class Repo: def __init__( @@ -96,8 +97,8 @@ class Repo: self.uri = uri '''Url to the repo''' self._branch = branch - # {old_uri: new_uri} - self.redirect: Redirects = {} + # Redirect is the new Repo to use + self.redirect: Optional['Repo'] = None self.token = "dummy_token" @property @@ -207,7 +208,7 @@ class RepoGitHub(Repo): ) new_repo = RepoGitHub(owner=new_owner, repo=new_name, branch=self.branch) - self.redirect[self] = new_repo + self.redirect = new_repo def prefetch(self, commit: str) -> str: @@ -237,7 +238,7 @@ class RepoGitHub(Repo): }}''' -@dataclass +@dataclass(frozen=True) class PluginDesc: repo: Repo branch: str @@ -332,9 +333,19 @@ class Editor: self.deprecated = deprecated or root.joinpath("deprecated.json") self.cache_file = cache_file or f"{name}-plugin-cache.json" - def get_current_plugins(self): + def get_current_plugins(editor) -> List[Plugin]: """To fill the cache""" - return get_current_plugins(self) + with CleanEnvironment(): + cmd = ["nix", "eval", "--extra-experimental-features", "nix-command", "--impure", "--json", "--expr", editor.get_plugins] + log.debug("Running command %s", cmd) + out = subprocess.check_output(cmd) + data = json.loads(out) + plugins = [] + for name, attr in data.items(): + print("get_current_plugins: name %s" % name) + p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"]) + plugins.append(p) + return plugins def load_plugin_spec(self, config: FetchConfig, plugin_file) -> List[PluginDesc]: '''CSV spec''' @@ -448,24 +459,10 @@ class CleanEnvironment(object): self.empty_config.close() -def get_current_plugins(editor: Editor) -> List[Plugin]: - with CleanEnvironment(): - cmd = ["nix", "eval", "--extra-experimental-features", "nix-command", "--impure", "--json", "--expr", editor.get_plugins] - log.debug("Running command %s", cmd) - out = subprocess.check_output(cmd) - data = json.loads(out) - plugins = [] - for name, attr in data.items(): - print("get_current_plugins: name %s" % name) - p = Plugin(name, attr["rev"], attr["submodules"], attr["sha256"]) - plugins.append(p) - return plugins - - def prefetch_plugin( p: PluginDesc, cache: "Optional[Cache]" = None, -) -> Tuple[Plugin, Redirects]: +) -> Tuple[Plugin, Optional[Repo]]: repo, branch, alias = p.repo, p.branch, p.alias name = alias or p.repo.name commit = None @@ -479,7 +476,7 @@ def prefetch_plugin( return cached_plugin, repo.redirect has_submodules = repo.has_submodules() - print(f"prefetch {name}") + log.debug(f"prefetch {name}") sha256 = repo.prefetch(commit) return ( @@ -488,7 +485,7 @@ def prefetch_plugin( ) -def print_download_error(plugin: str, ex: Exception): +def print_download_error(plugin: PluginDesc, ex: Exception): print(f"{plugin}: {ex}", file=sys.stderr) ex_traceback = ex.__traceback__ tb_lines = [ @@ -498,19 +495,21 @@ def print_download_error(plugin: str, ex: Exception): print("\n".join(tb_lines)) def check_results( - results: List[Tuple[PluginDesc, Union[Exception, Plugin], Redirects]] + results: List[Tuple[PluginDesc, Union[Exception, Plugin], Optional[Repo]]] ) -> Tuple[List[Tuple[PluginDesc, Plugin]], Redirects]: ''' ''' - failures: List[Tuple[str, Exception]] = [] + failures: List[Tuple[PluginDesc, Exception]] = [] plugins = [] - # {old: new} plugindesc - redirects: Dict[Repo, Repo] = {} + redirects: Redirects = {} for (pdesc, result, redirect) in results: if isinstance(result, Exception): - failures.append((pdesc.name, result)) + failures.append((pdesc, result)) else: - plugins.append((pdesc, result)) - redirects.update(redirect) + new_pdesc = pdesc + if redirect is not None: + redirects.update({pdesc: redirect}) + new_pdesc = PluginDesc(redirect, pdesc.branch, pdesc.alias) + plugins.append((new_pdesc, result)) print(f"{len(results) - len(failures)} plugins were checked", end="") if len(failures) == 0: @@ -591,13 +590,13 @@ class Cache: def prefetch( pluginDesc: PluginDesc, cache: Cache -) -> Tuple[PluginDesc, Union[Exception, Plugin], dict]: +) -> Tuple[PluginDesc, Union[Exception, Plugin], Optional[Repo]]: try: plugin, redirect = prefetch_plugin(pluginDesc, cache) cache[plugin.commit] = plugin return (pluginDesc, plugin, redirect) except Exception as e: - return (pluginDesc, e, {}) + return (pluginDesc, e, None) @@ -606,7 +605,7 @@ def rewrite_input( input_file: Path, deprecated: Path, # old pluginDesc and the new - redirects: Dict[PluginDesc, PluginDesc] = {}, + redirects: Redirects = {}, append: List[PluginDesc] = [], ): plugins = load_plugins_from_csv(config, input_file,) @@ -618,9 +617,10 @@ def rewrite_input( cur_date_iso = datetime.now().strftime("%Y-%m-%d") with open(deprecated, "r") as f: deprecations = json.load(f) - for old, new in redirects.items(): - old_plugin, _ = prefetch_plugin(old) - new_plugin, _ = prefetch_plugin(new) + for pdesc, new_repo in redirects.items(): + new_pdesc = PluginDesc(new_repo, pdesc.branch, pdesc.alias) + old_plugin, _ = prefetch_plugin(pdesc) + new_plugin, _ = prefetch_plugin(new_pdesc) if old_plugin.normalized_name != new_plugin.normalized_name: deprecations[old_plugin.normalized_name] = { "new": new_plugin.normalized_name, From a98504952fb1fe260ee70119bbb3eb23062f9ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sat, 30 Apr 2022 02:29:54 +0200 Subject: [PATCH 25/25] magic-wormhole-rs: fix pname --- pkgs/tools/networking/magic-wormhole-rs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/magic-wormhole-rs/default.nix b/pkgs/tools/networking/magic-wormhole-rs/default.nix index 951a06643764..3d9e20d14dce 100644 --- a/pkgs/tools/networking/magic-wormhole-rs/default.nix +++ b/pkgs/tools/networking/magic-wormhole-rs/default.nix @@ -4,7 +4,7 @@ , rustPlatform }: rustPlatform.buildRustPackage rec { - name = "magic-wormhole-rs"; + pname = "magic-wormhole-rs"; version = "0.3.0"; src = fetchFromGitHub { @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage rec { # https://github.com/NixOS/nixpkgs/issues/30742 # and can probably be removed once the issue is resolved cargoPatches = [ ./Cargo.toml.patch ]; - cargoSha256 = "sha256-DG1kyukgzDbolX9Mg9hK1TRyzIWbAX6f54jSM8clj/c="; + cargoSha256 = "sha256-ujwvwr4GR/rQWnXFfL8sqPyz4QvGeOxwBrT+gf+vjsI="; # all tests involve networking and are bound fail doCheck = false;