From dc84bd68b10290b09b2dd92d3477aa17a963061e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Sat, 15 Jul 2023 03:54:31 +0200 Subject: [PATCH 01/56] scala-cli: 1.0.1 -> 1.0.2 --- .../tools/build-managers/scala-cli/sources.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/build-managers/scala-cli/sources.json b/pkgs/development/tools/build-managers/scala-cli/sources.json index 031d71a7babd..c6fc0bf69127 100644 --- a/pkgs/development/tools/build-managers/scala-cli/sources.json +++ b/pkgs/development/tools/build-managers/scala-cli/sources.json @@ -1,21 +1,21 @@ { - "version": "1.0.1", + "version": "1.0.2", "assets": { "aarch64-darwin": { "asset": "scala-cli-aarch64-apple-darwin.gz", - "sha256": "0n6jlxbfw21ck1qg2xzkrp0p4hlvr21cxfp3p27svp01104n6ig8" + "sha256": "0a1gsrzavflyp6vk7qghb7az9ki1mq4vkncsbjwq0b5hrmy4mxry" }, "aarch64-linux": { "asset": "scala-cli-aarch64-pc-linux.gz", - "sha256": "05rmxi7nwxkvx6as6sbfvrsyll2lp06iq77z22glkkv8y1dd6334" + "sha256": "0six9qcrihshn4sbiyzkbxdnkflqq5az166fdi5wz4rq0l4jj02z" }, "x86_64-darwin": { "asset": "scala-cli-x86_64-apple-darwin.gz", - "sha256": "1vsjp3sdnclx5w4bv1kzkk23q848374phlx3ix0qln04ih821q0l" + "sha256": "1c6dsidgcjscqzknvn1sl66kjvjbg400dxxb9lp134zm2sn8r3r2" }, "x86_64-linux": { "asset": "scala-cli-x86_64-pc-linux.gz", - "sha256": "1904f2z3hvkl2rmj0czk5qkw9327zqf5m8i4ad0bzyrri5q7q4ki" + "sha256": "1a35xhkvri5nlk65ms0rwlcgsbl8264j6c60665ds2h9dwph06n7" } } } From 504676a454d06bdd60003f4f7c009ae14a43e829 Mon Sep 17 00:00:00 2001 From: ogoid <1449961+ogoid@users.noreply.github.com> Date: Sat, 15 Jul 2023 21:21:21 +0000 Subject: [PATCH 02/56] cudaPackages.cudnn: fix missing libcublas paths adds missing paths to libculas, fixes #236070 --- pkgs/development/libraries/science/math/cudnn/generic.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index cdfa924b2242..42006e2f8d37 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -94,6 +94,8 @@ in # Without --add-needed autoPatchelf forgets $ORIGIN on cuda>=8.0.5. postFixup = strings.optionalString (strings.versionAtLeast versionTriple "8.0.5") '' patchelf $out/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so + patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so.11 + patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublasLt.so.11 ''; passthru = { From f6cd7355c5c2e9b489398275a3c17093b944112f Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 18 Jul 2023 21:37:31 +0200 Subject: [PATCH 03/56] abc-verifier: unstable-2023-02-23 -> unstable-2023-06-28 --- pkgs/applications/science/logic/abc/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/logic/abc/default.nix b/pkgs/applications/science/logic/abc/default.nix index bea9381132fd..1062582d82c4 100644 --- a/pkgs/applications/science/logic/abc/default.nix +++ b/pkgs/applications/science/logic/abc/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "abc-verifier"; - version = "unstable-2023-02-23"; + version = "unstable-2023-06-28"; src = fetchFromGitHub { owner = "yosyshq"; repo = "abc"; - rev = "2c1c83f75b8078ced51f92c697da3e712feb3ac3"; - hash = "sha256-THcyEifIp9v1bOofFVm9NFPqgI6NfKKys+Ea2KyNpv8="; + rev = "bb64142b07794ee685494564471e67365a093710"; + hash = "sha256-Qkk61Lh84ervtehWskSB9GKh+JPB7mI1IuG32OSZMdg="; }; nativeBuildInputs = [ cmake ]; From ead2ae782e2802b9790db13d417f5fc8fdb186db Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 18 Jul 2023 21:39:17 +0200 Subject: [PATCH 04/56] yosys: 0.30 -> 0.31 https://github.com/YosysHQ/yosys/releases/tag/yosys-0.31 --- pkgs/development/compilers/yosys/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/yosys/default.nix b/pkgs/development/compilers/yosys/default.nix index 213a47626201..a25142fa9fd5 100644 --- a/pkgs/development/compilers/yosys/default.nix +++ b/pkgs/development/compilers/yosys/default.nix @@ -71,13 +71,13 @@ let in stdenv.mkDerivation rec { pname = "yosys"; - version = "0.30"; + version = "0.31"; src = fetchFromGitHub { owner = "YosysHQ"; repo = "yosys"; rev = "${pname}-${version}"; - hash = "sha256-qhMcXJFEuBPl7vh+gYTu7PnSWi+L3YMLrBMQyYqfc0w="; + hash = "sha256-BGeqI0U2AdKgsQQw3f/C0l1ENPTlQ3Eoa8TaLRE+aWI="; }; enableParallelBuilding = true; From 53dcfd24ad71bb1a26c9d17cbd2af1f83a2da7a3 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Wed, 19 Jul 2023 16:44:11 +0200 Subject: [PATCH 05/56] lib.lists.findFirstIndex: init Co-authored-by: Robert Hensing --- lib/lists.nix | 42 ++++++++++++++++++++++++++++++-------- lib/tests/misc.nix | 50 +++++++++++++++++++++++++++------------------- 2 files changed, 64 insertions(+), 28 deletions(-) diff --git a/lib/lists.nix b/lib/lists.nix index 5d9af0cf7114..c3e889644b3e 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -180,18 +180,18 @@ rec { else if len != 1 then multiple else head found; - /* Find the first element in the list matching the specified + /* Find the first index in the list matching the specified predicate or return `default` if no such element exists. - Type: findFirst :: (a -> bool) -> a -> [a] -> a + Type: findFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b) Example: - findFirst (x: x > 3) 7 [ 1 6 4 ] - => 6 - findFirst (x: x > 9) 7 [ 1 6 4 ] - => 7 + findFirstIndex (x: x > 3) null [ 0 6 4 ] + => 1 + findFirstIndex (x: x > 9) null [ 0 6 4 ] + => null */ - findFirst = + findFirstIndex = # Predicate pred: # Default value to return @@ -229,7 +229,33 @@ rec { if resultIndex < 0 then default else - elemAt list resultIndex; + resultIndex; + + /* Find the first element in the list matching the specified + predicate or return `default` if no such element exists. + + Type: findFirst :: (a -> bool) -> a -> [a] -> a + + Example: + findFirst (x: x > 3) 7 [ 1 6 4 ] + => 6 + findFirst (x: x > 9) 7 [ 1 6 4 ] + => 7 + */ + findFirst = + # Predicate + pred: + # Default value to return + default: + # Input list + list: + let + index = findFirstIndex pred null list; + in + if index == null then + default + else + elemAt list index; /* Return true if function `pred` returns true for at least one element of `list`. diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index ce980436c1bc..dfa6a94ee48e 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -518,45 +518,55 @@ runTests { expected = false; }; - testFindFirstExample1 = { - expr = findFirst (x: x > 3) 7 [ 1 6 4 ]; - expected = 6; + testFindFirstIndexExample1 = { + expr = lists.findFirstIndex (x: x > 3) (abort "index found, so a default must not be evaluated") [ 1 6 4 ]; + expected = 1; }; - testFindFirstExample2 = { - expr = findFirst (x: x > 9) 7 [ 1 6 4 ]; - expected = 7; + testFindFirstIndexExample2 = { + expr = lists.findFirstIndex (x: x > 9) "a very specific default" [ 1 6 4 ]; + expected = "a very specific default"; }; - testFindFirstEmpty = { - expr = findFirst (abort "when the list is empty, the predicate is not needed") null []; + testFindFirstIndexEmpty = { + expr = lists.findFirstIndex (abort "when the list is empty, the predicate is not needed") null []; expected = null; }; - testFindFirstSingleMatch = { - expr = findFirst (x: x == 5) null [ 5 ]; - expected = 5; + testFindFirstIndexSingleMatch = { + expr = lists.findFirstIndex (x: x == 5) null [ 5 ]; + expected = 0; }; - testFindFirstSingleDefault = { - expr = findFirst (x: false) null [ (abort "if the predicate doesn't access the value, it must not be evaluated") ]; + testFindFirstIndexSingleDefault = { + expr = lists.findFirstIndex (x: false) null [ (abort "if the predicate doesn't access the value, it must not be evaluated") ]; expected = null; }; - testFindFirstNone = { - expr = builtins.tryEval (findFirst (x: x == 2) null [ 1 (throw "the last element must be evaluated when there's no match") ]); + testFindFirstIndexNone = { + expr = builtins.tryEval (lists.findFirstIndex (x: x == 2) null [ 1 (throw "the last element must be evaluated when there's no match") ]); expected = { success = false; value = false; }; }; # Makes sure that the implementation doesn't cause a stack overflow - testFindFirstBig = { - expr = findFirst (x: x == 1000000) null (range 0 1000000); + testFindFirstIndexBig = { + expr = lists.findFirstIndex (x: x == 1000000) null (range 0 1000000); expected = 1000000; }; - testFindFirstLazy = { - expr = findFirst (x: x == 1) 7 [ 1 (abort "list elements after the match must not be evaluated") ]; - expected = 1; + testFindFirstIndexLazy = { + expr = lists.findFirstIndex (x: x == 1) null [ 1 (abort "list elements after the match must not be evaluated") ]; + expected = 0; + }; + + testFindFirstExample1 = { + expr = lists.findFirst (x: x > 3) 7 [ 1 6 4 ]; + expected = 6; + }; + + testFindFirstExample2 = { + expr = lists.findFirst (x: x > 9) 7 [ 1 6 4 ]; + expected = 7; }; # ATTRSETS From c519ceaa21fd2fb14557a7543e4884cd6ead8b94 Mon Sep 17 00:00:00 2001 From: ogoid <1449961+ogoid@users.noreply.github.com> Date: Wed, 19 Jul 2023 19:22:49 +0000 Subject: [PATCH 06/56] patch all cudnn libraries to require libcublas more libcudnn_*.so libraries may require libcublas.so --- pkgs/development/libraries/science/math/cudnn/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index 42006e2f8d37..99df51a59b20 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -94,8 +94,8 @@ in # Without --add-needed autoPatchelf forgets $ORIGIN on cuda>=8.0.5. postFixup = strings.optionalString (strings.versionAtLeast versionTriple "8.0.5") '' patchelf $out/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so - patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so.11 - patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublasLt.so.11 + patchelf $out/lib/*.so --add-needed libcublas.so.11 + patchelf $out/lib/*.so --add-needed libcublasLt.so.11 ''; passthru = { From e1c91b230122dceca76e600aae5a97d2f590ebb2 Mon Sep 17 00:00:00 2001 From: ogoid <1449961+ogoid@users.noreply.github.com> Date: Thu, 20 Jul 2023 00:57:10 +0000 Subject: [PATCH 07/56] improve cudnn fix Co-authored-by: Samuel Ainsworth --- pkgs/development/libraries/science/math/cudnn/generic.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index 99df51a59b20..dc9690cfc14e 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -94,8 +94,7 @@ in # Without --add-needed autoPatchelf forgets $ORIGIN on cuda>=8.0.5. postFixup = strings.optionalString (strings.versionAtLeast versionTriple "8.0.5") '' patchelf $out/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so - patchelf $out/lib/*.so --add-needed libcublas.so.11 - patchelf $out/lib/*.so --add-needed libcublasLt.so.11 + patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so.11 --add-needed libcublasLt.so.11 ''; passthru = { From 7f61b01600ecbdaa2a57c51097f2ece9e421c4fe Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 14 Jul 2023 19:26:08 +0200 Subject: [PATCH 08/56] lib.lists.commonPrefix: init --- lib/lists.nix | 28 +++++++++++++++++++++++++++- lib/tests/misc.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/lib/lists.nix b/lib/lists.nix index c3e889644b3e..3e058b3f1aef 100644 --- a/lib/lists.nix +++ b/lib/lists.nix @@ -3,7 +3,7 @@ { lib }: let inherit (lib.strings) toInt; - inherit (lib.trivial) compare min; + inherit (lib.trivial) compare min id; inherit (lib.attrsets) mapAttrs; in rec { @@ -663,6 +663,32 @@ rec { else if start + count > len then len - start else count); + /* The common prefix of two lists. + + Type: commonPrefix :: [a] -> [a] -> [a] + + Example: + commonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ] + => [ 1 2 ] + commonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ] + => [ 1 2 3 ] + commonPrefix [ 1 2 3 ] [ 4 5 6 ] + => [ ] + */ + commonPrefix = + list1: + list2: + let + # Zip the lists together into a list of booleans whether each element matches + matchings = zipListsWith (fst: snd: fst != snd) list1 list2; + # Find the first index where the elements don't match, + # which will then also be the length of the common prefix. + # If all elements match, we fall back to the length of the zipped list, + # which is the same as the length of the smaller list. + commonPrefixLength = findFirstIndex id (length matchings) matchings; + in + take commonPrefixLength list1; + /* Return the last element of a list. This function throws an error if the list is empty. diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index dfa6a94ee48e..ab97409d8567 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -488,6 +488,39 @@ runTests { expected = { a = [ 2 3 ]; b = [7]; c = [8];}; }; + testListCommonPrefixExample1 = { + expr = lists.commonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ]; + expected = [ 1 2 ]; + }; + testListCommonPrefixExample2 = { + expr = lists.commonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ]; + expected = [ 1 2 3 ]; + }; + testListCommonPrefixExample3 = { + expr = lists.commonPrefix [ 1 2 3 ] [ 4 5 6 ]; + expected = [ ]; + }; + testListCommonPrefixEmpty = { + expr = lists.commonPrefix [ ] [ 1 2 3 ]; + expected = [ ]; + }; + testListCommonPrefixSame = { + expr = lists.commonPrefix [ 1 2 3 ] [ 1 2 3 ]; + expected = [ 1 2 3 ]; + }; + testListCommonPrefixLazy = { + expr = lists.commonPrefix [ 1 ] [ 1 (abort "lib.lists.commonPrefix shouldn't evaluate this")]; + expected = [ 1 ]; + }; + # This would stack overflow if `commonPrefix` were implemented using recursion + testListCommonPrefixLong = + let + longList = genList (n: n) 100000; + in { + expr = lists.commonPrefix longList longList; + expected = longList; + }; + testSort = { expr = sort builtins.lessThan [ 40 2 30 42 ]; expected = [2 30 40 42]; From 029a3f43989febc3b2f9b5dbbfbc7f51edaf1894 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 19 Jul 2023 02:15:38 +0400 Subject: [PATCH 09/56] python3Packages.magic-filter: init at 1.0.10 --- .../python-modules/magic-filter/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/magic-filter/default.nix diff --git a/pkgs/development/python-modules/magic-filter/default.nix b/pkgs/development/python-modules/magic-filter/default.nix new file mode 100644 index 000000000000..8a3a0fff574d --- /dev/null +++ b/pkgs/development/python-modules/magic-filter/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, hatchling +}: + +buildPythonPackage rec { + pname = "magic-filter"; + version = "1.0.10"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aiogram"; + repo = "magic-filter"; + rev = "v${version}"; + hash = "sha256-mHqq/ci8uMACNutwmxKX1nrl3nTSnSyU2x1VxzWxqzM="; + }; + + nativeBuildInputs = [ + hatchling + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "magic_filter" ]; + + meta = with lib; { + description = "Magic filter based on dynamic attribute getter"; + homepage = "https://github.com/aiogram/magic-filter"; + changelog = "https://github.com/aiogram/magic-filter/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3fcb689e1474..08a8c461668c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6149,6 +6149,8 @@ self: super: with self; { magicgui = callPackage ../development/python-modules/magicgui { }; + magic-filter = callPackage ../development/python-modules/magic-filter { }; + magic-wormhole = callPackage ../development/python-modules/magic-wormhole { }; magic-wormhole-mailbox-server = callPackage ../development/python-modules/magic-wormhole-mailbox-server { }; From 6baf91f97429f39dcd9445d08ad772c9c6b1daaa Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 23 Jul 2023 00:44:04 +0400 Subject: [PATCH 10/56] python3Packages.aiogram: init at 2.25.1 --- .../python-modules/aiogram/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/aiogram/default.nix diff --git a/pkgs/development/python-modules/aiogram/default.nix b/pkgs/development/python-modules/aiogram/default.nix new file mode 100644 index 000000000000..ab5499f7ae96 --- /dev/null +++ b/pkgs/development/python-modules/aiogram/default.nix @@ -0,0 +1,65 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, aiohttp +, aiohttp-socks +, aioredis +, aresponses +, babel +, certifi +, magic-filter +, pytest-asyncio +, pytest-lazy-fixture +, redis +}: + +buildPythonPackage rec { + pname = "aiogram"; + version = "2.25.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aiogram"; + repo = "aiogram"; + rev = "v${version}"; + hash = "sha256-g8nuvna7DpXElvjBehnGKHUsrf+nyQcoKNnyR59RALo="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "aiohttp>=3.8.0,<3.9.0" "aiohttp" \ + --replace "Babel>=2.9.1,<2.10.0" "Babel" \ + --replace "magic-filter>=1.0.9" "magic-filter" + ''; + + propagatedBuildInputs = [ + aiohttp + babel + certifi + magic-filter + ]; + + nativeCheckInputs = [ + aiohttp-socks + aioredis + aresponses + pytest-asyncio + pytest-lazy-fixture + pytestCheckHook + redis + ]; + + pythonImportsCheck = [ "aiogram" ]; + + meta = with lib; { + description = "Modern and fully asynchronous framework for Telegram Bot API"; + homepage = "https://github.com/aiogram/aiogram"; + changelog = "https://github.com/aiogram/aiogram/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ sikmir ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 08a8c461668c..7087a60caf88 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -194,6 +194,8 @@ self: super: with self; { aiogithubapi = callPackage ../development/python-modules/aiogithubapi { }; + aiogram = callPackage ../development/python-modules/aiogram { }; + aioharmony = callPackage ../development/python-modules/aioharmony { }; aiohomekit = callPackage ../development/python-modules/aiohomekit { }; From 9325a80a11ed2bffa693d36e79112072769acdf4 Mon Sep 17 00:00:00 2001 From: ogoid <1449961+ogoid@users.noreply.github.com> Date: Mon, 24 Jul 2023 23:35:54 +0000 Subject: [PATCH 11/56] fix libcudnn also on cuda12 Co-authored-by: Samuel Ainsworth --- pkgs/development/libraries/science/math/cudnn/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index dc9690cfc14e..e0a6ffd9d547 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -94,7 +94,7 @@ in # Without --add-needed autoPatchelf forgets $ORIGIN on cuda>=8.0.5. postFixup = strings.optionalString (strings.versionAtLeast versionTriple "8.0.5") '' patchelf $out/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so - patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so.11 --add-needed libcublasLt.so.11 + patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so ''; passthru = { From 0bada4f8ad3c281ffb5710f649b5373c73315566 Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Tue, 20 Jun 2023 10:25:08 +0200 Subject: [PATCH 12/56] texlive.combine: expose licensing information of combined schemes --- .../tools/typesetting/tex/texlive/default.nix | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 6ed1ba7e7942..84313169378e 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -254,13 +254,38 @@ in # Pre-defined combined packages for TeX Live schemes, # to make nix-env usage more comfortable and build selected on Hydra. - combined = with lib; recurseIntoAttrs ( + combined = with lib; + let + # these license lists should be the sorted union of the licenses of the packages the schemes contain. + # The correctness of this collation is tested by tests.texlive.licenses + licenses = with lib.licenses; { + scheme-basic = [ free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ]; + scheme-context = [ bsd2 bsd3 cc-by-sa-40 free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 + lppl1 lppl13c mit ofl publicDomain x11 ]; + scheme-full = [ artistic1 artistic1-cl8 asl20 bsd2 bsd3 bsdOriginal cc-by-10 cc-by-40 cc-by-sa-10 cc-by-sa-20 + cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl1Plus gpl2 gpl2Plus gpl3 gpl3Plus isc knuth + lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; + scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2 + gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; + scheme-infraonly = [ gpl2 lgpl21 ]; + scheme-medium = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only + free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl + publicDomain x11 ]; + scheme-minimal = [ free gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ]; + scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth + lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ]; + scheme-tetex = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 + fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a + lppl13c mit ofl publicDomain x11]; + }; + in recurseIntoAttrs ( mapAttrs (pname: attrs: addMetaAttrs rec { description = "TeX Live environment for ${pname}"; platforms = lib.platforms.all; maintainers = with lib.maintainers; [ veprbl ]; + license = licenses.${pname}; } (combine { ${pname} = attrs; From 43ac27ebae709c73bb990b1ee20088d0807f6d8b Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Fri, 30 Jun 2023 02:07:49 +0200 Subject: [PATCH 13/56] tests.texlive.licenses: init --- pkgs/test/texlive/default.nix | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/pkgs/test/texlive/default.nix b/pkgs/test/texlive/default.nix index ae0e913a7600..cb004dc3c976 100644 --- a/pkgs/test/texlive/default.nix +++ b/pkgs/test/texlive/default.nix @@ -321,4 +321,54 @@ echo "tested $binCount binCount: $ignoredCount ignored, $brokenCount broken, $failedCount failed" [[ $failedCount = 0 ]] ''; + + # verify that the precomputed licensing information in default.nix + # does indeed match the metadata of the individual packages. + # + # This is part of the test suite (and not the normal evaluation) to save + # time for "normal" evaluations. To be more in line with the other tests, this + # also builds a derivation, even though it is essentially an eval-time assertion. + licenses = + let + concatLicenses = builtins.foldl' (acc: el: if builtins.elem el acc then acc else acc ++ [ el ]); + # converts a license to its attribute name in lib.licenses + licenseToAttrName = license: + builtins.head (builtins.attrNames + (lib.filterAttrs (n: v: license == v) lib.licenses)); + lt = (a: b: a < b); + + savedLicenses = scheme: scheme.meta.license; + savedLicensesAttrNames = scheme: map licenseToAttrName (savedLicenses scheme); + + correctLicenses = scheme: builtins.foldl' + (acc: pkg: concatLicenses acc (lib.toList (pkg.meta.license or []))) + [] + scheme.passthru.packages; + correctLicensesAttrNames = scheme: + lib.sort lt + (map licenseToAttrName (correctLicenses scheme)); + + hasLicenseMismatch = scheme: + (lib.isDerivation scheme) && + (savedLicensesAttrNames scheme) != (correctLicensesAttrNames scheme); + incorrectSchemes = lib.filterAttrs + (n: hasLicenseMismatch) + texlive.combined; + prettyPrint = name: scheme: + '' + license info for ${name} is incorrect! Note that order is enforced. + saved: [ ${lib.concatStringsSep " " (savedLicensesAttrNames scheme)} ] + correct: [ ${lib.concatStringsSep " " (correctLicensesAttrNames scheme)} ] + ''; + errorText = lib.concatStringsSep "\n\n" (lib.mapAttrsToList prettyPrint incorrectSchemes); + in + runCommand "texlive-test-license" { + inherit errorText; + } + (if (incorrectSchemes == {}) + then "echo everything is fine! > $out" + else '' + echo "$errorText" + false + ''); } From 416b3704df9f40df29a23233c229e9dc410a0cb0 Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Fri, 30 Jun 2023 20:09:32 +0200 Subject: [PATCH 14/56] texlive: add comment to indicate that a hack can be removed soon --- pkgs/tools/typesetting/tex/texlive/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix index 84313169378e..f5696eba4f94 100644 --- a/pkgs/tools/typesetting/tex/texlive/default.nix +++ b/pkgs/tools/typesetting/tex/texlive/default.nix @@ -43,6 +43,7 @@ let # it seems to need it to transform fonts xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ]; + # TODO: remove when updating to texlive-2023, metadata has been corrected in the TeX catalogue # tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README arabi-add.license = [ "lppl13c" ]; From d884050af7b25c077a9b694aae8de638af0c7026 Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Sat, 1 Jul 2023 22:27:47 +0200 Subject: [PATCH 15/56] texlive: add license/test instructions to UPGRADING.md --- pkgs/tools/typesetting/tex/texlive/UPGRADING.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/tools/typesetting/tex/texlive/UPGRADING.md b/pkgs/tools/typesetting/tex/texlive/UPGRADING.md index 12416dee8ce6..c9d4a81a2c39 100644 --- a/pkgs/tools/typesetting/tex/texlive/UPGRADING.md +++ b/pkgs/tools/typesetting/tex/texlive/UPGRADING.md @@ -72,6 +72,23 @@ CTAN and the various mirrors) and that the build recipe continues to produce the same output. Should those assumptions not hold, remove the previous fixed hashes for the relevant package, or for all packages. +### Updating the licensing information + +The license of each package in texlive is automatically extracted from texlive's +texlive.tlpdb into tlpdb.nix. The combined licenses of the schemes is stored +separately in `default.nix` and must be kept in sync with the licenses of the +actual contents of these schemes. Whether this is the case can be verified with the +`pkgs.tests.texlive.licenses` test. In case of a mismatch, copy the “correct” +license lists reported by the test into `default.nix`. + +### Running the testsuite + +There are a some other useful tests that haven't been mentioned before. Build them with +``` +nix-build ../../../../.. -A tests.texlive --no-out-link +``` + + ### Commit changes Commit the updated `tlpdb.nix` and `fixed-hashes.nix` to the repository with From 793cc9d982415b71cdba729cf779bfc49e9d2ae7 Mon Sep 17 00:00:00 2001 From: Artturin Date: Wed, 26 Jul 2023 04:19:19 +0300 Subject: [PATCH 16/56] python3: splice python within python3Packages.callPackage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `lib.extends hooks pythonPackagesFun` includes python which we want to splice what this fixes: ``` nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0 «derivation /nix/store/39dkb51rciw6zwg0c2c44gpmpjapddxc-python3-aarch64-unknown-linux-gnu-3.10.12.drv» ``` to ``` nix-repl> lib.elemAt pkgsCross.aarch64-multiplatform.python3Packages.xpybutil.nativeBuildInputs 0 «derivation /nix/store/21ldw2dp26xvv9iyxn9x77a8yh4waqz5-python3-3.10.12.drv» ``` Before https://github.com/NixOS/nixpkgs/pull/194205 The keep python used to work by accident because self was passed from __splicedPackages https://github.com/NixOS/nixpkgs/pull/196052/files#diff-44ce3495c4f983ce64dd47c86a9d3e77bad210b2709c098a3806998dcd9b000bR213 But now it does not work because overrideAttrs is used on python in python-packages-base.nix Preferably we would [ splice the hooks too ](https://github.com/NixOS/nixpkgs/pull/228139) but we cannot do that until [Package sets within derivations (i.e. python3.pkgs) are not spliced](https://github.com/NixOS/nixpkgs/issues/211340) is fixed, because people often use `python3.pkgs.wrapPython` in `nativeBuildInputs` (it's correct but python3.pkgs should be python3Packages to get splicing. --- pkgs/development/interpreters/python/hooks/default.nix | 8 ++++---- pkgs/development/interpreters/python/passthrufun.nix | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/interpreters/python/hooks/default.nix b/pkgs/development/interpreters/python/hooks/default.nix index 001e477b9185..338e15f02485 100644 --- a/pkgs/development/interpreters/python/hooks/default.nix +++ b/pkgs/development/interpreters/python/hooks/default.nix @@ -1,9 +1,9 @@ -self: super: with self; +self: dontUse: with self; let - pythonInterpreter = super.python.pythonForBuild.interpreter; - pythonSitePackages = super.python.sitePackages; - pythonCheckInterpreter = super.python.interpreter; + pythonInterpreter = python.pythonForBuild.interpreter; + pythonSitePackages = python.sitePackages; + pythonCheckInterpreter = python.interpreter; setuppy = ../run_setup.py; in { makePythonHook = args: pkgs.makeSetupHook ({passthru.provides.setupHook = true; } // args); diff --git a/pkgs/development/interpreters/python/passthrufun.nix b/pkgs/development/interpreters/python/passthrufun.nix index aa63f354e085..b73885b5e29e 100644 --- a/pkgs/development/interpreters/python/passthrufun.nix +++ b/pkgs/development/interpreters/python/passthrufun.nix @@ -47,12 +47,13 @@ selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget. }; hooks = import ./hooks/default.nix; - keep = lib.extends hooks pythonPackagesFun; + keep = self: hooks self {}; extra = _: {}; optionalExtensions = cond: as: lib.optionals cond as; pythonExtension = import ../../../top-level/python-packages.nix; python2Extension = import ../../../top-level/python2-packages.nix; extensions = lib.composeManyExtensions ([ + hooks pythonExtension ] ++ (optionalExtensions (!self.isPy3k) [ python2Extension @@ -64,7 +65,7 @@ otherSplices keep extra - (lib.extends (lib.composeExtensions aliases extensions) keep)) + (lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun)) { overrides = packageOverrides; python = self; From e83f3dfb92d34be85b92bc6fb1f002e500f2a32e Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 26 Jul 2023 14:37:43 +0900 Subject: [PATCH 17/56] python310Packages.zope_broken: remove zope_broken has been removed because it is obsolete and not needed in zodb>=3.10 --- .../python-modules/zope_broken/default.nix | 26 ------------------- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 -- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 pkgs/development/python-modules/zope_broken/default.nix diff --git a/pkgs/development/python-modules/zope_broken/default.nix b/pkgs/development/python-modules/zope_broken/default.nix deleted file mode 100644 index a3583654e660..000000000000 --- a/pkgs/development/python-modules/zope_broken/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib -, buildPythonPackage -, fetchPypi -, zope_interface -}: - -buildPythonPackage rec { - pname = "zope.broken"; - version = "3.6.0"; - - src = fetchPypi { - inherit pname version; - extension = "zip"; - sha256 = "b9b8776002da4f7b6b12dfcce77eb642ae62b39586dbf60e1d9bdc992c9f2999"; - }; - - buildInputs = [ zope_interface ]; - - meta = with lib; { - homepage = "http://pypi.python.org/pypi/zope.broken"; - description = "Zope Broken Object Interfaces"; - license = licenses.zpl20; - maintainers = with maintainers; [ goibhniu ]; - }; - -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index f20d8a2d6b5d..8b9160d2a5ca 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -376,4 +376,5 @@ mapAliases ({ zake = throw "zake has been removed because it is abandoned"; # added 2023-06-20 zc-buildout221 = zc-buildout; # added 2021-07-21 zc_buildout_nix = throw "zc_buildout_nix was pinned to a version no longer compatible with other modules"; + zope_broken = throw "zope_broken has been removed because it is obsolete and not needed in zodb>=3.10"; # added 2023-07-26 }) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7344b930e6c4..cdb7e837a98b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13890,8 +13890,6 @@ self: super: with self; { zodbpickle = callPackage ../development/python-modules/zodbpickle { }; - zope_broken = callPackage ../development/python-modules/zope_broken { }; - zope-cachedescriptors = callPackage ../development/python-modules/zope-cachedescriptors { }; zope_component = callPackage ../development/python-modules/zope_component { }; From 777ec25d083ed9ce986324bc7ee3e5e2baff2e68 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 05:42:29 +0000 Subject: [PATCH 18/56] python310Packages.xknx: 2.11.1 -> 2.11.2 --- 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 ba03f1bf04c2..07615180608e 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 = "2.11.1"; + version = "2.11.2"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "XKNX"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-9H5LQX6uXWr9pQ/WosNl1LrcbR+MAwVtZv8Cdb+WFvg="; + hash = "sha256-rKvHb0wkWVuZO8M8uIQdOiY1N6DmGSpqUgz4YYbUfSM="; }; nativeBuildInputs = [ From 6cd708a941c6194342c703e0ca4cc90c6e2a1871 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 06:24:29 +0000 Subject: [PATCH 19/56] numix-icon-theme-circle: 23.07.08 -> 23.07.21 --- pkgs/data/icons/numix-icon-theme-circle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/icons/numix-icon-theme-circle/default.nix b/pkgs/data/icons/numix-icon-theme-circle/default.nix index b06b6b35f37f..daf8c4410713 100644 --- a/pkgs/data/icons/numix-icon-theme-circle/default.nix +++ b/pkgs/data/icons/numix-icon-theme-circle/default.nix @@ -2,13 +2,13 @@ stdenvNoCC.mkDerivation rec { pname = "numix-icon-theme-circle"; - version = "23.07.08"; + version = "23.07.21"; src = fetchFromGitHub { owner = "numixproject"; repo = pname; rev = version; - sha256 = "sha256-JToou95HIrfqdT0IVh0colgGFXq3GR2D3FQU0Qc57Y4="; + sha256 = "sha256-QwbjJ38fWRkzd1nmsPWcwUQ7p96S/tGEvIfhLsOX1bg="; }; nativeBuildInputs = [ gtk3 ]; From 180244b902cab4a523ddf78de825bba6ba52df46 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 26 Jul 2023 16:19:29 +0800 Subject: [PATCH 20/56] v2ray-domain-list-community: 20230717050659 -> 20230725085751 Diff: https://github.com/v2fly/domain-list-community/compare/20230717050659...20230725085751 --- pkgs/data/misc/v2ray-domain-list-community/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/misc/v2ray-domain-list-community/default.nix b/pkgs/data/misc/v2ray-domain-list-community/default.nix index a7232c08ef3c..79b8a10d7d0d 100644 --- a/pkgs/data/misc/v2ray-domain-list-community/default.nix +++ b/pkgs/data/misc/v2ray-domain-list-community/default.nix @@ -3,12 +3,12 @@ let generator = pkgsBuildBuild.buildGoModule rec { pname = "v2ray-domain-list-community"; - version = "20230717050659"; + version = "20230725085751"; src = fetchFromGitHub { owner = "v2fly"; repo = "domain-list-community"; rev = version; - hash = "sha256-HmP5V02TUL48vlQ9bFRePV5l1J0ECszVzQ48UENDvuQ="; + hash = "sha256-4D975ASoDoXjEi0kkwsUIIT6nwOE3ggBzNUVp0ojsbQ="; }; vendorHash = "sha256-dYaGR5ZBORANKAYuPAi9i+KQn2OAGDGTZxdyVjkcVi8="; meta = with lib; { From 9e1fb1e896d899243dd78a91e49d7b9839346d01 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 26 Jul 2023 16:21:47 +0800 Subject: [PATCH 21/56] sequoia-chameleon-gnupg: 0.3.1 -> 0.3.2 Diff: https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/compare/v0.3.1...v0.3.2 --- pkgs/tools/security/sequoia-chameleon-gnupg/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix b/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix index 5487767b4a9c..95d0426729e0 100644 --- a/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix +++ b/pkgs/tools/security/sequoia-chameleon-gnupg/default.nix @@ -11,16 +11,16 @@ rustPlatform.buildRustPackage rec { pname = "sequoia-chameleon-gnupg"; - version = "0.3.1"; + version = "0.3.2"; src = fetchFromGitLab { owner = "sequoia-pgp"; repo = pname; rev = "v${version}"; - hash = "sha256-sxjWd02INP2Dr5RQR7+dHHIQkGoCx6CZmvrq9x9zVC8="; + hash = "sha256-Qe9KKZh0Zim/BdPn2aMxkH6FBOBB6zijkp5ft9YfzzU="; }; - cargoHash = "sha256-+0MLfq2Gjs4oh9bC8OEQsx0RHxlzB/HlIgyXtwzvGUY="; + cargoHash = "sha256-KuVSpbAfLVIy5YJ/8qb+Rfw1TgZkWfR+Ai9gDcf4EQ4="; nativeBuildInputs = [ rustPlatform.bindgenHook From 68c080daae66d0de3bd3929c89354128adcbcd72 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Wed, 26 Jul 2023 14:21:33 +0200 Subject: [PATCH 22/56] prismlauncher: 7.1 -> 7.2 Signed-off-by: Sefa Eyeoglu --- pkgs/games/prismlauncher/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/games/prismlauncher/default.nix b/pkgs/games/prismlauncher/default.nix index 17b6f3813a95..9df1182e1ab7 100644 --- a/pkgs/games/prismlauncher/default.nix +++ b/pkgs/games/prismlauncher/default.nix @@ -25,13 +25,13 @@ let in stdenv.mkDerivation rec { pname = "prismlauncher-unwrapped"; - version = "7.1"; + version = "7.2"; src = fetchFromGitHub { owner = "PrismLauncher"; repo = "PrismLauncher"; rev = version; - sha256 = "sha256-ri4oaeJKmvjJapUASPX10nl4JcLPjA3SgTp2EyaEPWg="; + sha256 = "sha256-RArg60S91YKp1Mt97a5JNfBEOf2cmuX4pK3VAx2WfqM="; }; nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja ]; @@ -46,7 +46,10 @@ stdenv.mkDerivation rec { hardeningEnable = [ "pie" ]; - cmakeFlags = lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] + cmakeFlags = [ + # downstream branding + "-DLauncher_BUILD_PLATFORM=nixpkgs" + ] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ] ++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ]; postUnpack = '' From e2b2395c9829ce47a9d3564de117f634e03f802e Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 26 Jul 2023 11:11:44 -0400 Subject: [PATCH 23/56] lua-language-server: 3.6.24 -> 3.6.25 Diff: https://github.com/luals/lua-language-server/compare/3.6.24...3.6.25 Changelog: https://github.com/LuaLS/lua-language-server/blob/3.6.25/changelog.md --- .../tools/language-servers/lua-language-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/language-servers/lua-language-server/default.nix b/pkgs/development/tools/language-servers/lua-language-server/default.nix index 17dd2019c813..9cf575ec5480 100644 --- a/pkgs/development/tools/language-servers/lua-language-server/default.nix +++ b/pkgs/development/tools/language-servers/lua-language-server/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "lua-language-server"; - version = "3.6.24"; + version = "3.6.25"; src = fetchFromGitHub { owner = "luals"; repo = "lua-language-server"; rev = version; - sha256 = "sha256-PjJUoh2wqXUhYNNYIu5PLk3WZoWxBvwf3NA36xEYb2I="; + sha256 = "sha256-fERsqOjuZSIPpTEAQbKZ/ZYzQENxJi8Gibb6Oi073pA="; fetchSubmodules = true; }; From c7f41225b6b7b6945fbb3845d55eb2879315a437 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 26 Jul 2023 11:33:18 -0400 Subject: [PATCH 24/56] ripdrag: 0.3.1 -> 0.3.2 Diff: https://diff.rs/ripdrag/0.3.1/0.3.2 --- pkgs/tools/misc/ripdrag/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/ripdrag/default.nix b/pkgs/tools/misc/ripdrag/default.nix index bcb7d40877f6..9e89b57f0e40 100644 --- a/pkgs/tools/misc/ripdrag/default.nix +++ b/pkgs/tools/misc/ripdrag/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "ripdrag"; - version = "0.3.1"; + version = "0.3.2"; src = fetchCrate { inherit pname version; - hash = "sha256-SSH/HCvrUvWNIqlx7F6eNMM1eGxGGg5eel/X/q1Um1g="; + hash = "sha256-vxAAAFLTIfLqYD7E/nwsHgFLhzMRF7DspIaWqAMZcXk="; }; - cargoHash = "sha256-FvStPBmyETjCaBqQK/KYHpwtqNCiY6n484E5bumdRzk="; + cargoHash = "sha256-6GKLBnG1p6iaFvnEQgfNlGpZwEG93tI256DCMLuJjOU="; nativeBuildInputs = [ pkg-config wrapGAppsHook4 ]; From 82d11a4629620e6549409533f8e12de02f431232 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 26 Jul 2023 11:34:48 -0400 Subject: [PATCH 25/56] gtree: 1.9.2 -> 1.9.3 Diff: https://github.com/ddddddO/gtree/compare/v1.9.2...v1.9.3 Changelog: https://github.com/ddddddO/gtree/releases/tag/v1.9.3 --- pkgs/tools/text/gtree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/text/gtree/default.nix b/pkgs/tools/text/gtree/default.nix index 5d18e7834dbb..2f9035bf87de 100644 --- a/pkgs/tools/text/gtree/default.nix +++ b/pkgs/tools/text/gtree/default.nix @@ -7,13 +7,13 @@ buildGoModule rec { pname = "gtree"; - version = "1.9.2"; + version = "1.9.3"; src = fetchFromGitHub { owner = "ddddddO"; repo = "gtree"; rev = "v${version}"; - hash = "sha256-RBGbFC+MOteCImPwzn2WYq5LTYF6rZEpTt1hlfHvUBw="; + hash = "sha256-cQO34m78lvgfbDf+Ok0Yo3rnou8ndGfegeIy1Z8xuPU="; }; vendorHash = "sha256-QxcDa499XV43p8fstENOtfe3iZ176R5/Ub5iovXlYIM="; From 3db4ace604682da349790abf89cbe8bc2422e418 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 26 Jul 2023 12:09:56 -0400 Subject: [PATCH 26/56] egglog: unstable-2023-07-11 -> unstable-2023-07-19 Diff: https://github.com/egraphs-good/egglog/compare/14a6fc6060c09541728ae460e0a92909fabf508f...9fe03ad35a2a975a2c9140a641ba91266b7a72ce --- .../science/logic/egglog/Cargo.lock | 80 +++++++++++++++++++ .../science/logic/egglog/default.nix | 7 +- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/logic/egglog/Cargo.lock b/pkgs/applications/science/logic/egglog/Cargo.lock index a11ce8089754..b2d8ef8a904e 100644 --- a/pkgs/applications/science/logic/egglog/Cargo.lock +++ b/pkgs/applications/science/logic/egglog/Cargo.lock @@ -249,6 +249,7 @@ name = "egglog" version = "0.1.0" dependencies = [ "clap", + "egraph-serialize", "env_logger", "glob", "hashbrown 0.14.0", @@ -265,12 +266,25 @@ dependencies = [ "ordered-float", "regex", "rustc-hash", + "serde_json", "smallvec", "symbol_table", "symbolic_expressions", "thiserror", ] +[[package]] +name = "egraph-serialize" +version = "0.1.0" +source = "git+https://github.com/egraphs-good/egraph-serialize?rev=54b1a4f1e2f2135846b084edcb495cd159839540#54b1a4f1e2f2135846b084edcb495cd159839540" +dependencies = [ + "indexmap 2.0.0", + "once_cell", + "ordered-float", + "serde", + "serde_json", +] + [[package]] name = "either" version = "1.8.1" @@ -404,6 +418,7 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ "equivalent", "hashbrown 0.14.0", + "serde", ] [[package]] @@ -438,6 +453,12 @@ dependencies = [ "either", ] +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + [[package]] name = "js-sys" version = "0.3.64" @@ -607,6 +628,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213" dependencies = [ "num-traits", + "rand", + "serde", ] [[package]] @@ -681,6 +704,25 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "rand_core", + "serde", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "serde", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -764,12 +806,50 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "serde" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.171" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" +dependencies = [ + "indexmap 2.0.0", + "itoa", + "ryu", + "serde", +] + [[package]] name = "siphasher" version = "0.3.10" diff --git a/pkgs/applications/science/logic/egglog/default.nix b/pkgs/applications/science/logic/egglog/default.nix index f3ebe9f246f5..65dbcd5a1b43 100644 --- a/pkgs/applications/science/logic/egglog/default.nix +++ b/pkgs/applications/science/logic/egglog/default.nix @@ -5,18 +5,19 @@ rustPlatform.buildRustPackage { pname = "egglog"; - version = "unstable-2023-07-11"; + version = "unstable-2023-07-19"; src = fetchFromGitHub { owner = "egraphs-good"; repo = "egglog"; - rev = "14a6fc6060c09541728ae460e0a92909fabf508f"; - hash = "sha256-1osdjd86xZHUAwvPBNxWYlkX6tKt+jI05AEVYr77YSQ="; + rev = "9fe03ad35a2a975a2c9140a641ba91266b7a72ce"; + hash = "sha256-9JeJJdZW8ecogReJzQrp3hFkK/pp/+pLxJMNREWuiyI="; }; cargoLock = { lockFile = ./Cargo.lock; outputHashes = { + "egraph-serialize-0.1.0" = "sha256-1lDaoR/1TNFW+uaf3UdfDZgXlxyAb37Ij7yky16xCG8="; "symbol_table-0.2.0" = "sha256-f9UclMOUig+N5L3ibBXou0pJ4S/CQqtaji7tnebVbis="; "symbolic_expressions-5.0.3" = "sha256-mSxnhveAItlTktQC4hM8o6TYjgtCUgkdZj7i6MR4Oeo="; }; From 1d95a7e3a2a3e093e7993bef6b561c810350893a Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 26 Jul 2023 12:16:41 -0400 Subject: [PATCH 27/56] complgen: unstable-2023-07-10 -> unstable-2023-07-20 Diff: https://github.com/adaszko/complgen/compare/6b1fbc50d56061c74e3324362b23ba5211aaff25...18ad7e5def8e9b9701a79511a23a2091baad8a9e --- pkgs/development/tools/misc/complgen/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/misc/complgen/default.nix b/pkgs/development/tools/misc/complgen/default.nix index 5dbdaf6c863b..a122a2a7ff88 100644 --- a/pkgs/development/tools/misc/complgen/default.nix +++ b/pkgs/development/tools/misc/complgen/default.nix @@ -5,16 +5,16 @@ rustPlatform.buildRustPackage { pname = "complgen"; - version = "unstable-2023-07-10"; + version = "unstable-2023-07-20"; src = fetchFromGitHub { owner = "adaszko"; repo = "complgen"; - rev = "6b1fbc50d56061c74e3324362b23ba5211aaff25"; - hash = "sha256-y94DOMW3w+/YJ4uNvEM4y/dZXZuwFPYhDuh2TOyBn8U="; + rev = "18ad7e5def8e9b9701a79511a23a2091baad8a9e"; + hash = "sha256-1nNxcYi7HrA2vcggiLC5UPTX3dmM5xgjubnX7WtCq/A="; }; - cargoHash = "sha256-fzLM1vxY1FBpw/5JDp4+VO9SVfCQCH8Et5a0WTYSHwk="; + cargoHash = "sha256-rR9wj34QUmIn5HE0k2nOa7HHO5DI+w6BbCgJ4Aelt44="; meta = with lib; { description = "Generate {bash,fish,zsh} completions from a single EBNF-like grammar"; From 2b0545b4239f35c464acb6fee0a85191bfa9df74 Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Wed, 26 Jul 2023 18:57:17 +0200 Subject: [PATCH 28/56] nixos/paperless: update URL to docs --- nixos/modules/services/misc/paperless.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/paperless.nix b/nixos/modules/services/misc/paperless.nix index 84c06bae6cd0..1845d8ad29b5 100644 --- a/nixos/modules/services/misc/paperless.nix +++ b/nixos/modules/services/misc/paperless.nix @@ -176,7 +176,7 @@ in description = lib.mdDoc '' Extra paperless config options. - See [the documentation](https://paperless-ngx.readthedocs.io/en/latest/configuration.html) + See [the documentation](https://docs.paperless-ngx.com/configuration/) for available options. Note that some options such as `PAPERLESS_CONSUMER_IGNORE_PATTERN` expect JSON values. Use `builtins.toJSON` to ensure proper quoting. From 6645ed6348b6d60d4474460cfff16d8f6d3fd33d Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Jul 2023 20:12:36 +0200 Subject: [PATCH 29/56] chromium: 115.0.5790.102 -> 115.0.5790.110 https://chromereleases.googleblog.com/2023/07/stable-channel-update-for-desktop_25.html --- .../networking/browsers/chromium/upstream-info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index a6afc2dd937c..c6e1792f07e5 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -1,8 +1,8 @@ { "stable": { - "version": "115.0.5790.102", - "sha256": "0sxhhsrn4cg9akpnb2qpn7kkgp286rh8y2mmypm2409s5grf1xh6", - "sha256bin64": "18n7xqbvcdd68856wmbrxx1f5lqj61g9cyiir9dzlfmf0a9wxvml", + "version": "115.0.5790.110", + "sha256": "0wgp44qnvmdqf2kk870ndm51rcvar36li2qq632ay4n8gfpbrm79", + "sha256bin64": "1w2jl92x78s4vxv4p1imkz7qaq51yvs0wiz2bclbjz0hjlw9akr3", "deps": { "gn": { "version": "2023-05-19", From 395b0ab0707b9f5759a10390b09e4900ad093248 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 21 Jul 2023 01:18:22 +0200 Subject: [PATCH 30/56] chromiumBeta: 115.0.5790.98 -> 116.0.5845.42 --- .../networking/browsers/chromium/upstream-info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index a6afc2dd937c..7f6a6c39c207 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -19,15 +19,15 @@ } }, "beta": { - "version": "115.0.5790.98", - "sha256": "1wbasmwdqkg5jcmzpidvzjsq2n2dr73bxz85pr8a5j4grw767gpz", - "sha256bin64": "0xbizb3d539h1cw1kj9ahd8azmkcdfjdmqb5bpp8cr21bh2qbqp5", + "version": "116.0.5845.42", + "sha256": "1fvhh8fvm0rkb41mhsh4p3bahf4fk3gixan2x1bappm3hdcixffb", + "sha256bin64": "0sxzkd9jjmc4jjjwffyzv904pb07azdq3jpnq97v9psj2d4xs4b4", "deps": { "gn": { - "version": "2023-05-19", + "version": "2023-06-09", "url": "https://gn.googlesource.com/gn", - "rev": "e9e83d9095d3234adf68f3e2866f25daf766d5c7", - "sha256": "0y07c18xskq4mclqiz3a63fz8jicz2kqridnvdhqdf75lhp61f8a" + "rev": "4bd1a77e67958fb7f6739bd4542641646f264e5d", + "sha256": "14h9jqspb86sl5lhh6q0kk2rwa9zcak63f8drp7kb3r4dx08vzsw" } } }, From 268003b217bc349487d02c596e47bc3f9a8704a1 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Wed, 26 Jul 2023 20:12:36 +0200 Subject: [PATCH 31/56] chromiumBeta: 116.0.5845.42 -> 116.0.5845.50 --- .../networking/browsers/chromium/upstream-info.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/upstream-info.json b/pkgs/applications/networking/browsers/chromium/upstream-info.json index 7f6a6c39c207..0ff34287e308 100644 --- a/pkgs/applications/networking/browsers/chromium/upstream-info.json +++ b/pkgs/applications/networking/browsers/chromium/upstream-info.json @@ -19,9 +19,9 @@ } }, "beta": { - "version": "116.0.5845.42", - "sha256": "1fvhh8fvm0rkb41mhsh4p3bahf4fk3gixan2x1bappm3hdcixffb", - "sha256bin64": "0sxzkd9jjmc4jjjwffyzv904pb07azdq3jpnq97v9psj2d4xs4b4", + "version": "116.0.5845.50", + "sha256": "0r5m2bcrh2zpl2m8wnzyl4afh8s0dh2m2fnfjf50li94694vy4jz", + "sha256bin64": "047wsszg4c23vxq93a335iymiqpy7lw5izzz4f0zk1a4sijafd59", "deps": { "gn": { "version": "2023-06-09", From 7e522a81ef99a2e7ce0b86bd2c5fd33233e464fe Mon Sep 17 00:00:00 2001 From: nikstur Date: Mon, 17 Jul 2023 17:19:44 +0200 Subject: [PATCH 32/56] nixos/tests: refactor gpg-keyring test utility --- nixos/tests/common/gpg-keyring.nix | 23 +++++++++++++++++++++++ nixos/tests/systemd-nspawn.nix | 22 +--------------------- 2 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 nixos/tests/common/gpg-keyring.nix diff --git a/nixos/tests/common/gpg-keyring.nix b/nixos/tests/common/gpg-keyring.nix new file mode 100644 index 000000000000..50b5846b0965 --- /dev/null +++ b/nixos/tests/common/gpg-keyring.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +pkgs.runCommand "gpg-keyring" { nativeBuildInputs = [ pkgs.gnupg ]; } '' + mkdir -p $out + export GNUPGHOME=$out + cat > foo < $out/pubkey.gpg +'' diff --git a/nixos/tests/systemd-nspawn.nix b/nixos/tests/systemd-nspawn.nix index bc77ee2a4d15..1a4251ef069e 100644 --- a/nixos/tests/systemd-nspawn.nix +++ b/nixos/tests/systemd-nspawn.nix @@ -1,26 +1,6 @@ import ./make-test-python.nix ({pkgs, lib, ...}: let - gpgKeyring = (pkgs.runCommand "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } '' - mkdir -p $out - export GNUPGHOME=$out - cat > foo < $out/pubkey.gpg - ''); + gpgKeyring = import ./common/gpg-keyring.nix { inherit pkgs; }; nspawnImages = (pkgs.runCommand "localhost" { buildInputs = [ pkgs.coreutils pkgs.gnupg ]; } '' mkdir -p $out From 5750660f2562b5f095c560a33b80782ac9d1aadc Mon Sep 17 00:00:00 2001 From: nikstur Date: Tue, 18 Jul 2023 11:05:16 +0200 Subject: [PATCH 33/56] nixos/tests: use sensible key type for gpg keyring If someone blindly copies this code, at least they have a sensible key type. --- nixos/tests/common/gpg-keyring.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nixos/tests/common/gpg-keyring.nix b/nixos/tests/common/gpg-keyring.nix index 50b5846b0965..fb8d07b1183e 100644 --- a/nixos/tests/common/gpg-keyring.nix +++ b/nixos/tests/common/gpg-keyring.nix @@ -6,10 +6,8 @@ pkgs.runCommand "gpg-keyring" { nativeBuildInputs = [ pkgs.gnupg ]; } '' cat > foo < Date: Mon, 17 Jul 2023 17:20:20 +0200 Subject: [PATCH 34/56] nixos/systemd-sysupdate: init --- .../manual/release-notes/rl-2311.section.md | 1 + nixos/modules/module-list.nix | 1 + .../modules/system/boot/systemd/sysupdate.nix | 142 ++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 nixos/modules/system/boot/systemd/sysupdate.nix diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index d8faa5e11dbe..add72886e186 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -34,6 +34,7 @@ - [ebusd](https://ebusd.eu), a daemon for handling communication with eBUS devices connected to a 2-wire bus system (“energy bus” used by numerous heating systems). Available as [services.ebusd](#opt-services.ebusd.enable). +- [systemd-sysupdate](https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html), atomically updates the host OS, container images, portable service images or other sources. Available as [systemd.sysupdate](opt-systemd.sysupdate). ## Backward Incompatibilities {#sec-release-23.11-incompatibilities} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index d1de6da182d2..f7acbb59dc2c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1398,6 +1398,7 @@ ./system/boot/systemd/oomd.nix ./system/boot/systemd/repart.nix ./system/boot/systemd/shutdown.nix + ./system/boot/systemd/sysupdate.nix ./system/boot/systemd/tmpfiles.nix ./system/boot/systemd/user.nix ./system/boot/systemd/userdbd.nix diff --git a/nixos/modules/system/boot/systemd/sysupdate.nix b/nixos/modules/system/boot/systemd/sysupdate.nix new file mode 100644 index 000000000000..2921e97f7560 --- /dev/null +++ b/nixos/modules/system/boot/systemd/sysupdate.nix @@ -0,0 +1,142 @@ +{ config, lib, pkgs, utils, ... }: + +let + cfg = config.systemd.sysupdate; + + format = pkgs.formats.ini { }; + + listOfDefinitions = lib.mapAttrsToList + (name: format.generate "${name}.conf") + (lib.filterAttrs (k: _: !(lib.hasPrefix "_" k)) cfg.transfers); + + definitionsDirectory = pkgs.runCommand "sysupdate.d" { } '' + mkdir -p $out + ${(lib.concatStringsSep "\n" + (map (pkg: "cp ${pkg} $out/${pkg.name}") listOfDefinitions) + )} + ''; +in +{ + options.systemd.sysupdate = { + + enable = lib.mkEnableOption (lib.mdDoc "systemd-sysupdate") // { + description = lib.mdDoc '' + Atomically update the host OS, container images, portable service + images or other sources. + + If enabled, updates are triggered in regular intervals via a + `systemd.timer` unit. + + Please see + + for more details. + ''; + }; + + timerConfig = utils.systemdUtils.unitOptions.timerOptions.options.timerConfig // { + default = { }; + description = lib.mdDoc '' + The timer configuration for performing the update. + + By default, the upstream configuration is used: + + ''; + }; + + reboot = { + enable = lib.mkEnableOption (lib.mdDoc "automatically rebooting after an update") // { + description = lib.mdDoc '' + Whether to automatically reboot after an update. + + If set to `true`, the system will automatically reboot via a + `systemd.timer` unit but only after a new version was installed. + + This uses a unit completely separate from the one performing the + update because it is typically advisable to download updates + regularly while the system is up, but delay reboots until the + appropriate time (i.e. typically at night). + + Set this to `false` if you do not want to reboot after an update. This + is useful when you update a container image or another source where + rebooting is not necessary in order to finalize the update. + ''; + }; + + timerConfig = utils.systemdUtils.unitOptions.timerOptions.options.timerConfig // { + default = { }; + description = lib.mdDoc '' + The timer configuration for rebooting after an update. + + By default, the upstream configuration is used: + + ''; + }; + }; + + transfers = lib.mkOption { + type = with lib.types; attrsOf format.type; + default = { }; + example = { + "10-uki.conf" = { + Transfer = { + ProtectVersion = "%A"; + }; + + Source = { + Type = "url-file"; + Path = "https://download.example.com/"; + MatchPattern = "nixos_@v.efi.xz"; + }; + + Target = { + Type = "regular-file"; + Path = "/EFI/Linux"; + PathRelativeTo = "boot"; + MatchPattern = '' + nixos_@v+@l-@d.efi"; \ + nixos_@v+@l.efi \ + nixos_@v.efi + ''; + Mode = "0444"; + TriesLeft = 3; + TriesDone = 0; + InstancesMax = 2; + }; + }; + }; + description = lib.mdDoc '' + Specify transfers as a set of the names of the transfer files as the + key and the configuration as its value. The configuration can use all + upstream options. See + + for all available options. + ''; + }; + + }; + + config = lib.mkIf cfg.enable { + + systemd.additionalUpstreamSystemUnits = [ + "systemd-sysupdate.service" + "systemd-sysupdate.timer" + "systemd-sysupdate-reboot.service" + "systemd-sysupdate-reboot.timer" + ]; + + systemd.timers = { + "systemd-sysupdate" = { + wantedBy = [ "timers.target" ]; + timerConfig = cfg.timerConfig; + }; + "systemd-sysupdate-reboot" = lib.mkIf cfg.reboot.enable { + wantedBy = [ "timers.target" ]; + timerConfig = cfg.reboot.timerConfig; + }; + }; + + environment.etc."sysupdate.d".source = definitionsDirectory; + }; + + meta.maintainers = with lib.maintainers; [ nikstur ]; +} From e6862fae8fde54eba7e50367fd8a0ff7ebbfc1f3 Mon Sep 17 00:00:00 2001 From: nikstur Date: Mon, 17 Jul 2023 17:20:32 +0200 Subject: [PATCH 35/56] nixos/tests/systemd-sysupdate: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-sysupdate.nix | 66 +++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 nixos/tests/systemd-sysupdate.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9ab0bfb21f4a..c9ce2ebe91f3 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -772,6 +772,7 @@ in { systemd-portabled = handleTest ./systemd-portabled.nix {}; systemd-repart = handleTest ./systemd-repart.nix {}; systemd-shutdown = handleTest ./systemd-shutdown.nix {}; + systemd-sysupdate = runTest ./systemd-sysupdate.nix; systemd-timesyncd = handleTest ./systemd-timesyncd.nix {}; systemd-user-tmpfiles-rules = handleTest ./systemd-user-tmpfiles-rules.nix {}; systemd-misc = handleTest ./systemd-misc.nix {}; diff --git a/nixos/tests/systemd-sysupdate.nix b/nixos/tests/systemd-sysupdate.nix new file mode 100644 index 000000000000..37811605dbb2 --- /dev/null +++ b/nixos/tests/systemd-sysupdate.nix @@ -0,0 +1,66 @@ +# Tests downloading a signed update aritfact from a server to a target machine. +# This test does not rely on the `systemd.timer` units provided by the +# `systemd-sysupdate` module but triggers the `systemd-sysupdate` service +# manually to make the test more robust. + +{ lib, pkgs, ... }: + +let + gpgKeyring = import ./common/gpg-keyring.nix { inherit pkgs; }; +in +{ + name = "systemd-sysupdate"; + + meta.maintainers = with lib.maintainers; [ nikstur ]; + + nodes = { + server = { pkgs, ... }: { + networking.firewall.enable = false; + services.nginx = { + enable = true; + virtualHosts."server" = { + root = pkgs.runCommand "sysupdate-artifacts" { buildInputs = [ pkgs.gnupg ]; } '' + mkdir -p $out + cd $out + + echo "nixos" > nixos_1.efi + sha256sum nixos_1.efi > SHA256SUMS + + export GNUPGHOME="$(mktemp -d)" + cp -R ${gpgKeyring}/* $GNUPGHOME + + gpg --batch --sign --detach-sign --output SHA256SUMS.gpg SHA256SUMS + ''; + }; + }; + }; + + target = { + systemd.sysupdate = { + enable = true; + transfers = { + "uki" = { + Source = { + Type = "url-file"; + Path = "http://server/"; + MatchPattern = "nixos_@v.efi"; + }; + Target = { + Path = "/boot/EFI/Linux"; + MatchPattern = "nixos_@v.efi"; + }; + }; + }; + }; + + environment.etc."systemd/import-pubring.gpg".source = "${gpgKeyring}/pubkey.gpg"; + }; + }; + + testScript = '' + server.wait_for_unit("nginx.service") + + target.succeed("systemctl start systemd-sysupdate") + assert "nixos" in target.wait_until_succeeds("cat /boot/EFI/Linux/nixos_1.efi", timeout=5) + ''; +} From 5d6724abe9544cb0a686477907e5a84219656e42 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 18:33:35 +0000 Subject: [PATCH 36/56] taproot-assets: 0.2.2 -> 0.2.3 --- pkgs/applications/blockchains/taproot-assets/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/taproot-assets/default.nix b/pkgs/applications/blockchains/taproot-assets/default.nix index 80cc3dbfebbe..602025e60a88 100644 --- a/pkgs/applications/blockchains/taproot-assets/default.nix +++ b/pkgs/applications/blockchains/taproot-assets/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "taproot-assets"; - version = "0.2.2"; + version = "0.2.3"; src = fetchFromGitHub { owner = "lightninglabs"; repo = "taproot-assets"; rev = "v${version}"; - hash = "sha256-DOtCnPnS5Oq5B4xaYmNCXxMYJ9fhPZ11OfPKXH7eKUg="; + hash = "sha256-nTgIoYajpnlEvyXPcwXbm/jOfG+C83TTZiPmoB2kK24="; }; vendorHash = "sha256-fc++0M7Mnn1nJOkV2gzAVRQCp3vOqsO2OQNlOKaMmB4="; From 10ac51d64a879f3a80872f17a887144271002d47 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Jul 2023 21:23:36 +0200 Subject: [PATCH 37/56] python311Packages.opower: 0.0.14 -> 0.0.15 Diff: https://github.com/tronikos/opower/compare/refs/tags/v0.0.14...v0.0.15 --- pkgs/development/python-modules/opower/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/opower/default.nix b/pkgs/development/python-modules/opower/default.nix index 26342ab42db3..37553cf69ea3 100644 --- a/pkgs/development/python-modules/opower/default.nix +++ b/pkgs/development/python-modules/opower/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "opower"; - version = "0.0.14"; + version = "0.0.15"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "tronikos"; repo = "opower"; rev = "refs/tags/v${version}"; - hash = "sha256-eTlFb/v88jaEzx5H8ofHMNkqPunDvXcXGvg5ThripeA="; + hash = "sha256-hSwKdxtWgxJCdKk9tw7iCBC7I4buxbRfx4GRwyym6rg="; }; pythonRemoveDeps = [ From 333deffb954efc77b54d6bd98f8fb510423bbfe6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Jul 2023 21:26:18 +0200 Subject: [PATCH 38/56] python311Packages.pydeps: 1.12.12 -> 1.12.13 Diff: https://github.com/thebjorn/pydeps/compare/refs/tags/v1.12.12...v1.12.13 Changelog: https://github.com/thebjorn/pydeps/releases/tag/v1.12.13 --- pkgs/development/python-modules/pydeps/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pydeps/default.nix b/pkgs/development/python-modules/pydeps/default.nix index c86c7b376c64..faa85f6f4a85 100644 --- a/pkgs/development/python-modules/pydeps/default.nix +++ b/pkgs/development/python-modules/pydeps/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "pydeps"; - version = "1.12.12"; + version = "1.12.13"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "thebjorn"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-upqlLEGxetkFiwHuwwf7c2wbqrXQcRSamRszYUTsyNk="; + hash = "sha256-n4FmMqpCqxPmGJokfaxnruG9d5oodv6Yfg80Y1EIr34="; }; buildInputs = [ From b4e9902f16fe44ead545e766725f06ee4a7b3078 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Jul 2023 21:26:54 +0200 Subject: [PATCH 39/56] python311Packages.python-otbr-api: 2.2.0 -> 2.3.0 Diff: https://github.com/home-assistant-libs/python-otbr-api/compare/refs/tags/2.2.0...2.3.0 Changelog: https://github.com/home-assistant-libs/python-otbr-api/releases/tag/2.3.0 --- pkgs/development/python-modules/python-otbr-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-otbr-api/default.nix b/pkgs/development/python-modules/python-otbr-api/default.nix index 74a0d8deb09f..389e8a5df98c 100644 --- a/pkgs/development/python-modules/python-otbr-api/default.nix +++ b/pkgs/development/python-modules/python-otbr-api/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "python-otbr-api"; - version = "2.2.0"; + version = "2.3.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "home-assistant-libs"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-jozMYrmXHSykv5npboyySuVDs1Lamlee15ZPYI4zmO4="; + hash = "sha256-oLqgjTuC5rpAzXTJO+KFn+uQ0TV7rNPWHOAJtRI4otk="; }; nativeBuildInputs = [ From 7549fa7141e28e83dbfd96cc61ed038ac56bb470 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Jul 2023 21:35:53 +0200 Subject: [PATCH 40/56] python311Packages.pyunifiprotect: 4.10.5 -> 4.10.6 Diff: https://github.com/briis/pyunifiprotect/compare/refs/tags/v4.10.5...v4.10.6 Changelog: https://github.com/AngellusMortis/pyunifiprotect/releases/tag/v4.10.6 --- pkgs/development/python-modules/pyunifiprotect/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyunifiprotect/default.nix b/pkgs/development/python-modules/pyunifiprotect/default.nix index e2c02fcc559e..e9ec506d6d4b 100644 --- a/pkgs/development/python-modules/pyunifiprotect/default.nix +++ b/pkgs/development/python-modules/pyunifiprotect/default.nix @@ -31,7 +31,7 @@ buildPythonPackage rec { pname = "pyunifiprotect"; - version = "4.10.5"; + version = "4.10.6"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -40,7 +40,7 @@ buildPythonPackage rec { owner = "briis"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-BrdffDuPTn/uFKT9F0pF1+0/MraIPRwsN64DdseQdQA="; + hash = "sha256-vO60QMr+J3tE7ZIU7fZP27jMuPeCJH56Hbhjek5ZfXI="; }; postPatch = '' From ceb5508635f7309a5edb856669af87d191fe55d8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 20:08:09 +0000 Subject: [PATCH 41/56] python311Packages.types-pyopenssl: 23.2.0.1 -> 23.2.0.2 --- pkgs/development/python-modules/types-pyopenssl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/types-pyopenssl/default.nix b/pkgs/development/python-modules/types-pyopenssl/default.nix index 655e96f2e3f9..76691b13b12e 100644 --- a/pkgs/development/python-modules/types-pyopenssl/default.nix +++ b/pkgs/development/python-modules/types-pyopenssl/default.nix @@ -6,13 +6,13 @@ buildPythonPackage rec { pname = "types-pyopenssl"; - version = "23.2.0.1"; + version = "23.2.0.2"; format = "setuptools"; src = fetchPypi { pname = "types-pyOpenSSL"; inherit version; - hash = "sha256-vutdInBMYloeS23HVjVcW0rwuYATi3AqnZ+TKs8CCQM="; + hash = "sha256-agENrJ7NQrWC190sw+nkBIa3mztkuy//uhR0/5avkG0="; }; propagatedBuildInputs = [ From 40f8d8b2569f11e0be3f734efd74f5e5e0b96ab5 Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Fri, 21 Apr 2023 00:39:40 -0400 Subject: [PATCH 42/56] jsoncpp: fix enableStatic The workaround is no longer needed for static builds. --- pkgs/development/libraries/jsoncpp/default.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/jsoncpp/default.nix b/pkgs/development/libraries/jsoncpp/default.nix index 41e9a2d0a03a..59572afc627c 100644 --- a/pkgs/development/libraries/jsoncpp/default.nix +++ b/pkgs/development/libraries/jsoncpp/default.nix @@ -40,19 +40,13 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" "-DBUILD_OBJECT_LIBS=OFF" "-DJSONCPP_WITH_CMAKE_PACKAGE=ON" + "-DBUILD_STATIC_LIBS=${if enableStatic then "ON" else "OFF"}" ] # the test's won't compile if secureMemory is used because there is no # comparison operators and conversion functions between # std::basic_string<..., Json::SecureAllocator> vs. # std::basic_string<..., [default allocator]> - ++ lib.optional ((stdenv.buildPlatform != stdenv.hostPlatform) || secureMemory) "-DJSONCPP_WITH_TESTS=OFF" - ++ lib.optional (!enableStatic) "-DBUILD_STATIC_LIBS=OFF"; - - # this is fixed and no longer necessary in 1.9.5 but there they use - # memset_s without switching to a different c++ standard in the cmake files - postInstall = lib.optionalString enableStatic '' - (cd $out/lib && ln -sf libjsoncpp_static.a libjsoncpp.a) - ''; + ++ lib.optional ((stdenv.buildPlatform != stdenv.hostPlatform) || secureMemory) "-DJSONCPP_WITH_TESTS=OFF"; meta = with lib; { homepage = "https://github.com/open-source-parsers/jsoncpp"; From 6ba492309955660d400e13d45dc3b35da7ed3943 Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Mon, 24 Apr 2023 23:37:26 -0400 Subject: [PATCH 43/56] libevent: fix sslSupport = false --- pkgs/development/libraries/libevent/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libevent/default.nix b/pkgs/development/libraries/libevent/default.nix index bd5edec68a06..782d86f1f581 100644 --- a/pkgs/development/libraries/libevent/default.nix +++ b/pkgs/development/libraries/libevent/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { }) ]; + configureFlags = lib.optional (!sslSupport) "--disable-openssl"; + preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' MACOSX_DEPLOYMENT_TARGET=10.16 ''; From 85888a1298b3560579a3f5e98995c7e66e210fc9 Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Mon, 24 Apr 2023 23:39:59 -0400 Subject: [PATCH 44/56] tclap: add 1.4 variant --- .../libraries/tclap/{default.nix => 1.2.nix} | 0 pkgs/development/libraries/tclap/1.4.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 6 ++- 3 files changed, 53 insertions(+), 1 deletion(-) rename pkgs/development/libraries/tclap/{default.nix => 1.2.nix} (100%) create mode 100644 pkgs/development/libraries/tclap/1.4.nix diff --git a/pkgs/development/libraries/tclap/default.nix b/pkgs/development/libraries/tclap/1.2.nix similarity index 100% rename from pkgs/development/libraries/tclap/default.nix rename to pkgs/development/libraries/tclap/1.2.nix diff --git a/pkgs/development/libraries/tclap/1.4.nix b/pkgs/development/libraries/tclap/1.4.nix new file mode 100644 index 000000000000..7a0b57659633 --- /dev/null +++ b/pkgs/development/libraries/tclap/1.4.nix @@ -0,0 +1,48 @@ +{ lib +, stdenv +, fetchgit +, cmake +, doxygen +, python3 +}: +stdenv.mkDerivation { + pname = "tclap"; + + # This version is slightly newer than 1.4.0-rc1: + # See https://github.com/mirror/tclap/compare/1.4.0-rc1..3feeb7b2499b37d9cb80890cadaf7c905a9a50c6 + version = "1.4-3feeb7b"; + + src = fetchgit { + url = "git://git.code.sf.net/p/tclap/code"; + rev = "3feeb7b2499b37d9cb80890cadaf7c905a9a50c6"; # 1.4 branch + hash = "sha256-byLianB6Vf+I9ABMmsmuoGU2o5RO9c5sMckWW0F+GDM="; + }; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR} + substituteInPlace packaging/pkgconfig.pc.in \ + --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@ + ''; + + nativeBuildInputs = [ + cmake + doxygen + python3 + ]; + + # Installing docs is broken in this package+version so we stub out some files + preInstall = '' + touch docs/manual.html + ''; + + doCheck = true; + + meta = with lib; { + description = "Templatized C++ Command Line Parser Library (v1.4)"; + homepage = "https://tclap.sourceforge.net/"; + license = licenses.mit; + maintainers = teams.deshaw.members; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 523be31c5a0b..38c00cfc82b5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24858,7 +24858,11 @@ with pkgs; taskflow = callPackage ../development/libraries/taskflow { }; - tclap = callPackage ../development/libraries/tclap { }; + tclap = tclap_1_2; + + tclap_1_2 = callPackage ../development/libraries/tclap/1.2.nix { }; + + tclap_1_4 = callPackage ../development/libraries/tclap/1.4.nix { }; tcllib = callPackage ../development/libraries/tcllib { }; From 65497764e8e176901560c9adf576e1fefc979b8f Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Tue, 11 Jul 2023 17:59:32 -0400 Subject: [PATCH 45/56] cudatoolkit: fix builds for 10.* libnvrtc.so is not found in the same location in all versions of cudatoolkit. --- pkgs/development/compilers/cudatoolkit/common.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/cudatoolkit/common.nix b/pkgs/development/compilers/cudatoolkit/common.nix index 2e15012452a8..8037bd2a2aca 100644 --- a/pkgs/development/compilers/cudatoolkit/common.nix +++ b/pkgs/development/compilers/cudatoolkit/common.nix @@ -177,7 +177,9 @@ backendStdenv.mkDerivation rec { "libcom_err.so.2" ]; - preFixup = '' + preFixup = if lib.versionOlder version "11" then '' + patchelf $out/targets/*/lib/libnvrtc.so --add-needed libnvrtc-builtins.so + '' else '' patchelf $out/lib64/libnvrtc.so --add-needed libnvrtc-builtins.so ''; From 5ba94f8629027423cee3d60458f524ea8abc493e Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Tue, 11 Jul 2023 18:22:42 -0400 Subject: [PATCH 46/56] cudatoolkit: fix build for 12.0.1 Many Qt dependencies were added only for 12.1 and above, but 12.0.1 also needs them. --- pkgs/development/compilers/cudatoolkit/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/cudatoolkit/common.nix b/pkgs/development/compilers/cudatoolkit/common.nix index 8037bd2a2aca..eba730b3a9cf 100644 --- a/pkgs/development/compilers/cudatoolkit/common.nix +++ b/pkgs/development/compilers/cudatoolkit/common.nix @@ -132,7 +132,7 @@ backendStdenv.mkDerivation rec { ucx xorg.libxshmfence xorg.libxkbfile - ] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([ + ] ++ (lib.optionals (lib.versionAtLeast version "12") (map lib.getLib ([ # Used by `/target-linux-x64/CollectX/clx` and `/target-linux-x64/CollectX/libclx_api.so` for: # - `libcurl.so.4` curlMinimal From 1cdc3752a5f06c0891ac326fc934c87dd2aa30ca Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Mon, 24 Apr 2023 23:42:44 -0400 Subject: [PATCH 47/56] dcgm: init at 3.1.8 --- pkgs/os-specific/linux/dcgm/default.nix | 147 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 149 insertions(+) create mode 100644 pkgs/os-specific/linux/dcgm/default.nix diff --git a/pkgs/os-specific/linux/dcgm/default.nix b/pkgs/os-specific/linux/dcgm/default.nix new file mode 100644 index 000000000000..36c7e3ca6880 --- /dev/null +++ b/pkgs/os-specific/linux/dcgm/default.nix @@ -0,0 +1,147 @@ +{ lib +, callPackage +, gcc11Stdenv +, fetchFromGitHub +, addOpenGLRunpath +, catch2 +, cmake +, cudaPackages_10_2 +, cudaPackages_11_8 +, cudaPackages_12 +, fmt_9 +, git +, jsoncpp +, libevent +, plog +, python3 +, symlinkJoin +, tclap_1_4 +, yaml-cpp +}: +let + # Flags copied from DCGM's libevent build script + libevent-nossl = libevent.override { sslSupport = false; }; + libevent-nossl-static = libevent-nossl.overrideAttrs (super: { + CFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; + CXXFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC"; + configureFlags = super.configureFlags ++ [ "--disable-shared" "--with-pic" ]; + }); + + jsoncpp-static = jsoncpp.override { enableStatic = true; }; + + # DCGM depends on 3 different versions of CUDA at the same time. + # The runtime closure, thankfully, is quite small because most things + # are statically linked. + cudaPackageSetByVersion = [ + { + version = "10"; + # Nixpkgs cudaPackages_10 doesn't have redist packages broken out. + pkgSet = [ + cudaPackages_10_2.cudatoolkit + cudaPackages_10_2.cudatoolkit.lib + ]; + } + { + version = "11"; + pkgSet = getCudaPackages cudaPackages_11_8; + } + { + version = "12"; + pkgSet = getCudaPackages cudaPackages_12; + } + ]; + + # Select needed redist packages from cudaPackages + # C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/scripts/0080_cuda.sh#L24-L39 + getCudaPackages = p: with p; [ + cuda_cccl + cuda_cudart + cuda_nvcc + cuda_nvml_dev + libcublas + libcufft + libcurand + ]; + + # Builds CMake code to add CUDA paths for include and lib. + mkAppendCudaPaths = { version, pkgSet }: + let + # The DCGM CMake assumes that the folder containing cuda.h contains all headers, so we must + # combine everything together for headers to work. + # It would be more convenient to use symlinkJoin on *just* the include subdirectories + # of each package, but not all of them have an include directory and making that work + # is more effort than it's worth for this temporary, build-time package. + combined = symlinkJoin { + name = "cuda-combined-${version}"; + paths = pkgSet; + }; + # The combined package above breaks the build for some reason so we just configure + # each package's library path. + libs = lib.concatMapStringsSep " " (x: ''"${x}/lib"'') pkgSet; + in '' + list(APPEND Cuda${version}_INCLUDE_PATHS "${combined}/include") + list(APPEND Cuda${version}_LIB_PATHS ${libs}) + ''; + +# gcc11 is required by DCGM's very particular build system +# C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/build.sh#L22 +in gcc11Stdenv.mkDerivation rec { + pname = "dcgm"; + version = "3.1.8"; + + src = fetchFromGitHub { + owner = "NVIDIA"; + repo = "DCGM"; + rev = "refs/tags/v${version}"; + hash = "sha256-OXqXkP2ZUNPzafGIgJ0MKa39xB84keVFFYl+JsHgnks="; + }; + + # Add our paths to the CUDA paths so FindCuda.cmake can find them. + EXTRA_CUDA_PATHS = lib.concatMapStringsSep "\n" mkAppendCudaPaths cudaPackageSetByVersion; + prePatch = '' + echo "$EXTRA_CUDA_PATHS"$'\n'"$(cat cmake/FindCuda.cmake)" > cmake/FindCuda.cmake + ''; + + hardeningDisable = [ "all" ]; + + nativeBuildInputs = [ + addOpenGLRunpath + cmake + git + python3 + + jsoncpp-static + jsoncpp-static.dev + libevent-nossl-static + libevent-nossl-static.dev + plog.dev # header-only + tclap_1_4 # header-only + ]; + + buildInputs = [ + catch2 + fmt_9 + yaml-cpp + ]; + + # libcuda.so must be found at runtime because it is supplied by the NVIDIA + # driver. autoAddOpenGLRunpathHook breaks on the statically linked exes. + postFixup = '' + find "$out/bin" "$out/lib" -type f -executable -print0 | while IFS= read -r -d "" f; do + if isELF "$f" && [[ $(patchelf --print-needed "$f" || true) == *libcuda.so* ]]; then + addOpenGLRunpath "$f" + fi + done + ''; + + disallowedReferences = lib.concatMap (x: x.pkgSet) cudaPackageSetByVersion; + + meta = with lib; { + description = "Data Center GPU Manager (DCGM) is a daemon that allows users to monitor NVIDIA data-center GPUs."; + homepage = "https://developer.nvidia.com/dcgm"; + license = licenses.asl20; + maintainers = teams.deshaw.members; + mainProgram = "dcgmi"; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38c00cfc82b5..aff829e92770 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -541,6 +541,8 @@ with pkgs; dbip-country-lite = callPackage ../data/misc/dbip-country-lite { }; + dcgm = callPackage ../os-specific/linux/dcgm { }; + dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { }; dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { }; From b25101f159010487c512c14ddde689dca253111d Mon Sep 17 00:00:00 2001 From: Elliot Cameron Date: Tue, 30 May 2023 12:05:23 -0400 Subject: [PATCH 48/56] prometheus-dcgm-exporter: init at 3.1.8-3.1.5 --- .../prometheus/dcgm-exporter/default.nix | 66 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix diff --git a/pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix b/pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix new file mode 100644 index 000000000000..173a978cf2eb --- /dev/null +++ b/pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix @@ -0,0 +1,66 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, cudaPackages +, dcgm +, linuxPackages +}: +buildGoModule rec { + pname = "dcgm-exporter"; + version = "3.1.8-3.1.5"; + + src = fetchFromGitHub { + owner = "NVIDIA"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-Jzv3cU3gmGIXV+DV3wV/1zSWwz18s3Jax6JC7WZW7Z4="; + }; + + # Upgrade to go 1.17 during the vendoring FOD build because it fails otherwise. + overrideModAttrs = _: { + preBuild = '' + substituteInPlace go.mod --replace 'go 1.16' 'go 1.17' + go mod tidy + ''; + postInstall = '' + cp go.mod "$out/go.mod" + ''; + }; + + CGO_LDFLAGS = "-ldcgm"; + + buildInputs = [ + dcgm + ]; + + # gonvml and go-dcgm do not work with ELF BIND_NOW hardening because not all + # symbols are available on startup. + hardeningDisable = [ "bindnow" ]; + + # Copy the modified go.mod we got from the vendoring process. + preBuild = '' + cp vendor/go.mod go.mod + ''; + + vendorHash = "sha256-KMCV79kUY1sNYysH0MmB7pVU98r7v+DpLIoYHxyyG4U="; + + nativeBuildInputs = [ + cudaPackages.autoAddOpenGLRunpathHook + ]; + + # Tests try to interact with running DCGM service. + doCheck = false; + + postFixup = '' + patchelf --add-needed libnvidia-ml.so "$out/bin/dcgm-exporter" + ''; + + meta = with lib; { + description = "NVIDIA GPU metrics exporter for Prometheus leveraging DCGM"; + homepage = "https://github.com/NVIDIA/dcgm-exporter"; + license = licenses.asl20; + maintainers = teams.deshaw.members; + mainProgram = "dcgm-exporter"; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aff829e92770..f7e722a875fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26693,6 +26693,7 @@ with pkgs; prometheus-cloudflare-exporter = callPackage ../servers/monitoring/prometheus/cloudflare-exporter.nix { }; prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { }; prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { }; + prometheus-dcgm-exporter = callPackage ../servers/monitoring/prometheus/dcgm-exporter { }; prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { }; prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { }; prometheus-domain-exporter = callPackage ../servers/monitoring/prometheus/domain-exporter.nix { }; From a49673ce17bed5d18aee299eb753fe9e281761f9 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 26 Jul 2023 22:28:47 +0200 Subject: [PATCH 49/56] babeld: 1.13 -> 1.13.1 https://alioth-lists.debian.net/pipermail/babel-users/2023-July/004125.html --- pkgs/tools/networking/babeld/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/babeld/default.nix b/pkgs/tools/networking/babeld/default.nix index e0f1b2ab2550..64f6cc4eca44 100644 --- a/pkgs/tools/networking/babeld/default.nix +++ b/pkgs/tools/networking/babeld/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "babeld"; - version = "1.13"; + version = "1.13.1"; src = fetchurl { url = "https://www.irif.fr/~jch/software/files/${pname}-${version}.tar.gz"; - hash = "sha256-0IXMzPsGoR1/pbVMUdnEEPXzsKk4n1hJUTNv8Xjyk7g="; + hash = "sha256-FfJNJtoMz8Bzq83vAwnygeRoTyqnESb4JlcsTIRejdk="; }; outputs = [ From 34e29d0b4d4bf0e4fcf68687b56904c21b031840 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 26 Jul 2023 22:41:34 +0200 Subject: [PATCH 50/56] python310Packages.faster-whisper: 0.7.0 -> 0.7.1 https://github.com/guillaumekln/faster-whisper/releases/tag/v0.7.1 --- pkgs/development/python-modules/faster-whisper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/faster-whisper/default.nix b/pkgs/development/python-modules/faster-whisper/default.nix index 4dc36fd5fc24..563c4b7e4f48 100644 --- a/pkgs/development/python-modules/faster-whisper/default.nix +++ b/pkgs/development/python-modules/faster-whisper/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "faster-whisper"; - version = "0.7.0"; + version = "0.7.1"; format = "setuptools"; src = fetchFromGitHub { owner = "guillaumekln"; repo = "faster-whisper"; rev = "v${version}"; - hash = "sha256-p8BJ+Bdvn+AQSUS6b2GeYNh2l4KXfPx3o0kImu7xVgw="; + hash = "sha256-NTk0S+dMChygnC7Wix62AFO4NNSPJuKXyqoEyWiQhII="; }; postPatch = '' From 636c5418b64ffd376bab51d3ee30f64cb0d4abf4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 20:56:20 +0000 Subject: [PATCH 51/56] python310Packages.flux-led: 1.0.0 -> 1.0.1 --- pkgs/development/python-modules/flux-led/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/flux-led/default.nix b/pkgs/development/python-modules/flux-led/default.nix index ed879a2af8a4..cdb7fd1ea9e1 100644 --- a/pkgs/development/python-modules/flux-led/default.nix +++ b/pkgs/development/python-modules/flux-led/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "flux-led"; - version = "1.0.0"; + version = "1.0.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = "Danielhiversen"; repo = "flux_led"; rev = "refs/tags/${version}"; - hash = "sha256-QQz4wWfCMqNzu2QMoF0nfAKcMyvUHKTMsNVGt+7zkpE="; + hash = "sha256-+eklvdmlWrwvdI6IwNyAIEI0kDlzIYh7bzNY94dzA+E="; }; propagatedBuildInputs = [ From 2af539475505c4afb9337324c2552d846badbdab Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 10 May 2023 12:04:54 -0500 Subject: [PATCH 52/56] kubernetes-helm-wrapped: expose passthru.pluginsDir --- pkgs/applications/networking/cluster/helm/wrapper.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/cluster/helm/wrapper.nix b/pkgs/applications/networking/cluster/helm/wrapper.nix index b9322290920e..3b13668abf68 100644 --- a/pkgs/applications/networking/cluster/helm/wrapper.nix +++ b/pkgs/applications/networking/cluster/helm/wrapper.nix @@ -31,7 +31,10 @@ in preferLocalBuild = true; nativeBuildInputs = [ makeWrapper ]; - passthru = { unwrapped = helm; }; + passthru = { + inherit pluginsDir; + unwrapped = helm; + }; meta = helm.meta // { # To prevent builds on hydra From 27dab305a66d22b8f8b9a844abd5afb2af335783 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 10 May 2023 12:05:23 -0500 Subject: [PATCH 53/56] helmfile: set HELM_PLUGINS if pluginsDir is given --- .../networking/cluster/helmfile/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/helmfile/default.nix b/pkgs/applications/networking/cluster/helmfile/default.nix index 38bb84d77620..ad50617e9e65 100644 --- a/pkgs/applications/networking/cluster/helmfile/default.nix +++ b/pkgs/applications/networking/cluster/helmfile/default.nix @@ -1,4 +1,10 @@ -{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +, makeWrapper +, pluginsDir ? null +}: buildGoModule rec { pname = "helmfile"; @@ -19,9 +25,14 @@ buildGoModule rec { ldflags = [ "-s" "-w" "-X go.szostok.io/version.version=v${version}" ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = + [ installShellFiles ] ++ + lib.optional (pluginsDir != null) makeWrapper; - postInstall = '' + postInstall = lib.optionalString (pluginsDir != null) '' + wrapProgram $out/bin/helmfile \ + --set HELM_PLUGINS "${pluginsDir}" + '' + '' installShellCompletion --cmd helmfile \ --bash <($out/bin/helmfile completion bash) \ --fish <($out/bin/helmfile completion fish) \ From 8c068dfddb151976b02bd6c29a55e3023c53af84 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 15 Jun 2023 12:16:37 -0500 Subject: [PATCH 54/56] helmfile-wrapped: init nixos/doc/manual: add release notes for helmfile-wrapped --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index add72886e186..750ee6d157b3 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -142,6 +142,8 @@ The module update takes care of the new config syntax and the data itself (user - `programs.gnupg.agent.pinentryFlavor` is now set in `/etc/gnupg/gpg-agent.conf`, and will no longer take precedence over a `pinentry-program` set in `~/.gnupg/gpg-agent.conf`. +- `wrapHelm` now exposes `passthru.pluginsDir` which can be passed to `helmfile`. For convenience, a top-level package `helmfile-wrapped` has been added, which inherits `passthru.pluginsDir` from `kubernetes-helm-wrapped`. See [#217768](https://github.com/NixOS/nixpkgs/issues/217768) for details. + ## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals} - The `qemu-vm.nix` module by default now identifies block devices via diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 406e76d15aa3..7b95d1dd96bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -39935,6 +39935,10 @@ with pkgs; helmfile = callPackage ../applications/networking/cluster/helmfile { }; + helmfile-wrapped = callPackage ../applications/networking/cluster/helmfile { + inherit (kubernetes-helm-wrapped.passthru) pluginsDir; + }; + helm-dashboard = callPackage ../applications/networking/cluster/helm-dashboard { }; helmsman = callPackage ../applications/networking/cluster/helmsman { }; From 1a07a20bc011e3793b56c44fe69a29177c975cc9 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sat, 24 Jun 2023 22:55:03 -0500 Subject: [PATCH 55/56] kubernetes-helmPlugins.helm-unittest: init at 0.3.3 --- .../cluster/helm/plugins/default.nix | 2 ++ .../cluster/helm/plugins/helm-unittest.nix | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix diff --git a/pkgs/applications/networking/cluster/helm/plugins/default.nix b/pkgs/applications/networking/cluster/helm/plugins/default.nix index 16fceff4ee1a..1a6aa12a91e5 100644 --- a/pkgs/applications/networking/cluster/helm/plugins/default.nix +++ b/pkgs/applications/networking/cluster/helm/plugins/default.nix @@ -12,4 +12,6 @@ helm-secrets = callPackage ./helm-secrets.nix { }; + helm-unittest = callPackage ./helm-unittest.nix { }; + } diff --git a/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix b/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix new file mode 100644 index 000000000000..9b88d99e44ac --- /dev/null +++ b/pkgs/applications/networking/cluster/helm/plugins/helm-unittest.nix @@ -0,0 +1,34 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "helm-unittest"; + version = "0.3.3"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + hash = "sha256-11rgARUfTbr8FkmR2lI4uoIqzi9cRuVPalUOsxsnO3E="; + }; + + vendorHash = "sha256-E9HSP8c/rGG+PLbnT8V5GflpnFItCeXyeLGiqDj4tRI="; + + # NOTE: Remove the install and upgrade hooks. + postPatch = '' + sed -i '/^hooks:/,+2 d' plugin.yaml + ''; + + postInstall = '' + install -dm755 $out/${pname} + mv $out/bin/helm-unittest $out/${pname}/untt + rmdir $out/bin + install -m644 -Dt $out/${pname} plugin.yaml + ''; + + meta = with lib; { + description = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin"; + homepage = "https://github.com/helm-unittest/helm-unittest"; + license = licenses.mit; + maintainers = with maintainers; [ yurrriq ]; + }; +} From d287443e67681c7aefb09d0c59eb32b906ab6c92 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 26 Jul 2023 19:13:00 +0000 Subject: [PATCH 56/56] python311Packages.argilla: 1.12.0 -> 1.13.2 --- pkgs/development/python-modules/argilla/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/argilla/default.nix b/pkgs/development/python-modules/argilla/default.nix index c04310d28b0d..24b9668d12b0 100644 --- a/pkgs/development/python-modules/argilla/default.nix +++ b/pkgs/development/python-modules/argilla/default.nix @@ -65,7 +65,7 @@ }: let pname = "argilla"; - version = "1.12.0"; + version = "1.13.2"; optional-dependencies = { server = [ fastapi @@ -125,8 +125,8 @@ buildPythonPackage { src = fetchFromGitHub { owner = "argilla-io"; repo = pname; - rev = "v${version}"; - hash = "sha256-NImtS2bbCfbhbrw12xhGdZp/JVfrB6cHnUHYX3xJ7tw="; + rev = "refs/tags/v${version}"; + hash = "sha256-FCPlEbgViWZEyXpdtaa6pJxpgbSXmcfJX/1RUFF7Zs4="; }; pythonRelaxDeps = [