From 6f6a4b7eb111b102f701fe6d2186a4b1e4ac21d7 Mon Sep 17 00:00:00 2001 From: Jade Meskill Date: Sun, 23 Feb 2025 15:56:16 -0700 Subject: [PATCH 01/62] gasket: fix build with kernel >= 6.13 --- pkgs/os-specific/linux/gasket/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/os-specific/linux/gasket/default.nix b/pkgs/os-specific/linux/gasket/default.nix index 0be0a18024a1..ed0554b5082e 100644 --- a/pkgs/os-specific/linux/gasket/default.nix +++ b/pkgs/os-specific/linux/gasket/default.nix @@ -26,6 +26,13 @@ stdenv.mkDerivation rec { url = "https://github.com/google/gasket-driver/commit/4b2a1464f3b619daaf0f6c664c954a42c4b7ce00.patch"; hash = "sha256-UOoOSEnpUMa4QXWVFpGFxBoF5szXaLEfcWtfKatO5XY="; }) + (fetchpatch2 { + # https://github.com/google/gasket-driver/issues/39 + # https://github.com/google/gasket-driver/pull/40 + name = "linux-6.13-compat.patch"; + url = "https://github.com/google/gasket-driver/commit/6fbf8f8f8bcbc0ac9c9bef7a56f495a2c9872652.patch"; + hash = "sha256-roCo0/ETWuDVtZfbpFbrmy/icNI12A/ozOGQNLTtBUs="; + }) ]; postPatch = '' From 4132cedd58c01258ff6e15db6c3ee8b16250b81e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 22 May 2025 01:14:46 +0000 Subject: [PATCH 02/62] gtk-layer-shell: 0.9.1 -> 0.9.2 --- pkgs/by-name/gt/gtk-layer-shell/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gt/gtk-layer-shell/package.nix b/pkgs/by-name/gt/gtk-layer-shell/package.nix index 195c4a56f236..9cbdfadfd35f 100644 --- a/pkgs/by-name/gt/gtk-layer-shell/package.nix +++ b/pkgs/by-name/gt/gtk-layer-shell/package.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "gtk-layer-shell"; - version = "0.9.1"; + version = "0.9.2"; outputs = [ "out" @@ -30,7 +30,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "wmww"; repo = "gtk-layer-shell"; rev = "v${finalAttrs.version}"; - hash = "sha256-TObAo/YgS6ObYrNLitxMwneGzLxwnnBIOhBVAeAzbt4="; + hash = "sha256-+vJouQEauTe/dp2WdOJcc2Byv1+Hb0iaUgwBPnV9g48="; }; strictDeps = true; From 3400dbdfcd2320dfc33b149f764bf079e8d229e7 Mon Sep 17 00:00:00 2001 From: ActuallyRuben Date: Wed, 28 May 2025 22:42:34 +0200 Subject: [PATCH 03/62] nixos/mongodb: fix initialScript when no initialRootPasswordFile is set --- nixos/modules/services/databases/mongodb.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/mongodb.nix b/nixos/modules/services/databases/mongodb.nix index 129b679d73f8..1eba6fdc60af 100644 --- a/nixos/modules/services/databases/mongodb.nix +++ b/nixos/modules/services/databases/mongodb.nix @@ -199,7 +199,7 @@ in postStart = '' if test -e "${cfg.dbpath}/.first_startup"; then ${lib.optionalString (cfg.initialScript != null) '' - initialRootPassword=$(<${cfg.initialRootPasswordFile}) + ${lib.optionalString (cfg.enableAuth) "initialRootPassword=$(<${cfg.initialRootPasswordFile})"} ${mongoshExe} ${lib.optionalString (cfg.enableAuth) "-u root -p $initialRootPassword"} admin "${cfg.initialScript}" ''} rm -f "${cfg.dbpath}/.first_startup" From 18f187e4d28f3c113d89c25ab7c4f1aa6103bc2b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 6 Jun 2025 03:02:57 +0000 Subject: [PATCH 04/62] python3Packages.diff-cover: 9.2.4 -> 9.3.2 --- pkgs/development/python-modules/diff-cover/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/diff-cover/default.nix b/pkgs/development/python-modules/diff-cover/default.nix index 25ef65d35a94..7f47a2f2cab9 100644 --- a/pkgs/development/python-modules/diff-cover/default.nix +++ b/pkgs/development/python-modules/diff-cover/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "diff-cover"; - version = "9.2.4"; + version = "9.3.2"; pyproject = true; disabled = pythonOlder "3.9"; @@ -28,7 +28,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "diff_cover"; inherit version; - hash = "sha256-bqRHEfCRmaG4vKourgAuHzN90i8teY/P1ipqFVS7KoY="; + hash = "sha256-Kpkjn7iWhlDaR5aKg0YHtreXFD5dBAXiTEWnG+WQdVs="; }; build-system = [ poetry-core ]; From 11e2ebbaf33721c5a3e5f1c0e1299d165907479e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 9 Jun 2025 10:37:03 +0000 Subject: [PATCH 05/62] primecount: 7.18 -> 7.19 --- pkgs/by-name/pr/primecount/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pr/primecount/package.nix b/pkgs/by-name/pr/primecount/package.nix index 3615b902593b..38079c9016cf 100644 --- a/pkgs/by-name/pr/primecount/package.nix +++ b/pkgs/by-name/pr/primecount/package.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "primecount"; - version = "7.18"; + version = "7.19"; src = fetchFromGitHub { owner = "kimwalisch"; repo = "primecount"; rev = "v${finalAttrs.version}"; - hash = "sha256-iVRkgVeNO0AxwfyM9Dw5B0GoAf4GlrTtC+1npKlaV3E="; + hash = "sha256-prPNAmMSiZD1EbMyPSD6OmjFn/NQ7ULVxBM1AjCYWPo="; }; outputs = [ From 5191275097a57b5e7085566d616f41f98a11f438 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 11 Jun 2025 18:27:47 +0000 Subject: [PATCH 06/62] fheroes2: 1.1.8 -> 1.1.9 --- pkgs/by-name/fh/fheroes2/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fh/fheroes2/package.nix b/pkgs/by-name/fh/fheroes2/package.nix index b7d9455064b4..b3065322c699 100644 --- a/pkgs/by-name/fh/fheroes2/package.nix +++ b/pkgs/by-name/fh/fheroes2/package.nix @@ -18,13 +18,13 @@ stdenv.mkDerivation rec { pname = "fheroes2"; - version = "1.1.8"; + version = "1.1.9"; src = fetchFromGitHub { owner = "ihhub"; repo = "fheroes2"; rev = version; - hash = "sha256-Z6pepW2hHaDNkkMVxuekoNNibsuicyGLmA8Y9isy8Mo="; + hash = "sha256-REZBez5R10kifIAnuoTxoyFlcfv5JufjX3mkItD6US4="; }; nativeBuildInputs = [ imagemagick ]; From 08821f9752aa26610f90aae104c261e137229420 Mon Sep 17 00:00:00 2001 From: SchweGELBin Date: Mon, 16 Jun 2025 20:55:59 +0200 Subject: [PATCH 07/62] mautrix-whatsapp: 0.12.1 -> 0.12.2 --- pkgs/by-name/ma/mautrix-whatsapp/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ma/mautrix-whatsapp/package.nix b/pkgs/by-name/ma/mautrix-whatsapp/package.nix index b38f13c39c4e..ccf7bf9138d9 100644 --- a/pkgs/by-name/ma/mautrix-whatsapp/package.nix +++ b/pkgs/by-name/ma/mautrix-whatsapp/package.nix @@ -14,19 +14,19 @@ buildGoModule rec { pname = "mautrix-whatsapp"; - version = "0.12.1"; + version = "0.12.2"; src = fetchFromGitHub { owner = "mautrix"; repo = "whatsapp"; rev = "v${version}"; - hash = "sha256-WZPmSIkRSCrI1krIWJ2abVw1t81vjcqewTdx0W2aD+Q="; + hash = "sha256-Es6RWUo/e25wYGIz6feVNXIQbMCDPl1iZoKT3x8vHtA="; }; buildInputs = lib.optional (!withGoolm) olm; tags = lib.optional withGoolm "goolm"; - vendorHash = "sha256-jgwi0ENJ064gWJWyvlSlaEicC+NAtn0Tdbnu6mzmLoE="; + vendorHash = "sha256-/R6MI6egGV1E1YzKcxBSOb2z97kA1HCK5GdMgfR1vSM="; doCheck = false; From 961d69db59bc131f229542e1c8ffb30426b1a4b5 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Tue, 17 Jun 2025 14:14:36 +0000 Subject: [PATCH 08/62] tempo: 2.7.2 -> 2.8.0 https://github.com/grafana/tempo/releases/tag/v2.8.0 --- pkgs/by-name/te/tempo/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/te/tempo/package.nix b/pkgs/by-name/te/tempo/package.nix index 72269aad6abf..3fd76ce27091 100644 --- a/pkgs/by-name/te/tempo/package.nix +++ b/pkgs/by-name/te/tempo/package.nix @@ -7,14 +7,14 @@ buildGoModule rec { pname = "tempo"; - version = "2.7.2"; + version = "2.8.0"; src = fetchFromGitHub { owner = "grafana"; repo = "tempo"; rev = "v${version}"; fetchSubmodules = true; - hash = "sha256-JBbECknhqYKzFlxAOVinuUCf/2xuUdh2ryK9c35YZ9o="; + hash = "sha256-rloHxcGrgVhBGIKg29wzhPfa3NQ8pI8aISiVi2M/BJ4="; }; vendorHash = null; @@ -22,7 +22,6 @@ buildGoModule rec { subPackages = [ "cmd/tempo-cli" "cmd/tempo-query" - "cmd/tempo-serverless" "cmd/tempo-vulture" "cmd/tempo" ]; From 51823bd263e4bc51994551941b0be9c5810a4453 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Wed, 18 Jun 2025 13:44:09 +0000 Subject: [PATCH 09/62] tempo: 2.8.0 -> 2.8.1 https://github.com/grafana/tempo/releases/tag/v2.8.1 --- pkgs/by-name/te/tempo/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/te/tempo/package.nix b/pkgs/by-name/te/tempo/package.nix index 3fd76ce27091..11ee385d9832 100644 --- a/pkgs/by-name/te/tempo/package.nix +++ b/pkgs/by-name/te/tempo/package.nix @@ -7,14 +7,14 @@ buildGoModule rec { pname = "tempo"; - version = "2.8.0"; + version = "2.8.1"; src = fetchFromGitHub { owner = "grafana"; repo = "tempo"; rev = "v${version}"; fetchSubmodules = true; - hash = "sha256-rloHxcGrgVhBGIKg29wzhPfa3NQ8pI8aISiVi2M/BJ4="; + hash = "sha256-RzDOx2ZyA0ZntFD1ryfipsgPsxVmsdOusZ37RCnQQnM="; }; vendorHash = null; From b86c6266efa8906b688d3ec877e882dfc24fd2a7 Mon Sep 17 00:00:00 2001 From: Benjamin Sparks Date: Wed, 18 Jun 2025 15:22:30 +0200 Subject: [PATCH 10/62] libvncserver: 0.9.14 -> 0.9.15 Also a minor cleanup --- pkgs/by-name/li/libvncserver/package.nix | 14 ++++++-------- pkgs/by-name/li/libvncserver/pkgconfig.patch | 12 ++++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/li/libvncserver/package.nix b/pkgs/by-name/li/libvncserver/package.nix index b016e19af766..510717cfcc4d 100644 --- a/pkgs/by-name/li/libvncserver/package.nix +++ b/pkgs/by-name/li/libvncserver/package.nix @@ -12,9 +12,9 @@ systemd, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libvncserver"; - version = "0.9.14"; + version = "0.9.15"; outputs = [ "out" @@ -24,8 +24,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "LibVNC"; repo = "libvncserver"; - rev = "LibVNCServer-${version}"; - sha256 = "sha256-kqVZeCTp+Z6BtB6nzkwmtkJ4wtmjlSQBg05lD02cVvQ="; + tag = "LibVNCServer-${finalAttrs.version}"; + hash = "sha256-a3acEjJM+ZA9jaB6qZ/czjIfx/L3j71VjJ6mtlqYcSw="; }; patches = [ @@ -37,9 +37,7 @@ stdenv.mkDerivation rec { cmake ]; - cmakeFlags = [ - "-DWITH_SYSTEMD=${if withSystemd then "ON" else "OFF"}" - ]; + cmakeFlags = [ (lib.cmakeBool "WITH_SYSTEMD" withSystemd) ]; buildInputs = [ @@ -63,4 +61,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ raskin ]; platforms = platforms.unix; }; -} +}) diff --git a/pkgs/by-name/li/libvncserver/pkgconfig.patch b/pkgs/by-name/li/libvncserver/pkgconfig.patch index 0b98e9e0a79b..929508b4d935 100644 --- a/pkgs/by-name/li/libvncserver/pkgconfig.patch +++ b/pkgs/by-name/li/libvncserver/pkgconfig.patch @@ -1,7 +1,7 @@ -diff --git a/libvncclient.pc.cmakein b/libvncclient.pc.cmakein +diff --git a/src/libvncclient/libvncclient.pc.cmakein b/src/libvncclient/libvncclient.pc.cmakein index ceeda39d..2516e643 100644 ---- a/libvncclient.pc.cmakein -+++ b/libvncclient.pc.cmakein +--- a/src/libvncclient/libvncclient.pc.cmakein ++++ b/src/libvncclient/libvncclient.pc.cmakein @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ @@ -12,10 +12,10 @@ index ceeda39d..2516e643 100644 Name: LibVNCClient Description: A library for easy implementation of a VNC client. -diff --git a/libvncserver.pc.cmakein b/libvncserver.pc.cmakein +diff --git a/src/libvncserver/libvncserver.pc.cmakein b/src/libvncserver/libvncserver.pc.cmakein index 33ec6685..57244742 100644 ---- a/libvncserver.pc.cmakein -+++ b/libvncserver.pc.cmakein +--- a/src/libvncserver/libvncserver.pc.cmakein ++++ b/src/libvncserver/libvncserver.pc.cmakein @@ -1,7 +1,7 @@ prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=@CMAKE_INSTALL_PREFIX@ From 815b4779387114ce22c55a09421afa8a5c78da52 Mon Sep 17 00:00:00 2001 From: Benjamin Sparks Date: Wed, 18 Jun 2025 15:25:59 +0200 Subject: [PATCH 11/62] libvncserver: support static building --- pkgs/by-name/li/libvncserver/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/li/libvncserver/package.nix b/pkgs/by-name/li/libvncserver/package.nix index 510717cfcc4d..0d6b14a8fcf1 100644 --- a/pkgs/by-name/li/libvncserver/package.nix +++ b/pkgs/by-name/li/libvncserver/package.nix @@ -10,6 +10,8 @@ libpng, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd, + + enableShared ? !stdenv.hostPlatform.isStatic, }: stdenv.mkDerivation (finalAttrs: { @@ -37,7 +39,10 @@ stdenv.mkDerivation (finalAttrs: { cmake ]; - cmakeFlags = [ (lib.cmakeBool "WITH_SYSTEMD" withSystemd) ]; + cmakeFlags = [ + (lib.cmakeBool "WITH_SYSTEMD" withSystemd) + (lib.cmakeBool "BUILD_SHARED_LIBS" enableShared) + ]; buildInputs = [ From e7f53ce4317d4e9f712f193985d0ee59feb96527 Mon Sep 17 00:00:00 2001 From: Benjamin Sparks Date: Wed, 18 Jun 2025 15:38:57 +0200 Subject: [PATCH 12/62] libvncserver: opt-in to build examples --- pkgs/by-name/li/libvncserver/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/li/libvncserver/package.nix b/pkgs/by-name/li/libvncserver/package.nix index 0d6b14a8fcf1..ecaceb3c56ad 100644 --- a/pkgs/by-name/li/libvncserver/package.nix +++ b/pkgs/by-name/li/libvncserver/package.nix @@ -12,6 +12,7 @@ systemd, enableShared ? !stdenv.hostPlatform.isStatic, + buildExamples ? false, }: stdenv.mkDerivation (finalAttrs: { @@ -42,6 +43,7 @@ stdenv.mkDerivation (finalAttrs: { cmakeFlags = [ (lib.cmakeBool "WITH_SYSTEMD" withSystemd) (lib.cmakeBool "BUILD_SHARED_LIBS" enableShared) + (lib.cmakeBool "WITH_EXAMPLES" buildExamples) ]; buildInputs = From b7ac3d5e82b78a3533f21e2797b182466059ef2b Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 16:55:20 +0300 Subject: [PATCH 13/62] tbb_2022: shorten name; move to by-name --- pkgs/by-name/ka/kaminpar/package.nix | 4 ++-- pkgs/by-name/mo/mold/package.nix | 4 ++-- pkgs/by-name/op/openscad-unstable/package.nix | 4 ++-- pkgs/by-name/op/openvino/package.nix | 4 ++-- pkgs/by-name/os/osrm-backend/package.nix | 4 ++-- pkgs/by-name/pa/papilo/package.nix | 6 +++--- .../2022_0.nix => by-name/tb/tbb_2022/package.nix} | 14 +++++++------- pkgs/by-name/ti/tiledb/package.nix | 4 ++-- pkgs/development/python-modules/scipp/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 1 - 10 files changed, 24 insertions(+), 25 deletions(-) rename pkgs/{development/libraries/tbb/2022_0.nix => by-name/tb/tbb_2022/package.nix} (93%) diff --git a/pkgs/by-name/ka/kaminpar/package.nix b/pkgs/by-name/ka/kaminpar/package.nix index 85b095bb6131..9b9cfac2a474 100644 --- a/pkgs/by-name/ka/kaminpar/package.nix +++ b/pkgs/by-name/ka/kaminpar/package.nix @@ -7,7 +7,7 @@ numactl, mpi, sparsehash, - tbb_2022_0, + tbb_2022, gtest, mpiCheckPhaseHook, }: @@ -56,7 +56,7 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = [ mpi sparsehash - tbb_2022_0 + tbb_2022 ]; cmakeFlags = [ diff --git a/pkgs/by-name/mo/mold/package.nix b/pkgs/by-name/mo/mold/package.nix index f9e834519c61..ec88f0ce9394 100644 --- a/pkgs/by-name/mo/mold/package.nix +++ b/pkgs/by-name/mo/mold/package.nix @@ -7,7 +7,7 @@ cmake, mimalloc, ninja, - tbb_2022_0, + tbb_2022, zlib, zstd, @@ -42,7 +42,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ - tbb_2022_0 + tbb_2022 zlib zstd ] diff --git a/pkgs/by-name/op/openscad-unstable/package.nix b/pkgs/by-name/op/openscad-unstable/package.nix index f8a2a0f7be6f..95a5bdc79609 100644 --- a/pkgs/by-name/op/openscad-unstable/package.nix +++ b/pkgs/by-name/op/openscad-unstable/package.nix @@ -34,7 +34,7 @@ mesa, mpfr, python3, - tbb_2022_0, + tbb_2022, wayland, wayland-protocols, wrapGAppsHook3, @@ -79,7 +79,7 @@ clangStdenv.mkDerivation rec { [ clipper2 glm - tbb_2022_0 + tbb_2022 mimalloc boost cairo diff --git a/pkgs/by-name/op/openvino/package.nix b/pkgs/by-name/op/openvino/package.nix index 56c51de76b72..9dadda3bea97 100644 --- a/pkgs/by-name/op/openvino/package.nix +++ b/pkgs/by-name/op/openvino/package.nix @@ -28,7 +28,7 @@ protobuf, pugixml, snappy, - tbb_2022_0, + tbb_2022, cudaPackages, }: @@ -158,7 +158,7 @@ stdenv.mkDerivation rec { opencv pugixml snappy - tbb_2022_0 + tbb_2022 ] ++ lib.optionals cudaSupport [ cudaPackages.cuda_cudart diff --git a/pkgs/by-name/os/osrm-backend/package.nix b/pkgs/by-name/os/osrm-backend/package.nix index de9207b66365..accbb1f514c7 100644 --- a/pkgs/by-name/os/osrm-backend/package.nix +++ b/pkgs/by-name/os/osrm-backend/package.nix @@ -10,13 +10,13 @@ boost, lua, luabind, - tbb_2022_0, + tbb_2022, expat, nixosTests, }: let - tbb = tbb_2022_0; + tbb = tbb_2022; in stdenv.mkDerivation rec { pname = "osrm-backend"; diff --git a/pkgs/by-name/pa/papilo/package.nix b/pkgs/by-name/pa/papilo/package.nix index 1813f0a236a1..79a4912f533d 100644 --- a/pkgs/by-name/pa/papilo/package.nix +++ b/pkgs/by-name/pa/papilo/package.nix @@ -4,7 +4,7 @@ fetchFromGitHub, cmake, boost, - tbb_2022_0, + tbb_2022, }: stdenv.mkDerivation (finalAttrs: { @@ -39,10 +39,10 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ boost cmake - tbb_2022_0 + tbb_2022 ]; - propagatedBuildInputs = [ tbb_2022_0 ]; + propagatedBuildInputs = [ tbb_2022 ]; strictDeps = true; diff --git a/pkgs/development/libraries/tbb/2022_0.nix b/pkgs/by-name/tb/tbb_2022/package.nix similarity index 93% rename from pkgs/development/libraries/tbb/2022_0.nix rename to pkgs/by-name/tb/tbb_2022/package.nix index bf7522d5c34d..178019a9d6ad 100644 --- a/pkgs/development/libraries/tbb/2022_0.nix +++ b/pkgs/by-name/tb/tbb_2022/package.nix @@ -7,7 +7,7 @@ ninja, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tbb"; version = "2022.0.0"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneTBB"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-XOlC1+rf65oEGKDba9N561NuFo1YJhn3Q1CTGtvkn7A="; }; @@ -71,10 +71,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Intel Thread Building Blocks C++ Library"; homepage = "http://threadingbuildingblocks.org/"; - license = licenses.asl20; + license = lib.licenses.asl20; longDescription = '' Intel Threading Building Blocks offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you @@ -83,11 +83,11 @@ stdenv.mkDerivation rec { represents a higher-level, task-based parallelism that abstracts platform details and threading mechanisms for scalability and performance. ''; - platforms = platforms.unix ++ platforms.windows; - maintainers = with maintainers; [ + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ silvanshade thoughtpolice tmarkus ]; }; -} +}) diff --git a/pkgs/by-name/ti/tiledb/package.nix b/pkgs/by-name/ti/tiledb/package.nix index e31a44de573c..8b68590dfb6f 100644 --- a/pkgs/by-name/ti/tiledb/package.nix +++ b/pkgs/by-name/ti/tiledb/package.nix @@ -8,7 +8,7 @@ bzip2, zstd, spdlog, - tbb_2022_0, + tbb_2022, openssl, boost, libpqxx, @@ -32,7 +32,7 @@ let cp -r ${rapidcheck.dev}/* $out ''; catch2 = catch2_3; - tbb = tbb_2022_0; + tbb = tbb_2022; in stdenv.mkDerivation rec { pname = "tiledb"; diff --git a/pkgs/development/python-modules/scipp/default.nix b/pkgs/development/python-modules/scipp/default.nix index 9cfb79fe914a..1a8d5c800759 100644 --- a/pkgs/development/python-modules/scipp/default.nix +++ b/pkgs/development/python-modules/scipp/default.nix @@ -22,7 +22,7 @@ eigen, gtest, pybind11, - tbb_2022_0, + tbb_2022, # tests pytestCheckHook, @@ -75,7 +75,7 @@ buildPythonPackage rec { gtest pybind11 units-llnl.passthru.top-level - tbb_2022_0 + tbb_2022 ]; nativeCheckInputs = [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 254403a5c8f0..9bc18e9c72c1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6102,7 +6102,6 @@ with pkgs; tbb_2020_3 = callPackage ../development/libraries/tbb/2020_3.nix { }; tbb_2021_11 = callPackage ../development/libraries/tbb { }; - tbb_2022_0 = callPackage ../development/libraries/tbb/2022_0.nix { }; # many packages still fail with latest version tbb = tbb_2020_3; From afcbeeee8f8ec33c88f887a90fee03d2d237d50b Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 16:56:09 +0300 Subject: [PATCH 14/62] tbb_2022: 2022.0.0 -> 2022.1.0 --- pkgs/by-name/tb/tbb_2022/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/tb/tbb_2022/package.nix b/pkgs/by-name/tb/tbb_2022/package.nix index 178019a9d6ad..66b8c9d4a0f0 100644 --- a/pkgs/by-name/tb/tbb_2022/package.nix +++ b/pkgs/by-name/tb/tbb_2022/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "tbb"; - version = "2022.0.0"; + version = "2022.1.0"; outputs = [ "out" @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "oneapi-src"; repo = "oneTBB"; tag = "v${finalAttrs.version}"; - hash = "sha256-XOlC1+rf65oEGKDba9N561NuFo1YJhn3Q1CTGtvkn7A="; + hash = "sha256-DqJkNlC94cPJSXnhyFcEqWYGCQPunMfIfb05UcFGynw="; }; nativeBuildInputs = [ From bfb2d9a9b093de7a50e6f44806bbf5ef0c94cfb3 Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 16:57:41 +0300 Subject: [PATCH 15/62] manifold: disable failing test --- pkgs/by-name/ma/manifold/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ma/manifold/package.nix b/pkgs/by-name/ma/manifold/package.nix index 296953af1209..fac26c367b75 100644 --- a/pkgs/by-name/ma/manifold/package.nix +++ b/pkgs/by-name/ma/manifold/package.nix @@ -38,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; checkPhase = '' - test/manifold_test + test/manifold_test --gtest_filter=-CrossSection.RoundOffset ''; meta = { From f528044060d3d1cca7551018258cd47d08e2b88c Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 17:09:39 +0300 Subject: [PATCH 16/62] tbb_2021: shorten name; move to by-name --- pkgs/applications/misc/prusa-slicer/default.nix | 6 +++--- pkgs/by-name/au/autotier/package.nix | 4 ++-- pkgs/by-name/ba/bambu-studio/package.nix | 4 ++-- pkgs/by-name/ca/cabinpkg/package.nix | 4 ++-- pkgs/by-name/li/libblake3/package.nix | 4 ++-- pkgs/by-name/li/libloot/package.nix | 4 ++-- pkgs/by-name/ma/manifold/package.nix | 4 ++-- pkgs/by-name/na/naja/package.nix | 4 ++-- pkgs/by-name/or/orca-slicer/package.nix | 4 ++-- pkgs/by-name/pd/pdf4qt/package.nix | 4 ++-- pkgs/by-name/sa/salmon/package.nix | 4 ++-- pkgs/by-name/sc/scipopt-papilo/package.nix | 4 ++-- pkgs/by-name/sc/scipopt-scip/package.nix | 4 ++-- pkgs/by-name/su/supercell-wx/package.nix | 4 ++-- .../tb/tbb_2021/package.nix} | 14 +++++++------- pkgs/by-name/ue/ueberzugpp/package.nix | 4 ++-- pkgs/development/libraries/embree/2.x.nix | 2 +- pkgs/top-level/aliases.nix | 1 - pkgs/top-level/all-packages.nix | 7 +++---- 19 files changed, 42 insertions(+), 44 deletions(-) rename pkgs/{development/libraries/tbb/default.nix => by-name/tb/tbb_2021/package.nix} (95%) diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index 7167387e37eb..fe9260366fdb 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -27,7 +27,7 @@ opencascade-occt_7_6_1, openvdb, qhull, - tbb_2021_11, + tbb_2021, wxGTK32, xorg, libbgcode, @@ -54,7 +54,7 @@ let hash = "sha256-WNdAYu66ggpSYJ8Kt57yEA4mSTv+Rvzj9Rm1q765HpY="; }; }); - openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; }; + openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021; }; wxGTK-override' = if wxGTK-override == null then wxGTK32 else wxGTK-override; opencascade-override' = if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override; @@ -125,7 +125,7 @@ stdenv.mkDerivation (finalAttrs: { opencascade-override' openvdb_tbb_2021_8 qhull - tbb_2021_11 + tbb_2021 wxGTK-override' xorg.libX11 libbgcode diff --git a/pkgs/by-name/au/autotier/package.nix b/pkgs/by-name/au/autotier/package.nix index a6d8836eed35..bf044574432b 100644 --- a/pkgs/by-name/au/autotier/package.nix +++ b/pkgs/by-name/au/autotier/package.nix @@ -8,7 +8,7 @@ boost, fuse3, lib45d, - tbb_2021_11, + tbb_2021, liburing, installShellFiles, }: @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { boost fuse3 lib45d - tbb_2021_11 + tbb_2021 liburing ]; diff --git a/pkgs/by-name/ba/bambu-studio/package.nix b/pkgs/by-name/ba/bambu-studio/package.nix index 5c499dcd4e43..359ba7c9dc8c 100644 --- a/pkgs/by-name/ba/bambu-studio/package.nix +++ b/pkgs/by-name/ba/bambu-studio/package.nix @@ -34,7 +34,7 @@ opencv, pcre, systemd, - tbb_2021_11, + tbb_2021, webkitgtk_4_0, wxGTK31, xorg, @@ -102,7 +102,7 @@ stdenv.mkDerivation rec { opencascade-occt_7_6 openvdb pcre - tbb_2021_11 + tbb_2021 webkitgtk_4_0 wxGTK' xorg.libX11 diff --git a/pkgs/by-name/ca/cabinpkg/package.nix b/pkgs/by-name/ca/cabinpkg/package.nix index 011049884d71..a4604868d6f5 100644 --- a/pkgs/by-name/ca/cabinpkg/package.nix +++ b/pkgs/by-name/ca/cabinpkg/package.nix @@ -2,7 +2,7 @@ lib, stdenv, fetchFromGitHub, - tbb_2021_11, + tbb_2021, libgit2, curl, fmt, @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { buildInputs = [ libgit2 fmt - tbb_2021_11 + tbb_2021 nlohmann_json curl ]; diff --git a/pkgs/by-name/li/libblake3/package.nix b/pkgs/by-name/li/libblake3/package.nix index 72ce99baa6bc..6e7b9277ebe3 100644 --- a/pkgs/by-name/li/libblake3/package.nix +++ b/pkgs/by-name/li/libblake3/package.nix @@ -4,7 +4,7 @@ cmake, fetchFromGitHub, fetchpatch, - tbb_2021_11, + tbb_2021, useTBB ? true, }: @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { propagatedBuildInputs = lib.optionals useTBB [ # 2022.0 crashes on macOS at the moment - tbb_2021_11 + tbb_2021 ]; cmakeFlags = [ diff --git a/pkgs/by-name/li/libloot/package.nix b/pkgs/by-name/li/libloot/package.nix index 1f1277715e67..97ffa6940c36 100644 --- a/pkgs/by-name/li/libloot/package.nix +++ b/pkgs/by-name/li/libloot/package.nix @@ -18,7 +18,7 @@ gtest, icu, spdlog, - tbb_2021_11, + tbb_2021, yaml-cpp, }: @@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: { gtest icu (spdlog.override { fmt = fmt_11; }) - tbb_2021_11 + tbb_2021 finalAttrs.passthru.yaml-cpp # has merge-key support finalAttrs.passthru.libloadorder diff --git a/pkgs/by-name/ma/manifold/package.nix b/pkgs/by-name/ma/manifold/package.nix index fac26c367b75..119fc497c73c 100644 --- a/pkgs/by-name/ma/manifold/package.nix +++ b/pkgs/by-name/ma/manifold/package.nix @@ -6,7 +6,7 @@ clipper2, gtest, glm, - tbb_2021_11, + tbb_2021, }: stdenv.mkDerivation (finalAttrs: { @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ gtest glm - tbb_2021_11 + tbb_2021 clipper2 ]; diff --git a/pkgs/by-name/na/naja/package.nix b/pkgs/by-name/na/naja/package.nix index 10695db23b28..0b570a3c76a2 100644 --- a/pkgs/by-name/na/naja/package.nix +++ b/pkgs/by-name/na/naja/package.nix @@ -10,7 +10,7 @@ flex, pkg-config, python3, - tbb_2021_11, + tbb_2021, buildPackages, nix-update-script, }: @@ -63,7 +63,7 @@ stdenv.mkDerivation (finalAttrs: { boost capnproto # cmake modules flex # include dir - tbb_2021_11 + tbb_2021 python3 ]; diff --git a/pkgs/by-name/or/orca-slicer/package.nix b/pkgs/by-name/or/orca-slicer/package.nix index 14887e24ae25..bbf9e443160b 100644 --- a/pkgs/by-name/or/orca-slicer/package.nix +++ b/pkgs/by-name/or/orca-slicer/package.nix @@ -34,7 +34,7 @@ opencv, pcre, systemd, - tbb_2021_11, + tbb_2021, webkitgtk_4_0, wxGTK31, xorg, @@ -112,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: { opencascade-occt_7_6 openvdb pcre - tbb_2021_11 + tbb_2021 webkitgtk_4_0 wxGTK' xorg.libX11 diff --git a/pkgs/by-name/pd/pdf4qt/package.nix b/pkgs/by-name/pd/pdf4qt/package.nix index 94e92d587920..174140744327 100644 --- a/pkgs/by-name/pd/pdf4qt/package.nix +++ b/pkgs/by-name/pd/pdf4qt/package.nix @@ -8,7 +8,7 @@ qt6, wrapGAppsHook3, openjpeg, - tbb_2021_11, + tbb_2021, blend2d, }: @@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: { qt6.qtspeech lcms openjpeg - tbb_2021_11 + tbb_2021 blend2d ]; diff --git a/pkgs/by-name/sa/salmon/package.nix b/pkgs/by-name/sa/salmon/package.nix index fbe980cbdb6f..4f3a31f5efcd 100644 --- a/pkgs/by-name/sa/salmon/package.nix +++ b/pkgs/by-name/sa/salmon/package.nix @@ -13,7 +13,7 @@ libiconv, libstaden-read, pkg-config, - tbb_2021_11, + tbb_2021, xz, zlib, }: @@ -55,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { jemalloc libgff libstaden-read - tbb_2021_11 + tbb_2021 xz zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]; diff --git a/pkgs/by-name/sc/scipopt-papilo/package.nix b/pkgs/by-name/sc/scipopt-papilo/package.nix index 1e221c5df65e..6480be33f27a 100644 --- a/pkgs/by-name/sc/scipopt-papilo/package.nix +++ b/pkgs/by-name/sc/scipopt-papilo/package.nix @@ -6,7 +6,7 @@ boost, blas, gmp, - tbb_2021_11, + tbb_2021, gfortran, }: @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { gmp gfortran boost - tbb_2021_11 + tbb_2021 ]; cmakeFlags = [ diff --git a/pkgs/by-name/sc/scipopt-scip/package.nix b/pkgs/by-name/sc/scipopt-scip/package.nix index 19699890df1a..76dbfea1b9aa 100644 --- a/pkgs/by-name/sc/scipopt-scip/package.nix +++ b/pkgs/by-name/sc/scipopt-scip/package.nix @@ -11,7 +11,7 @@ scipopt-papilo, scipopt-zimpl, ipopt, - tbb_2021_11, + tbb_2021, boost, gfortran, criterion, @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { gmp readline zlib - tbb_2021_11 + tbb_2021 boost gfortran criterion diff --git a/pkgs/by-name/su/supercell-wx/package.nix b/pkgs/by-name/su/supercell-wx/package.nix index 4836eca8ea3b..76e9b05dc7b0 100644 --- a/pkgs/by-name/su/supercell-wx/package.nix +++ b/pkgs/by-name/su/supercell-wx/package.nix @@ -24,7 +24,7 @@ gtest, glm, qt6, - tbb_2021_11, + tbb_2021, tracy, replaceVars, python3, @@ -130,7 +130,7 @@ stdenv.mkDerivation (finalAttrs: { aws-sdk-cpp howard-hinnant-date boost - tbb_2021_11 + tbb_2021 glew geos spdlog diff --git a/pkgs/development/libraries/tbb/default.nix b/pkgs/by-name/tb/tbb_2021/package.nix similarity index 95% rename from pkgs/development/libraries/tbb/default.nix rename to pkgs/by-name/tb/tbb_2021/package.nix index 8ecaed4e7a4e..4045f3028b4d 100644 --- a/pkgs/development/libraries/tbb/default.nix +++ b/pkgs/by-name/tb/tbb_2021/package.nix @@ -7,7 +7,7 @@ ninja, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tbb"; version = "2021.11.0"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneTBB"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-zGZHMtAUVzBKFbCshpepm3ce3tW6wQ+F30kYYXAQ/TE="; }; @@ -93,10 +93,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { + meta = { description = "Intel Thread Building Blocks C++ Library"; homepage = "http://threadingbuildingblocks.org/"; - license = licenses.asl20; + license = lib.licenses.asl20; longDescription = '' Intel Threading Building Blocks offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you @@ -105,11 +105,11 @@ stdenv.mkDerivation rec { represents a higher-level, task-based parallelism that abstracts platform details and threading mechanisms for scalability and performance. ''; - platforms = platforms.unix ++ platforms.windows; - maintainers = with maintainers; [ + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ silvanshade thoughtpolice tmarkus ]; }; -} +}) diff --git a/pkgs/by-name/ue/ueberzugpp/package.nix b/pkgs/by-name/ue/ueberzugpp/package.nix index ca13763f34f3..3dc7bdc20630 100644 --- a/pkgs/by-name/ue/ueberzugpp/package.nix +++ b/pkgs/by-name/ue/ueberzugpp/package.nix @@ -7,7 +7,7 @@ openssl, zeromq, cppzmq, - tbb_2021_11, + tbb_2021, spdlog, libsodium, fmt, @@ -57,7 +57,7 @@ stdenv.mkDerivation rec { openssl zeromq cppzmq - tbb_2021_11 + tbb_2021 spdlog libsodium fmt diff --git a/pkgs/development/libraries/embree/2.x.nix b/pkgs/development/libraries/embree/2.x.nix index b5d6f5a7b8be..8f70261921cc 100644 --- a/pkgs/development/libraries/embree/2.x.nix +++ b/pkgs/development/libraries/embree/2.x.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ ispc - # tbb_2021_0 is not backward compatible + # tbb_2021 is not backward compatible tbb_2020_3 glfw openimageio_2 diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 12ac5db7703e..bf1586d002ba 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1899,7 +1899,6 @@ mapAliases { taplo-lsp = taplo; # Added 2022-07-30 targetcli = targetcli-fb; # Added 2025-03-14 taro = taproot-assets; # Added 2023-07-04 - tbb_2021_5 = throw "tbb_2021_5 has been removed from nixpkgs, as it broke with GCC 14"; tcl-fcgi = tclPackages.tcl-fcgi; # Added 2024-10-02 tclcurl = tclPackages.tclcurl; # Added 2024-10-02 tcllib = tclPackages.tcllib; # Added 2024-10-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9bc18e9c72c1..f200d926456e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -311,7 +311,7 @@ with pkgs; }; basalt-monado = callPackage ../by-name/ba/basalt-monado/package.nix { - tbb = tbb_2021_11; + tbb = tbb_2021; cereal = cereal_1_3_2; opencv = opencv.override { enableGtk3 = true; }; }; @@ -6101,7 +6101,6 @@ with pkgs; swi-prolog-gui = swi-prolog.override { withGui = true; }; tbb_2020_3 = callPackage ../development/libraries/tbb/2020_3.nix { }; - tbb_2021_11 = callPackage ../development/libraries/tbb { }; # many packages still fail with latest version tbb = tbb_2020_3; @@ -7383,7 +7382,7 @@ with pkgs; ikos = callPackage ../development/tools/analysis/ikos { inherit (llvmPackages_14) stdenv clang llvm; - tbb = tbb_2021_11; + tbb = tbb_2021; }; include-what-you-use = callPackage ../development/tools/analysis/include-what-you-use { @@ -7882,7 +7881,7 @@ with pkgs; cctag = callPackage ../development/libraries/cctag { stdenv = clangStdenv; - tbb = tbb_2021_11; + tbb = tbb_2021; }; ceedling = callPackage ../development/tools/ceedling { }; From 3b69db033400d312bdb66aa685ef6304412038e5 Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 17:10:53 +0300 Subject: [PATCH 17/62] tbb_2021: 2021.11.0 -> 2021.13.0 --- pkgs/by-name/tb/tbb_2021/package.nix | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/tb/tbb_2021/package.nix b/pkgs/by-name/tb/tbb_2021/package.nix index 4045f3028b4d..bddbb1a546fe 100644 --- a/pkgs/by-name/tb/tbb_2021/package.nix +++ b/pkgs/by-name/tb/tbb_2021/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "tbb"; - version = "2021.11.0"; + version = "2021.13.0"; outputs = [ "out" @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "oneapi-src"; repo = "oneTBB"; tag = "v${finalAttrs.version}"; - hash = "sha256-zGZHMtAUVzBKFbCshpepm3ce3tW6wQ+F30kYYXAQ/TE="; + hash = "sha256-ZoUzY71SweVQ8/1k09MNSXiEqab6Ae+QTbxORnar9JU="; }; nativeBuildInputs = [ @@ -34,29 +34,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/899.patch"; hash = "sha256-kU6RRX+sde0NrQMKlNtW3jXav6J4QiVIUmD50asmBPU="; }) - (fetchpatch { - name = "fix-tbb-mingw-compile.patch"; - url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/1361.patch"; - hash = "sha256-jVa4HQetZv0vImdv549MyTy6/8t9dy8m6YAmjPGNQ18="; - }) - (fetchpatch { - name = "fix-tbb-mingw-link.patch"; - url = "https://patch-diff.githubusercontent.com/raw/oneapi-src/oneTBB/pull/1193.patch"; - hash = "sha256-ZQbwUmuIZoGVBof8QNR3V8vU385e2X7EvU3+Fbj4+M8="; - }) # Fix tests on FreeBSD and Windows (fetchpatch { name = "fix-tbb-freebsd-and-windows-tests.patch"; url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1696.patch"; hash = "sha256-yjX2FkOK8bz29a/XSA7qXgQw9lxzx8VIgEBREW32NN4="; }) - # Fix Threads::Threads target for static from https://github.com/oneapi-src/oneTBB/pull/1248 - # This is a conflict-resolved cherry-pick of the above PR to due to formatting differences. - (fetchpatch { - name = "fix-cmake-threads-threads-target-for-static.patch"; - url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1248.patch"; - hash = "sha256-3WKzxU93vxuy7NgW+ap+ocZz5Q5utZ/pK7+FQExzLLA="; - }) ]; patchFlags = [ From 751dc95469d23288245206ba6e572092a5fe52d5 Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 17:16:43 +0300 Subject: [PATCH 18/62] tbb_2020: shorten name; move to by-name --- .../tb/tbb_2020/package.nix} | 50 +++++++++---------- pkgs/development/libraries/embree/2.x.nix | 6 +-- pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 28 insertions(+), 31 deletions(-) rename pkgs/{development/libraries/tbb/2020_3.nix => by-name/tb/tbb_2020/package.nix} (76%) diff --git a/pkgs/development/libraries/tbb/2020_3.nix b/pkgs/by-name/tb/tbb_2020/package.nix similarity index 76% rename from pkgs/development/libraries/tbb/2020_3.nix rename to pkgs/by-name/tb/tbb_2020/package.nix index 82101272c395..317594329ba4 100644 --- a/pkgs/development/libraries/tbb/2020_3.nix +++ b/pkgs/by-name/tb/tbb_2020/package.nix @@ -7,7 +7,7 @@ fixDarwinDylibNames, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tbb"; version = "2020.3"; @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "oneapi-src"; repo = "oneTBB"; - rev = "v${version}"; - sha256 = "prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU="; + tag = "v${finalAttrs.version}"; + hash = "sha256-prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU="; }; patches = [ @@ -91,29 +91,27 @@ stdenv.mkDerivation rec { runHook postInstall ''; - postInstall = - let - pcTemplate = fetchurl { - url = "https://github.com/oneapi-src/oneTBB/raw/478de5b1887c928e52f029d706af6ea640a877be/integration/pkg-config/tbb.pc.in"; - sha256 = "2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI="; - }; - in - '' - # Generate pkg-config file based on upstream template. - # It should not be necessary with tbb after 2021.2. - mkdir -p "$out/lib/pkgconfig" - substitute "${pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \ - --subst-var-by CMAKE_INSTALL_PREFIX "$out" \ - --subst-var-by CMAKE_INSTALL_LIBDIR "lib" \ - --subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \ - --subst-var-by TBB_VERSION "${version}" \ - --subst-var-by TBB_LIB_NAME "tbb" - ''; + pcTemplate = fetchurl { + url = "https://github.com/oneapi-src/oneTBB/raw/478de5b1887c928e52f029d706af6ea640a877be/integration/pkg-config/tbb.pc.in"; + hash = "sha256-2pCad9txSpNbzac0vp/VY3x7HNySaYkbH3Rx8LK53pI="; + }; - meta = with lib; { + postInstall = '' + # Generate pkg-config file based on upstream template. + # It should not be necessary with tbb after 2021.2. + mkdir -p "$out/lib/pkgconfig" + substitute "${finalAttrs.pcTemplate}" "$out/lib/pkgconfig/tbb.pc" \ + --subst-var-by CMAKE_INSTALL_PREFIX "$out" \ + --subst-var-by CMAKE_INSTALL_LIBDIR "lib" \ + --subst-var-by CMAKE_INSTALL_INCLUDEDIR "include" \ + --subst-var-by TBB_VERSION "${finalAttrs.version}" \ + --subst-var-by TBB_LIB_NAME "tbb" + ''; + + meta = { description = "Intel Thread Building Blocks C++ Library"; homepage = "http://threadingbuildingblocks.org/"; - license = licenses.asl20; + license = lib.licenses.asl20; longDescription = '' Intel Threading Building Blocks offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you @@ -122,11 +120,11 @@ stdenv.mkDerivation rec { represents a higher-level, task-based parallelism that abstracts platform details and threading mechanisms for scalability and performance. ''; - platforms = platforms.unix; - maintainers = with maintainers; [ + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ silvanshade thoughtpolice tmarkus ]; }; -} +}) diff --git a/pkgs/development/libraries/embree/2.x.nix b/pkgs/development/libraries/embree/2.x.nix index 8f70261921cc..05764262a979 100644 --- a/pkgs/development/libraries/embree/2.x.nix +++ b/pkgs/development/libraries/embree/2.x.nix @@ -5,7 +5,7 @@ cmake, pkg-config, ispc, - tbb_2020_3, + tbb_2020, glfw, openimageio_2, libjpeg, @@ -36,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ ispc # tbb_2021 is not backward compatible - tbb_2020_3 + tbb_2020 glfw openimageio_2 libjpeg @@ -52,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { "v(2.*)" ]; }; - tbb = tbb_2020_3; + tbb = tbb_2020; tests = { inherit (python3Packages) embreex; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f200d926456e..ffc880084775 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6100,9 +6100,8 @@ with pkgs; swi-prolog-gui = swi-prolog.override { withGui = true; }; - tbb_2020_3 = callPackage ../development/libraries/tbb/2020_3.nix { }; # many packages still fail with latest version - tbb = tbb_2020_3; + tbb = tbb_2020; teyjus = callPackage ../development/compilers/teyjus { inherit (ocaml-ng.ocamlPackages_4_14) buildDunePackage; From 79870dbb90191c70ca2e0bebb1845f322ad634f3 Mon Sep 17 00:00:00 2001 From: Saterfield990 Date: Wed, 18 Jun 2025 17:17:46 +0300 Subject: [PATCH 19/62] tbb_2020: 2020.3 -> 2020.3.3 --- pkgs/by-name/tb/tbb_2020/package.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/tb/tbb_2020/package.nix b/pkgs/by-name/tb/tbb_2020/package.nix index 317594329ba4..a5d6b0fbb235 100644 --- a/pkgs/by-name/tb/tbb_2020/package.nix +++ b/pkgs/by-name/tb/tbb_2020/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "tbb"; - version = "2020.3"; + version = "2020.3.3"; outputs = [ "out" @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "oneapi-src"; repo = "oneTBB"; tag = "v${finalAttrs.version}"; - hash = "sha256-prO2O5hd+Wz5iA0vfrqmyHFr0Ptzk64so5KpSpvuKmU="; + hash = "sha256-pCZpQ+t7dDzuS4vhlfSVLwieI0iSQHukXb8Nk5kMMBo="; }; patches = [ @@ -36,14 +36,6 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-xp8J/il855VTFIKCN/bFtf+vif6HzcVl4t4/L9nW/xk="; }) - # Fixes build with upcoming gcc-13: - # https://github.com/oneapi-src/oneTBB/pull/833 - (fetchpatch { - name = "gcc-13.patch"; - url = "https://github.com/oneapi-src/oneTBB/pull/833/commits/c18342ba667d1f33f5e9a773aa86b091a9694b97.patch"; - hash = "sha256-LWgf7Rm6Zp4TJdvMqnAkoAebbVS+WV2kB+4iY6jRka4="; - }) - # Fixes build for aarch64-darwin (fetchpatch { name = "aarch64-darwin.patch"; From 5929a11a168b7d728628f86a2a1bcb27d5e5ece5 Mon Sep 17 00:00:00 2001 From: Defelo Date: Wed, 18 Jun 2025 15:14:19 +0000 Subject: [PATCH 20/62] wofi-power-menu: 0.2.6 -> 0.2.7 --- pkgs/by-name/wo/wofi-power-menu/package.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/wo/wofi-power-menu/package.nix b/pkgs/by-name/wo/wofi-power-menu/package.nix index 06a8674e632f..49f04b70a13b 100644 --- a/pkgs/by-name/wo/wofi-power-menu/package.nix +++ b/pkgs/by-name/wo/wofi-power-menu/package.nix @@ -6,23 +6,31 @@ wofi, versionCheckHook, nix-update-script, + yq, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "wofi-power-menu"; - version = "0.2.6"; + version = "0.2.7"; src = fetchFromGitHub { owner = "szaffarano"; repo = "wofi-power-menu"; tag = "v${finalAttrs.version}"; - hash = "sha256-UDDDtI6wnx64KG+1/S6bYTc1xi1vOFuZOmRCLK2Yzew="; + hash = "sha256-WPTK9izFU8xZ5YVFuEGO5EoOzgpXWXQnGgeNYjnb/zA="; }; - useFetchCargoVendor = true; - cargoHash = "sha256-rlEjktBGBrOqG82PA7LSiXo0iyEPpeWgLix/sVd/dTM="; + postPatch = '' + tomlq -ti '.package.version = "0.2.7"' Cargo.toml + ''; - nativeBuildInputs = [ makeWrapper ]; + useFetchCargoVendor = true; + cargoHash = "sha256-oJd2ymNkNSGUD3cQ+bEHooAJQNeSarkIHWvGNXezwrM="; + + nativeBuildInputs = [ + makeWrapper + yq # for `tomlq` + ]; postInstall = '' wrapProgram $out/bin/wofi-power-menu \ From a40dde31b63a5c3748090b77d0f4a76b9618ca0f Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Wed, 18 Jun 2025 13:15:36 -0400 Subject: [PATCH 21/62] kanidm_1_5: mark EOL --- pkgs/by-name/ka/kanidm/1_5.nix | 1 + pkgs/top-level/release.nix | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ka/kanidm/1_5.nix b/pkgs/by-name/ka/kanidm/1_5.nix index 93afad5ee0f8..3d45f6b1e923 100644 --- a/pkgs/by-name/ka/kanidm/1_5.nix +++ b/pkgs/by-name/ka/kanidm/1_5.nix @@ -3,4 +3,5 @@ import ./generic.nix { hash = "sha256-swrqyjA7Wgq17vd+753LDFcXrSFixVNLhTvj1bhG3DU="; cargoHash = "sha256-72IwS8Nk1y6xDH9y8JW2LpbhFWaq0tpORx7JQSCF5/M="; patchDir = ./patches/1_5; + unsupported = true; } diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 7126252d7976..61218537e7e3 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -43,7 +43,8 @@ # so users choosing to allow don't have to rebuild them every time. permittedInsecurePackages = [ "olm-3.2.16" # see PR #347899 - "kanidm_1_4-1.4.6" + "kanidm_1_5-1.5.0" + "kanidmWithSecretProvisioning_1_5-1.5.0" ]; }; From 491f0239ab34db617bce8600b20f8aaa48885105 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Wed, 18 Jun 2025 13:15:36 -0400 Subject: [PATCH 22/62] kanidm_1_4: remove --- pkgs/by-name/ka/kanidm/1_4.nix | 7 - pkgs/by-name/ka/kanidm/README.md | 12 +- .../1_3/oauth2-basic-secret-modify.patch | 303 ----------------- .../kanidm/patches/1_3/recover-account.patch | 174 ---------- .../1_4/oauth2-basic-secret-modify.patch | 308 ------------------ .../kanidm/patches/1_4/recover-account.patch | 174 ---------- pkgs/top-level/aliases.nix | 2 + pkgs/top-level/all-packages.nix | 5 - 8 files changed, 6 insertions(+), 979 deletions(-) delete mode 100644 pkgs/by-name/ka/kanidm/1_4.nix delete mode 100644 pkgs/by-name/ka/kanidm/patches/1_3/oauth2-basic-secret-modify.patch delete mode 100644 pkgs/by-name/ka/kanidm/patches/1_3/recover-account.patch delete mode 100644 pkgs/by-name/ka/kanidm/patches/1_4/oauth2-basic-secret-modify.patch delete mode 100644 pkgs/by-name/ka/kanidm/patches/1_4/recover-account.patch diff --git a/pkgs/by-name/ka/kanidm/1_4.nix b/pkgs/by-name/ka/kanidm/1_4.nix deleted file mode 100644 index da046ce65626..000000000000 --- a/pkgs/by-name/ka/kanidm/1_4.nix +++ /dev/null @@ -1,7 +0,0 @@ -import ./generic.nix { - version = "1.4.6"; - hash = "sha256-pjJyq52wO5p34LN2Jmt0npgWBDcWin8gIX4skZ7Ff8E="; - cargoHash = "sha256-33HRoH/vWPe/wOZJtQLWV9eBocbj0iR/XUu4zMehu8M="; - patchDir = ./patches/1_4; - unsupported = true; -} diff --git a/pkgs/by-name/ka/kanidm/README.md b/pkgs/by-name/ka/kanidm/README.md index 30e751fe8166..c87b4dd4bca7 100644 --- a/pkgs/by-name/ka/kanidm/README.md +++ b/pkgs/by-name/ka/kanidm/README.md @@ -21,12 +21,7 @@ For example, when upgrading from 1.4 -> 1.5 1. Update `all-packages.nix` to add `kanidm_1_5` and `kanidmWithSecretProvisioning_1_5`, leave default 1. Create commit, `kanidm_1_5: init at 1.5.0` - this is the only commit that will be backported -### Mark previous version deprecated - -1. Update `pkgs/by-name/ka/kanidm/1_4.nix` by adding `deprecated = true;` -1. Create commit `kanidm_1_4: update default to 1.5.0, deprecate 1.4.0` - -### Update default and mark deprecation +### Update default 1. `sed -i 's/1_4/1_5/' pkgs/by-name/ka/kanidm/package.nix` 1. Update `all-packages.nix` and set `kanidmWithSecretProvisioning = kanidmWithSecretProvisioning_1_5;` @@ -41,9 +36,10 @@ For example, when upgrading from 1.4 -> 1.5 Kanidm versions are supported for 30 days after the release of new versions. Following the example above, 1.5.x superseding 1.4.x in 30 days, do the following near the end of the 30 day window 1. Update `pkgs/by-name/ka/kanidm/1_4.nix` by adding `unsupported = true;` -1. Update `pkgs/top-level/release.nix` and add `kanidm_1_4-1.4.6` to `permittedInsecurePackages` +1. Update `pkgs/top-level/release.nix` and add `kanidm_1_4-1.4.6` and `kanidmWithSecretProvisioning_1_4-1.4.6` to `permittedInsecurePackages` 1. Create commit `kanidm_1_4: mark EOL`, this commit alone should be backported 1. Remove the third oldest release from `all-packages.nix`, e.g. 1.3.x continuing the example. Remove `kanidm_1_3` and `kanidmWithSecretProvisioning_1_3` -1. Update `pkgs/top-level/release.nix` and remove `kanidm_1_3-1.3.3` from `permittedInsecurePackages` +1. Update `pkgs/top-level/release.nix` and remove `kanidm_1_3*` from `permittedInsecurePackages` +1. Update `pkgs/top-level/aliases.nix` and add `kanidm_1_4` and `kanidmWithSecretProvisioning_1_4-1.4.6` 1. Remove `pkgs/by-name/ka/kanidm/1_3.nix` diff --git a/pkgs/by-name/ka/kanidm/patches/1_3/oauth2-basic-secret-modify.patch b/pkgs/by-name/ka/kanidm/patches/1_3/oauth2-basic-secret-modify.patch deleted file mode 100644 index afff94ca51e9..000000000000 --- a/pkgs/by-name/ka/kanidm/patches/1_3/oauth2-basic-secret-modify.patch +++ /dev/null @@ -1,303 +0,0 @@ -From 44dfbc2b9dccce86c7d7e7b54db4c989344b8c56 Mon Sep 17 00:00:00 2001 -From: oddlama -Date: Mon, 12 Aug 2024 23:17:25 +0200 -Subject: [PATCH 1/2] oauth2 basic secret modify - ---- - server/core/src/actors/v1_write.rs | 42 ++++++++++++++++++++++++++++++ - server/core/src/https/v1.rs | 6 ++++- - server/core/src/https/v1_oauth2.rs | 29 +++++++++++++++++++++ - server/lib/src/constants/acp.rs | 6 +++++ - 4 files changed, 82 insertions(+), 1 deletion(-) - -diff --git a/server/core/src/actors/v1_write.rs b/server/core/src/actors/v1_write.rs -index e00a969fb..1cacc67b8 100644 ---- a/server/core/src/actors/v1_write.rs -+++ b/server/core/src/actors/v1_write.rs -@@ -315,20 +315,62 @@ impl QueryServerWriteV1 { - }; - - trace!(?del, "Begin delete event"); - - idms_prox_write - .qs_write - .delete(&del) - .and_then(|_| idms_prox_write.commit().map(|_| ())) - } - -+ #[instrument( -+ level = "info", -+ skip_all, -+ fields(uuid = ?eventid) -+ )] -+ pub async fn handle_oauth2_basic_secret_write( -+ &self, -+ client_auth_info: ClientAuthInfo, -+ filter: Filter, -+ new_secret: String, -+ eventid: Uuid, -+ ) -> Result<(), OperationError> { -+ // Given a protoEntry, turn this into a modification set. -+ let ct = duration_from_epoch_now(); -+ let mut idms_prox_write = self.idms.proxy_write(ct).await; -+ let ident = idms_prox_write -+ .validate_client_auth_info_to_ident(client_auth_info, ct) -+ .map_err(|e| { -+ admin_error!(err = ?e, "Invalid identity"); -+ e -+ })?; -+ -+ let modlist = ModifyList::new_purge_and_set( -+ Attribute::OAuth2RsBasicSecret, -+ Value::SecretValue(new_secret), -+ ); -+ -+ let mdf = -+ ModifyEvent::from_internal_parts(ident, &modlist, &filter, &idms_prox_write.qs_write) -+ .map_err(|e| { -+ admin_error!(err = ?e, "Failed to begin modify during handle_oauth2_basic_secret_write"); -+ e -+ })?; -+ -+ trace!(?mdf, "Begin modify event"); -+ -+ idms_prox_write -+ .qs_write -+ .modify(&mdf) -+ .and_then(|_| idms_prox_write.commit()) -+ } -+ - #[instrument( - level = "info", - skip_all, - fields(uuid = ?eventid) - )] - pub async fn handle_reviverecycled( - &self, - client_auth_info: ClientAuthInfo, - filter: Filter, - eventid: Uuid, -diff --git a/server/core/src/https/v1.rs b/server/core/src/https/v1.rs -index 8aba83bb2..f1f815026 100644 ---- a/server/core/src/https/v1.rs -+++ b/server/core/src/https/v1.rs -@@ -1,17 +1,17 @@ - //! The V1 API things! - - use axum::extract::{Path, State}; - use axum::http::{HeaderMap, HeaderValue}; - use axum::middleware::from_fn; - use axum::response::{IntoResponse, Response}; --use axum::routing::{delete, get, post, put}; -+use axum::routing::{delete, get, post, put, patch}; - use axum::{Extension, Json, Router}; - use axum_extra::extract::cookie::{Cookie, CookieJar, SameSite}; - use compact_jwt::{Jwk, Jws, JwsSigner}; - use kanidm_proto::constants::uri::V1_AUTH_VALID; - use std::net::IpAddr; - use uuid::Uuid; - - use kanidm_proto::internal::{ - ApiToken, AppLink, CUIntentToken, CURequest, CUSessionToken, CUStatus, CreateRequest, - CredentialStatus, DeleteRequest, IdentifyUserRequest, IdentifyUserResponse, ModifyRequest, -@@ -3119,20 +3119,24 @@ pub(crate) fn route_setup(state: ServerState) -> Router { - ) - .route( - "/v1/oauth2/:rs_name/_image", - post(super::v1_oauth2::oauth2_id_image_post) - .delete(super::v1_oauth2::oauth2_id_image_delete), - ) - .route( - "/v1/oauth2/:rs_name/_basic_secret", - get(super::v1_oauth2::oauth2_id_get_basic_secret), - ) -+ .route( -+ "/v1/oauth2/:rs_name/_basic_secret", -+ patch(super::v1_oauth2::oauth2_id_patch_basic_secret), -+ ) - .route( - "/v1/oauth2/:rs_name/_scopemap/:group", - post(super::v1_oauth2::oauth2_id_scopemap_post) - .delete(super::v1_oauth2::oauth2_id_scopemap_delete), - ) - .route( - "/v1/oauth2/:rs_name/_sup_scopemap/:group", - post(super::v1_oauth2::oauth2_id_sup_scopemap_post) - .delete(super::v1_oauth2::oauth2_id_sup_scopemap_delete), - ) -diff --git a/server/core/src/https/v1_oauth2.rs b/server/core/src/https/v1_oauth2.rs -index 5e481afab..a771aed04 100644 ---- a/server/core/src/https/v1_oauth2.rs -+++ b/server/core/src/https/v1_oauth2.rs -@@ -144,20 +144,49 @@ pub(crate) async fn oauth2_id_get_basic_secret( - ) -> Result>, WebError> { - let filter = oauth2_id(&rs_name); - state - .qe_r_ref - .handle_oauth2_basic_secret_read(client_auth_info, filter, kopid.eventid) - .await - .map(Json::from) - .map_err(WebError::from) - } - -+#[utoipa::path( -+ patch, -+ path = "/v1/oauth2/{rs_name}/_basic_secret", -+ request_body=ProtoEntry, -+ responses( -+ DefaultApiResponse, -+ ), -+ security(("token_jwt" = [])), -+ tag = "v1/oauth2", -+ operation_id = "oauth2_id_patch_basic_secret" -+)] -+/// Overwrite the basic secret for a given OAuth2 Resource Server. -+#[instrument(level = "info", skip(state, new_secret))] -+pub(crate) async fn oauth2_id_patch_basic_secret( -+ State(state): State, -+ Extension(kopid): Extension, -+ VerifiedClientInformation(client_auth_info): VerifiedClientInformation, -+ Path(rs_name): Path, -+ Json(new_secret): Json, -+) -> Result, WebError> { -+ let filter = oauth2_id(&rs_name); -+ state -+ .qe_w_ref -+ .handle_oauth2_basic_secret_write(client_auth_info, filter, new_secret, kopid.eventid) -+ .await -+ .map(Json::from) -+ .map_err(WebError::from) -+} -+ - #[utoipa::path( - patch, - path = "/v1/oauth2/{rs_name}", - request_body=ProtoEntry, - responses( - DefaultApiResponse, - ), - security(("token_jwt" = [])), - tag = "v1/oauth2", - operation_id = "oauth2_id_patch" -diff --git a/server/lib/src/constants/acp.rs b/server/lib/src/constants/acp.rs -index f3409649d..42e407b7d 100644 ---- a/server/lib/src/constants/acp.rs -+++ b/server/lib/src/constants/acp.rs -@@ -645,34 +645,36 @@ lazy_static! { - Attribute::Image, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::Image, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::Image, - ], - create_classes: vec![ - EntryClass::Object, - EntryClass::OAuth2ResourceServer, - EntryClass::OAuth2ResourceServerBasic, - EntryClass::OAuth2ResourceServerPublic, -@@ -739,36 +741,38 @@ lazy_static! { - Attribute::Image, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_classes: vec![ - EntryClass::Object, - EntryClass::OAuth2ResourceServer, -@@ -840,36 +844,38 @@ lazy_static! { - Attribute::Image, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::Name, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::Name, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_classes: vec![ - EntryClass::Object, - EntryClass::Account, --- -2.45.2 - diff --git a/pkgs/by-name/ka/kanidm/patches/1_3/recover-account.patch b/pkgs/by-name/ka/kanidm/patches/1_3/recover-account.patch deleted file mode 100644 index 5f676bdbc103..000000000000 --- a/pkgs/by-name/ka/kanidm/patches/1_3/recover-account.patch +++ /dev/null @@ -1,174 +0,0 @@ -From cc8269489b56755714f07eee4671f8aa2659c014 Mon Sep 17 00:00:00 2001 -From: oddlama -Date: Mon, 12 Aug 2024 23:17:42 +0200 -Subject: [PATCH 2/2] recover account - ---- - server/core/src/actors/internal.rs | 3 ++- - server/core/src/admin.rs | 6 +++--- - server/daemon/src/main.rs | 14 +++++++++++++- - server/daemon/src/opt.rs | 4 ++++ - 4 files changed, 22 insertions(+), 5 deletions(-) - -diff --git a/server/core/src/actors/internal.rs b/server/core/src/actors/internal.rs -index 40c18777f..40d553b40 100644 ---- a/server/core/src/actors/internal.rs -+++ b/server/core/src/actors/internal.rs -@@ -153,25 +153,26 @@ impl QueryServerWriteV1 { - } - - #[instrument( - level = "info", -- skip(self, eventid), -+ skip(self, password, eventid), - fields(uuid = ?eventid) - )] - pub(crate) async fn handle_admin_recover_account( - &self, - name: String, -+ password: Option, - eventid: Uuid, - ) -> Result { - let ct = duration_from_epoch_now(); - let mut idms_prox_write = self.idms.proxy_write(ct).await; -- let pw = idms_prox_write.recover_account(name.as_str(), None)?; -+ let pw = idms_prox_write.recover_account(name.as_str(), password.as_deref())?; - - idms_prox_write.commit().map(|()| pw) - } - - #[instrument( - level = "info", - skip_all, - fields(uuid = ?eventid) - )] - pub(crate) async fn handle_domain_raise(&self, eventid: Uuid) -> Result { -diff --git a/server/core/src/admin.rs b/server/core/src/admin.rs -index 90ccb1927..85e31ddef 100644 ---- a/server/core/src/admin.rs -+++ b/server/core/src/admin.rs -@@ -17,21 +17,21 @@ use tokio_util::codec::{Decoder, Encoder, Framed}; - use tracing::{span, Instrument, Level}; - use uuid::Uuid; - - pub use kanidm_proto::internal::{ - DomainInfo as ProtoDomainInfo, DomainUpgradeCheckReport as ProtoDomainUpgradeCheckReport, - DomainUpgradeCheckStatus as ProtoDomainUpgradeCheckStatus, - }; - - #[derive(Serialize, Deserialize, Debug)] - pub enum AdminTaskRequest { -- RecoverAccount { name: String }, -+ RecoverAccount { name: String, password: Option }, - ShowReplicationCertificate, - RenewReplicationCertificate, - RefreshReplicationConsumer, - DomainShow, - DomainUpgradeCheck, - DomainRaise, - DomainRemigrate { level: Option }, - } - - #[derive(Serialize, Deserialize, Debug)] -@@ -302,22 +302,22 @@ async fn handle_client( - let mut reqs = Framed::new(sock, ServerCodec); - - trace!("Waiting for requests ..."); - while let Some(Ok(req)) = reqs.next().await { - // Setup the logging span - let eventid = Uuid::new_v4(); - let nspan = span!(Level::INFO, "handle_admin_client_request", uuid = ?eventid); - - let resp = async { - match req { -- AdminTaskRequest::RecoverAccount { name } => { -- match server_rw.handle_admin_recover_account(name, eventid).await { -+ AdminTaskRequest::RecoverAccount { name, password } => { -+ match server_rw.handle_admin_recover_account(name, password, eventid).await { - Ok(password) => AdminTaskResponse::RecoverAccount { password }, - Err(e) => { - error!(err = ?e, "error during recover-account"); - AdminTaskResponse::Error - } - } - } - AdminTaskRequest::ShowReplicationCertificate => match repl_ctrl_tx.as_mut() { - Some(ctrl_tx) => show_replication_certificate(ctrl_tx).await, - None => { -diff --git a/server/daemon/src/main.rs b/server/daemon/src/main.rs -index 577995615..a967928c9 100644 ---- a/server/daemon/src/main.rs -+++ b/server/daemon/src/main.rs -@@ -894,27 +894,39 @@ async fn kanidm_main( - } else { - let output_mode: ConsoleOutputMode = commonopts.output_mode.to_owned().into(); - submit_admin_req( - config.adminbindpath.as_str(), - AdminTaskRequest::RefreshReplicationConsumer, - output_mode, - ) - .await; - } - } -- KanidmdOpt::RecoverAccount { name, commonopts } => { -+ KanidmdOpt::RecoverAccount { name, from_environment, commonopts } => { - info!("Running account recovery ..."); - let output_mode: ConsoleOutputMode = commonopts.output_mode.to_owned().into(); -+ let password = if *from_environment { -+ match std::env::var("KANIDM_RECOVER_ACCOUNT_PASSWORD") { -+ Ok(val) => Some(val), -+ _ => { -+ error!("Environment variable KANIDM_RECOVER_ACCOUNT_PASSWORD not set"); -+ return ExitCode::FAILURE; -+ } -+ } -+ } else { -+ None -+ }; - submit_admin_req( - config.adminbindpath.as_str(), - AdminTaskRequest::RecoverAccount { - name: name.to_owned(), -+ password, - }, - output_mode, - ) - .await; - } - KanidmdOpt::Database { - commands: DbCommands::Reindex(_copt), - } => { - info!("Running in reindex mode ..."); - reindex_server_core(&config).await; -diff --git a/server/daemon/src/opt.rs b/server/daemon/src/opt.rs -index f1b45a5b3..9c013e32e 100644 ---- a/server/daemon/src/opt.rs -+++ b/server/daemon/src/opt.rs -@@ -229,20 +229,24 @@ enum KanidmdOpt { - /// Create a self-signed ca and tls certificate in the locations listed from the - /// configuration. These certificates should *not* be used in production, they - /// are for testing and evaluation only! - CertGenerate(CommonOpt), - #[clap(name = "recover-account")] - /// Recover an account's password - RecoverAccount { - #[clap(value_parser)] - /// The account name to recover credentials for. - name: String, -+ /// Use the password given in the environment variable -+ /// `KANIDM_RECOVER_ACCOUNT_PASSWORD` instead of generating one. -+ #[clap(long = "from-environment")] -+ from_environment: bool, - #[clap(flatten)] - commonopts: CommonOpt, - }, - /// Display this server's replication certificate - ShowReplicationCertificate { - #[clap(flatten)] - commonopts: CommonOpt, - }, - /// Renew this server's replication certificate - RenewReplicationCertificate { --- -2.45.2 - diff --git a/pkgs/by-name/ka/kanidm/patches/1_4/oauth2-basic-secret-modify.patch b/pkgs/by-name/ka/kanidm/patches/1_4/oauth2-basic-secret-modify.patch deleted file mode 100644 index 80bd4c16bd9b..000000000000 --- a/pkgs/by-name/ka/kanidm/patches/1_4/oauth2-basic-secret-modify.patch +++ /dev/null @@ -1,308 +0,0 @@ -From e9dfca73e6fb80faf6fc106e7aee6b93c0908525 Mon Sep 17 00:00:00 2001 -From: oddlama -Date: Fri, 1 Nov 2024 12:26:17 +0100 -Subject: [PATCH 1/2] oauth2 basic secret modify - ---- - server/core/src/actors/v1_write.rs | 42 ++++++++++++++++++++++++++++++ - server/core/src/https/v1.rs | 6 ++++- - server/core/src/https/v1_oauth2.rs | 29 +++++++++++++++++++++ - server/lib/src/constants/acp.rs | 6 +++++ - 4 files changed, 82 insertions(+), 1 deletion(-) - -diff --git a/server/core/src/actors/v1_write.rs b/server/core/src/actors/v1_write.rs -index 732e826c8..0fe66503f 100644 ---- a/server/core/src/actors/v1_write.rs -+++ b/server/core/src/actors/v1_write.rs -@@ -317,20 +317,62 @@ impl QueryServerWriteV1 { - }; - - trace!(?del, "Begin delete event"); - - idms_prox_write - .qs_write - .delete(&del) - .and_then(|_| idms_prox_write.commit().map(|_| ())) - } - -+ #[instrument( -+ level = "info", -+ skip_all, -+ fields(uuid = ?eventid) -+ )] -+ pub async fn handle_oauth2_basic_secret_write( -+ &self, -+ client_auth_info: ClientAuthInfo, -+ filter: Filter, -+ new_secret: String, -+ eventid: Uuid, -+ ) -> Result<(), OperationError> { -+ // Given a protoEntry, turn this into a modification set. -+ let ct = duration_from_epoch_now(); -+ let mut idms_prox_write = self.idms.proxy_write(ct).await?; -+ let ident = idms_prox_write -+ .validate_client_auth_info_to_ident(client_auth_info, ct) -+ .map_err(|e| { -+ admin_error!(err = ?e, "Invalid identity"); -+ e -+ })?; -+ -+ let modlist = ModifyList::new_purge_and_set( -+ Attribute::OAuth2RsBasicSecret, -+ Value::SecretValue(new_secret), -+ ); -+ -+ let mdf = -+ ModifyEvent::from_internal_parts(ident, &modlist, &filter, &idms_prox_write.qs_write) -+ .map_err(|e| { -+ admin_error!(err = ?e, "Failed to begin modify during handle_oauth2_basic_secret_write"); -+ e -+ })?; -+ -+ trace!(?mdf, "Begin modify event"); -+ -+ idms_prox_write -+ .qs_write -+ .modify(&mdf) -+ .and_then(|_| idms_prox_write.commit()) -+ } -+ - #[instrument( - level = "info", - skip_all, - fields(uuid = ?eventid) - )] - pub async fn handle_reviverecycled( - &self, - client_auth_info: ClientAuthInfo, - filter: Filter, - eventid: Uuid, -diff --git a/server/core/src/https/v1.rs b/server/core/src/https/v1.rs -index c410a4b5d..cc67cac6c 100644 ---- a/server/core/src/https/v1.rs -+++ b/server/core/src/https/v1.rs -@@ -1,17 +1,17 @@ - //! The V1 API things! - - use axum::extract::{Path, State}; - use axum::http::{HeaderMap, HeaderValue}; - use axum::middleware::from_fn; - use axum::response::{IntoResponse, Response}; --use axum::routing::{delete, get, post, put}; -+use axum::routing::{delete, get, post, put, patch}; - use axum::{Extension, Json, Router}; - use axum_extra::extract::cookie::{Cookie, CookieJar, SameSite}; - use compact_jwt::{Jwk, Jws, JwsSigner}; - use kanidm_proto::constants::uri::V1_AUTH_VALID; - use std::net::IpAddr; - use uuid::Uuid; - - use kanidm_proto::internal::{ - ApiToken, AppLink, CUIntentToken, CURequest, CUSessionToken, CUStatus, CreateRequest, - CredentialStatus, DeleteRequest, IdentifyUserRequest, IdentifyUserResponse, ModifyRequest, -@@ -3120,20 +3120,24 @@ pub(crate) fn route_setup(state: ServerState) -> Router { - ) - .route( - "/v1/oauth2/:rs_name/_image", - post(super::v1_oauth2::oauth2_id_image_post) - .delete(super::v1_oauth2::oauth2_id_image_delete), - ) - .route( - "/v1/oauth2/:rs_name/_basic_secret", - get(super::v1_oauth2::oauth2_id_get_basic_secret), - ) -+ .route( -+ "/v1/oauth2/:rs_name/_basic_secret", -+ patch(super::v1_oauth2::oauth2_id_patch_basic_secret), -+ ) - .route( - "/v1/oauth2/:rs_name/_scopemap/:group", - post(super::v1_oauth2::oauth2_id_scopemap_post) - .delete(super::v1_oauth2::oauth2_id_scopemap_delete), - ) - .route( - "/v1/oauth2/:rs_name/_sup_scopemap/:group", - post(super::v1_oauth2::oauth2_id_sup_scopemap_post) - .delete(super::v1_oauth2::oauth2_id_sup_scopemap_delete), - ) -diff --git a/server/core/src/https/v1_oauth2.rs b/server/core/src/https/v1_oauth2.rs -index d3966a7ad..f89c02c69 100644 ---- a/server/core/src/https/v1_oauth2.rs -+++ b/server/core/src/https/v1_oauth2.rs -@@ -144,20 +144,49 @@ pub(crate) async fn oauth2_id_get_basic_secret( - ) -> Result>, WebError> { - let filter = oauth2_id(&rs_name); - state - .qe_r_ref - .handle_oauth2_basic_secret_read(client_auth_info, filter, kopid.eventid) - .await - .map(Json::from) - .map_err(WebError::from) - } - -+#[utoipa::path( -+ patch, -+ path = "/v1/oauth2/{rs_name}/_basic_secret", -+ request_body=ProtoEntry, -+ responses( -+ DefaultApiResponse, -+ ), -+ security(("token_jwt" = [])), -+ tag = "v1/oauth2", -+ operation_id = "oauth2_id_patch_basic_secret" -+)] -+/// Overwrite the basic secret for a given OAuth2 Resource Server. -+#[instrument(level = "info", skip(state, new_secret))] -+pub(crate) async fn oauth2_id_patch_basic_secret( -+ State(state): State, -+ Extension(kopid): Extension, -+ VerifiedClientInformation(client_auth_info): VerifiedClientInformation, -+ Path(rs_name): Path, -+ Json(new_secret): Json, -+) -> Result, WebError> { -+ let filter = oauth2_id(&rs_name); -+ state -+ .qe_w_ref -+ .handle_oauth2_basic_secret_write(client_auth_info, filter, new_secret, kopid.eventid) -+ .await -+ .map(Json::from) -+ .map_err(WebError::from) -+} -+ - #[utoipa::path( - patch, - path = "/v1/oauth2/{rs_name}", - request_body=ProtoEntry, - responses( - DefaultApiResponse, - ), - security(("token_jwt" = [])), - tag = "v1/oauth2", - operation_id = "oauth2_id_patch" -diff --git a/server/lib/src/constants/acp.rs b/server/lib/src/constants/acp.rs -index be1836345..ebf4445be 100644 ---- a/server/lib/src/constants/acp.rs -+++ b/server/lib/src/constants/acp.rs -@@ -658,36 +658,38 @@ lazy_static! { - Attribute::Image, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_classes: vec![ - EntryClass::Object, - EntryClass::OAuth2ResourceServer, -@@ -759,37 +761,39 @@ lazy_static! { - Attribute::Image, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::Name, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::Name, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - ], - create_classes: vec![ - EntryClass::Object, - EntryClass::Account, -@@ -864,38 +868,40 @@ lazy_static! { - Attribute::OAuth2StrictRedirectUri, - ], - modify_present_attrs: vec![ - Attribute::Description, - Attribute::DisplayName, - Attribute::Name, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - Attribute::OAuth2StrictRedirectUri, - ], - create_attrs: vec![ - Attribute::Class, - Attribute::Description, - Attribute::Name, - Attribute::DisplayName, - Attribute::OAuth2RsName, - Attribute::OAuth2RsOrigin, - Attribute::OAuth2RsOriginLanding, - Attribute::OAuth2RsSupScopeMap, - Attribute::OAuth2RsScopeMap, -+ Attribute::OAuth2RsBasicSecret, - Attribute::OAuth2AllowInsecureClientDisablePkce, - Attribute::OAuth2JwtLegacyCryptoEnable, - Attribute::OAuth2PreferShortUsername, - Attribute::OAuth2AllowLocalhostRedirect, - Attribute::OAuth2RsClaimMap, - Attribute::Image, - Attribute::OAuth2StrictRedirectUri, - ], - create_classes: vec![ - EntryClass::Object, --- -2.46.1 - diff --git a/pkgs/by-name/ka/kanidm/patches/1_4/recover-account.patch b/pkgs/by-name/ka/kanidm/patches/1_4/recover-account.patch deleted file mode 100644 index 312c412809d8..000000000000 --- a/pkgs/by-name/ka/kanidm/patches/1_4/recover-account.patch +++ /dev/null @@ -1,174 +0,0 @@ -From c8ed69efe3f702b19834c2659be1dd3ec2d41c17 Mon Sep 17 00:00:00 2001 -From: oddlama -Date: Fri, 1 Nov 2024 12:27:43 +0100 -Subject: [PATCH 2/2] recover account - ---- - server/core/src/actors/internal.rs | 3 ++- - server/core/src/admin.rs | 6 +++--- - server/daemon/src/main.rs | 14 +++++++++++++- - server/daemon/src/opt.rs | 4 ++++ - 4 files changed, 22 insertions(+), 5 deletions(-) - -diff --git a/server/core/src/actors/internal.rs b/server/core/src/actors/internal.rs -index 420e72c6c..5c4353116 100644 ---- a/server/core/src/actors/internal.rs -+++ b/server/core/src/actors/internal.rs -@@ -171,25 +171,26 @@ impl QueryServerWriteV1 { - } - - #[instrument( - level = "info", -- skip(self, eventid), -+ skip(self, password, eventid), - fields(uuid = ?eventid) - )] - pub(crate) async fn handle_admin_recover_account( - &self, - name: String, -+ password: Option, - eventid: Uuid, - ) -> Result { - let ct = duration_from_epoch_now(); - let mut idms_prox_write = self.idms.proxy_write(ct).await?; -- let pw = idms_prox_write.recover_account(name.as_str(), None)?; -+ let pw = idms_prox_write.recover_account(name.as_str(), password.as_deref())?; - - idms_prox_write.commit().map(|()| pw) - } - - #[instrument( - level = "info", - skip_all, - fields(uuid = ?eventid) - )] - pub(crate) async fn handle_domain_raise(&self, eventid: Uuid) -> Result { -diff --git a/server/core/src/admin.rs b/server/core/src/admin.rs -index 90ccb1927..85e31ddef 100644 ---- a/server/core/src/admin.rs -+++ b/server/core/src/admin.rs -@@ -17,21 +17,21 @@ use tokio_util::codec::{Decoder, Encoder, Framed}; - use tracing::{span, Instrument, Level}; - use uuid::Uuid; - - pub use kanidm_proto::internal::{ - DomainInfo as ProtoDomainInfo, DomainUpgradeCheckReport as ProtoDomainUpgradeCheckReport, - DomainUpgradeCheckStatus as ProtoDomainUpgradeCheckStatus, - }; - - #[derive(Serialize, Deserialize, Debug)] - pub enum AdminTaskRequest { -- RecoverAccount { name: String }, -+ RecoverAccount { name: String, password: Option }, - ShowReplicationCertificate, - RenewReplicationCertificate, - RefreshReplicationConsumer, - DomainShow, - DomainUpgradeCheck, - DomainRaise, - DomainRemigrate { level: Option }, - } - - #[derive(Serialize, Deserialize, Debug)] -@@ -302,22 +302,22 @@ async fn handle_client( - let mut reqs = Framed::new(sock, ServerCodec); - - trace!("Waiting for requests ..."); - while let Some(Ok(req)) = reqs.next().await { - // Setup the logging span - let eventid = Uuid::new_v4(); - let nspan = span!(Level::INFO, "handle_admin_client_request", uuid = ?eventid); - - let resp = async { - match req { -- AdminTaskRequest::RecoverAccount { name } => { -- match server_rw.handle_admin_recover_account(name, eventid).await { -+ AdminTaskRequest::RecoverAccount { name, password } => { -+ match server_rw.handle_admin_recover_account(name, password, eventid).await { - Ok(password) => AdminTaskResponse::RecoverAccount { password }, - Err(e) => { - error!(err = ?e, "error during recover-account"); - AdminTaskResponse::Error - } - } - } - AdminTaskRequest::ShowReplicationCertificate => match repl_ctrl_tx.as_mut() { - Some(ctrl_tx) => show_replication_certificate(ctrl_tx).await, - None => { -diff --git a/server/daemon/src/main.rs b/server/daemon/src/main.rs -index 7486d34a8..784106352 100644 ---- a/server/daemon/src/main.rs -+++ b/server/daemon/src/main.rs -@@ -903,27 +903,39 @@ async fn kanidm_main( - } else { - let output_mode: ConsoleOutputMode = commonopts.output_mode.to_owned().into(); - submit_admin_req( - config.adminbindpath.as_str(), - AdminTaskRequest::RefreshReplicationConsumer, - output_mode, - ) - .await; - } - } -- KanidmdOpt::RecoverAccount { name, commonopts } => { -+ KanidmdOpt::RecoverAccount { name, from_environment, commonopts } => { - info!("Running account recovery ..."); - let output_mode: ConsoleOutputMode = commonopts.output_mode.to_owned().into(); -+ let password = if *from_environment { -+ match std::env::var("KANIDM_RECOVER_ACCOUNT_PASSWORD") { -+ Ok(val) => Some(val), -+ _ => { -+ error!("Environment variable KANIDM_RECOVER_ACCOUNT_PASSWORD not set"); -+ return ExitCode::FAILURE; -+ } -+ } -+ } else { -+ None -+ }; - submit_admin_req( - config.adminbindpath.as_str(), - AdminTaskRequest::RecoverAccount { - name: name.to_owned(), -+ password, - }, - output_mode, - ) - .await; - } - KanidmdOpt::Database { - commands: DbCommands::Reindex(_copt), - } => { - info!("Running in reindex mode ..."); - reindex_server_core(&config).await; -diff --git a/server/daemon/src/opt.rs b/server/daemon/src/opt.rs -index f1b45a5b3..9c013e32e 100644 ---- a/server/daemon/src/opt.rs -+++ b/server/daemon/src/opt.rs -@@ -229,20 +229,24 @@ enum KanidmdOpt { - /// Create a self-signed ca and tls certificate in the locations listed from the - /// configuration. These certificates should *not* be used in production, they - /// are for testing and evaluation only! - CertGenerate(CommonOpt), - #[clap(name = "recover-account")] - /// Recover an account's password - RecoverAccount { - #[clap(value_parser)] - /// The account name to recover credentials for. - name: String, -+ /// Use the password given in the environment variable -+ /// `KANIDM_RECOVER_ACCOUNT_PASSWORD` instead of generating one. -+ #[clap(long = "from-environment")] -+ from_environment: bool, - #[clap(flatten)] - commonopts: CommonOpt, - }, - /// Display this server's replication certificate - ShowReplicationCertificate { - #[clap(flatten)] - commonopts: CommonOpt, - }, - /// Renew this server's replication certificate - RenewReplicationCertificate { --- -2.46.1 - diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 12ac5db7703e..1d69e29d4e1c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -973,6 +973,8 @@ mapAliases { kafkacat = throw "'kafkacat' has been renamed to/replaced by 'kcat'"; # Converted to throw 2024-10-17 kak-lsp = kakoune-lsp; # Added 2024-04-01 kanidm_1_3 = throw "'kanidm_1_3' has been removed as it has reached end of life"; # Added 2025-03-10 + kanidm_1_4 = throw "'kanidm_1_4' has been removed as it has reached end of life"; # Added 2025-06-18 + kanidmWithSecretProvisioning_1_4 = throw "'kanidmWithSecretProvisioning_1_4' has been removed as it has reached end of life"; # Added 2025-06-18 kdbplus = throw "'kdbplus' has been removed from nixpkgs"; # Added 2024-05-06 kdeconnect = throw "'kdeconnect' has been renamed to/replaced by 'plasma5Packages.kdeconnect-kde'"; # Converted to throw 2024-10-17 keepkey_agent = keepkey-agent; # added 2024-01-06 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 254403a5c8f0..cf0c57a51fc1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10375,16 +10375,11 @@ with pkgs; jetty = jetty_12; - kanidm_1_4 = callPackage ../by-name/ka/kanidm/1_4.nix { kanidm = kanidm_1_4; }; kanidm_1_5 = callPackage ../by-name/ka/kanidm/1_5.nix { kanidm = kanidm_1_5; }; kanidm_1_6 = callPackage ../by-name/ka/kanidm/1_6.nix { kanidm = kanidm_1_6; }; kanidmWithSecretProvisioning = kanidmWithSecretProvisioning_1_6; - kanidmWithSecretProvisioning_1_4 = callPackage ../by-name/ka/kanidm/1_4.nix { - enableSecretProvisioning = true; - }; - kanidmWithSecretProvisioning_1_5 = callPackage ../by-name/ka/kanidm/1_5.nix { enableSecretProvisioning = true; }; From 22b74b95bcaf58836957f2ecb8bd9baafacc7da1 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 18 Jun 2025 19:12:24 -0400 Subject: [PATCH 23/62] matrix-synapse: apply patch fixing build with libxml >= 2.14 --- pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix b/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix index 69acde9bad8c..60c8bd9400ab 100644 --- a/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix +++ b/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, python3, openssl, libiconv, @@ -27,6 +28,15 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-nXDVkuV5GCk0Lp4LfyiModKdO30PJ40B5mXdm5tMHQo="; }; + patches = [ + # Skip broken HTML preview test case with libxml >= 2.14 + # https://github.com/element-hq/synapse/pull/18413 + (fetchpatch { + url = "https://github.com/element-hq/synapse/commit/8aad32965888476b4660bf8228d2d2aa9ccc848b.patch"; + hash = "sha256-EUEbF442nOAybMI8EL6Ee0ib3JqSlQQ04f5Az3quKko="; + }) + ]; + cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; hash = "sha256-9VJnn8aPkShqK2wYGFr+S5koIjma7VOr+LkLXwStL1E="; From 83ef4fc3871086eb93bebd10adcf2a7cdd3c3f97 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Wed, 18 Jun 2025 19:13:39 -0400 Subject: [PATCH 24/62] matrix-synapse: 1.131.0 -> 1.132.0 Diff: https://github.com/element-hq/synapse/compare/v1.131.0...v1.132.0 Changelog: https://github.com/element-hq/synapse/releases/tag/v1.132.0 --- pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix b/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix index 60c8bd9400ab..2b0914ba526f 100644 --- a/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix +++ b/pkgs/by-name/ma/matrix-synapse-unwrapped/package.nix @@ -18,14 +18,14 @@ let in python3.pkgs.buildPythonApplication rec { pname = "matrix-synapse"; - version = "1.131.0"; + version = "1.132.0"; format = "pyproject"; src = fetchFromGitHub { owner = "element-hq"; repo = "synapse"; rev = "v${version}"; - hash = "sha256-nXDVkuV5GCk0Lp4LfyiModKdO30PJ40B5mXdm5tMHQo="; + hash = "sha256-yKoBYwd2djHAawBJRcbdrJH16+MHpYQnU7h39SvWqYE="; }; patches = [ From 6f161356e104869336a0558e2653500a12c0b302 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Jun 2025 07:10:48 +0000 Subject: [PATCH 25/62] parabolic: 2025.5.5 -> 2025.6.0 --- pkgs/by-name/pa/parabolic/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pa/parabolic/package.nix b/pkgs/by-name/pa/parabolic/package.nix index 3cfad771733c..0442d2aaf860 100644 --- a/pkgs/by-name/pa/parabolic/package.nix +++ b/pkgs/by-name/pa/parabolic/package.nix @@ -34,13 +34,13 @@ assert lib.assertOneOf "uiPlatform" uiPlatform [ stdenv.mkDerivation (finalAttrs: { pname = "parabolic"; - version = "2025.5.5"; + version = "2025.6.0"; src = fetchFromGitHub { owner = "NickvisionApps"; repo = "Parabolic"; tag = finalAttrs.version; - hash = "sha256-OcWpOC4QZUAGSsK6YXAO+24pY1d8a1AK3BzQKBu/obc="; + hash = "sha256-Osfj/GaD4t85ZYnlFDqgHhLJLA8VvgqtHEJN8bn0SxI="; }; # Patches desktop file/dbus service bypassing wrapped executable From 73406103becc8e6d29a42172a8fbd0fef66d35d8 Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Thu, 19 Jun 2025 09:51:45 +0200 Subject: [PATCH 26/62] gopher64: 1.0.16 -> 1.0.17 --- pkgs/by-name/go/gopher64/package.nix | 6 ++--- .../go/gopher64/use-sdl3-via-pkg-config.patch | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/go/gopher64/package.nix b/pkgs/by-name/go/gopher64/package.nix index 8254e920f1b8..38837227cdc4 100644 --- a/pkgs/by-name/go/gopher64/package.nix +++ b/pkgs/by-name/go/gopher64/package.nix @@ -19,13 +19,13 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "gopher64"; - version = "1.0.16"; + version = "1.0.17"; src = fetchFromGitHub { owner = "gopher64"; repo = "gopher64"; tag = "v${finalAttrs.version}"; - hash = "sha256-TduOmKK4OAmhP2VUT0eeoKHQHmsM8kptrxfgCdDFTRU="; + hash = "sha256-DDFtPISV17jQMECBIqYbbGhZpjYXuNnOq7EiEVtSzgc="; fetchSubmodules = true; leaveDotGit = true; postFetch = '' @@ -51,7 +51,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; useFetchCargoVendor = true; - cargoHash = "sha256-9fZ7zFTqt1VNnmCqFzWrZFD1PQZ7paz7r2Mb+9+C9Rs="; + cargoHash = "sha256-31kEYwlDA6iYcwPZyQU4gM/VLfPNeYcDKhhBqzNp/QE="; env.ZSTD_SYS_USE_PKG_CONFIG = true; diff --git a/pkgs/by-name/go/gopher64/use-sdl3-via-pkg-config.patch b/pkgs/by-name/go/gopher64/use-sdl3-via-pkg-config.patch index 7db5ce5ea8ff..1eb8f968f8e2 100644 --- a/pkgs/by-name/go/gopher64/use-sdl3-via-pkg-config.patch +++ b/pkgs/by-name/go/gopher64/use-sdl3-via-pkg-config.patch @@ -1,8 +1,8 @@ diff --git a/Cargo.lock b/Cargo.lock -index 89bc1d0..72b65cd 100644 +index 81c7e20..6ae0a17 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -626,15 +626,6 @@ dependencies = [ +@@ -611,15 +611,6 @@ dependencies = [ "error-code", ] @@ -18,7 +18,7 @@ index 89bc1d0..72b65cd 100644 [[package]] name = "cobs" version = "0.2.3" -@@ -3245,12 +3236,6 @@ dependencies = [ +@@ -3243,12 +3234,6 @@ dependencies = [ "windows-sys 0.52.0", ] @@ -31,21 +31,21 @@ index 89bc1d0..72b65cd 100644 [[package]] name = "rustc-demangle" version = "0.1.24" -@@ -3380,21 +3365,13 @@ version = "1.2.0" +@@ -3370,21 +3355,13 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sdl3-src" --version = "3.2.10" +-version = "3.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "e677fa126db179fb8f03c982163321496ddf57a6d8a1e41eeef4600f956038b1" +-checksum = "c5b5d192485408fa251477ea1dfb4778d864efaec72f730ce3a753deaffb27bb" - [[package]] name = "sdl3-sys" - version = "0.4.7+SDL3-3.2.10" + version = "0.5.2+SDL3-3.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "f0d16a8a3623a4cb39a3661c81d9d4c5fd77ada27fc056e320b3651bf7bde1b1" + checksum = "f0a31799d7cbd36f2b187c32a56975fbdd371c200a91b01d4ed0faf0012bcf9c" dependencies = [ - "cmake", - "rpkg-config", @@ -55,20 +55,20 @@ index 89bc1d0..72b65cd 100644 [[package]] diff --git a/Cargo.toml b/Cargo.toml -index 1f41e04..9d9ea33 100644 +index 82d8e99..8b15aad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ serde-big-array = "0.5" eframe = { version = "0.31", default-features = false, features = ["wayland", "x11", "glow"] } sha2 = "0.10" ab_glyph = "0.2" --sdl3-sys = { version = "0.4", features = ["build-from-source-static"] } -+sdl3-sys = { version = "0.4", features = ["use-pkg-config"] } +-sdl3-sys = { version = "0.5", features = ["build-from-source-static"] } ++sdl3-sys = { version = "0.5", features = ["use-pkg-config"] } rfd = { version = "0.15", default-features = false, features = ["xdg-portal", "tokio"] } - tokio = {version = "1.43", features = ["rt-multi-thread", "macros"] } + tokio = {version = "1.45", features = ["rt-multi-thread", "macros"] } spin_sleep = "1.3" diff --git a/build.rs b/build.rs -index 67a6e8d..6c9f63b 100644 +index f0c6d21..fa28e25 100644 --- a/build.rs +++ b/build.rs @@ -52,10 +52,7 @@ fn main() { From 790c40b0173365e2f24a98072f66bfa3fa55035c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 19 Jun 2025 13:58:24 +0200 Subject: [PATCH 27/62] singularity: 4.3.1 -> 4.3.2 Diff: https://github.com/sylabs/singularity/compare/v4.3.1...v4.3.2 Changelog: https://github.com/sylabs/singularity/releases/tag/v4.3.2 --- pkgs/applications/virtualization/singularity/packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/virtualization/singularity/packages.nix b/pkgs/applications/virtualization/singularity/packages.nix index 7d4eaf367b60..3ee5e0cfd9d9 100644 --- a/pkgs/applications/virtualization/singularity/packages.nix +++ b/pkgs/applications/virtualization/singularity/packages.nix @@ -46,19 +46,19 @@ let callPackage (import ./generic.nix rec { pname = "singularity-ce"; - version = "4.3.1"; + version = "4.3.2"; projectName = "singularity"; src = fetchFromGitHub { owner = "sylabs"; repo = "singularity"; tag = "v${version}"; - hash = "sha256-hkUM9K0AweRpLa+LZ7XOI/oDk72EKWzVN5h4Kz2w2B0="; + hash = "sha256-lYYY449agINk1cwRl06gstGhkwQKaeZdLnwT6bW6HY4="; }; # Override vendorHash with overrideAttrs. # See https://nixos.org/manual/nixpkgs/unstable/#buildGoModule-vendorHash - vendorHash = "sha256-hAVynmVXPmQPo+Kd2ajBSU+UqBpvJ5TokOJXZwySr+w="; + vendorHash = "sha256-3CEkaG8k6W1/8v8tsVLXdSV68QHUgn5/BEd8qjkW7ik="; extraConfigureFlags = [ # Do not build squashfuse from the Git submodule sources, use Nixpkgs provided version From 922fd0ed08486530075e4a0af55dbac6811315a0 Mon Sep 17 00:00:00 2001 From: Lukas Mertens Date: Thu, 19 Jun 2025 16:17:34 +0200 Subject: [PATCH 28/62] nexus: mark as insecure and remove maintainers --- pkgs/by-name/ne/nexus/package.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ne/nexus/package.nix b/pkgs/by-name/ne/nexus/package.nix index 401511fedd68..23d3aa7c9a0a 100644 --- a/pkgs/by-name/ne/nexus/package.nix +++ b/pkgs/by-name/ne/nexus/package.nix @@ -60,11 +60,15 @@ stdenv.mkDerivation rec { sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; license = lib.licenses.epl10; platforms = lib.platforms.all; - maintainers = with lib.maintainers; [ - aespinosa - ironpinguin - luftmensch-luftmensch - zaninime + knownVulnerabilities = [ + "Nexus 3.77 + 3.78 fixed a bunch of security issues: https://help.sonatype.com/en/sonatype-nexus-repository-3-78-0-release-notes.html" + "CVE-2024-47554" + "CVE-2024-5764" + "Sonatype-2015-0286" + "Sonatype-2022-6438" + "CVE-2023-6378" + "CVE-2023-4218" ]; + maintainers = with lib.maintainers; [ ]; }; } From 0dce56f3f52ee767c6d7aa816675d33c1c12a630 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 19 Jun 2025 20:29:23 +0100 Subject: [PATCH 29/62] nixos-rebuild-ng: validate NixOS configuration path When `path://` or `git+file://` protocol is used in Flake mode (that is the most common case since we normalize the paths, see PR #375493) and the current working directory in a symlink pointing base store path to the Nix store (e.g., /run/opengl-driver/lib), there is a nasty bug where Nix resolves the path as the Nix store path of the current derivation instead of the target derivation. Since we blindly activate this path, this can corrupt the installation and break some other activation scripts, like `systemd-boot-builder.py`. While it is possible to recover this situation using `nix-env -p /nix/var/nix/profiles/system --delete-generations old`, this is far from ideal. This commit solves it by validating that the resolved NixOS configuration path includes at least `$out/nixos-version`. I am not sure if this is going to break some cases so there is a escape hatch in the form of the environment variable `NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM`, but in general it looks safe. --- .../src/nixos_rebuild/__init__.py | 26 ++++++++++ .../nixos-rebuild-ng/src/tests/test_main.py | 50 ++++++++++++++++--- 2 files changed, 69 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py index 838b8913abb3..fb68b219c1f9 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py @@ -5,6 +5,7 @@ import os import sys from pathlib import Path from subprocess import CalledProcessError, run +from textwrap import dedent from typing import Final, assert_never from . import nix, tmpdir @@ -329,6 +330,30 @@ def reexec( os.execve(current, argv, os.environ | {"_NIXOS_REBUILD_REEXEC": "1"}) +def validate_nixos_config(path_to_config: Path) -> None: + if not (path_to_config / "nixos-version").exists() and not os.environ.get( + "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM" + ): + msg = dedent( + # the lowercase for the first letter below is proposital + f""" + your NixOS configuration path seems to be missing essential files. + To avoid corrupting your current NixOS installation, the activation will abort. + + This could be caused by Nix bug: https://github.com/NixOS/nix/issues/13367. + This is the evaluated NixOS configuration path: {path_to_config}. + Change the directory to somewhere else (e.g., `cd $HOME`) before trying again. + + If you think this is a mistake, you can set the environment variable + NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM to 1 + and re-run the command to continue. + Please open an issue if this is the case. + """ + ).strip() + logger.error(msg) + sys.exit(1) + + def execute(argv: list[str]) -> None: args, args_groups = parse_args(argv) @@ -488,6 +513,7 @@ def execute(argv: list[str]) -> None: copy_flags=copy_flags, ) if action in (Action.SWITCH, Action.BOOT): + validate_nixos_config(path_to_config) nix.set_profile( profile, path_to_config, diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py index a66d70498c5f..345c8bd32f79 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_main.py @@ -213,7 +213,11 @@ def test_reexec_flake( ) -@patch.dict(os.environ, {}, clear=True) +@patch.dict( + os.environ, + {"NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1"}, + clear=True, +) @patch("subprocess.run", autospec=True) def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None: nixpkgs_path = tmp_path / "nixpkgs" @@ -291,7 +295,15 @@ def test_execute_nix_boot(mock_run: Mock, tmp_path: Path) -> None: "boot", ], check=True, - **(DEFAULT_RUN_KWARGS | {"env": {"NIXOS_INSTALL_BOOTLOADER": "0"}}), + **( + DEFAULT_RUN_KWARGS + | { + "env": { + "NIXOS_INSTALL_BOOTLOADER": "0", + "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1", + } + } + ), ), ] ) @@ -421,7 +433,11 @@ def test_execute_nix_build_image_flake(mock_run: Mock, tmp_path: Path) -> None: ) -@patch.dict(os.environ, {}, clear=True) +@patch.dict( + os.environ, + {"NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1"}, + clear=True, +) @patch("subprocess.run", autospec=True) def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None: config_path = tmp_path / "test" @@ -498,13 +514,25 @@ def test_execute_nix_switch_flake(mock_run: Mock, tmp_path: Path) -> None: "switch", ], check=True, - **(DEFAULT_RUN_KWARGS | {"env": {"NIXOS_INSTALL_BOOTLOADER": "1"}}), + **( + DEFAULT_RUN_KWARGS + | { + "env": { + "NIXOS_INSTALL_BOOTLOADER": "1", + "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1", + } + } + ), ), ] ) -@patch.dict(os.environ, {}, clear=True) +@patch.dict( + os.environ, + {"NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1"}, + clear=True, +) @patch("subprocess.run", autospec=True) @patch("uuid.uuid4", autospec=True) @patch(get_qualified_name(nr.cleanup_ssh), autospec=True) @@ -714,7 +742,11 @@ def test_execute_nix_switch_build_target_host( ) -@patch.dict(os.environ, {}, clear=True) +@patch.dict( + os.environ, + {"NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1"}, + clear=True, +) @patch("subprocess.run", autospec=True) @patch(get_qualified_name(nr.cleanup_ssh), autospec=True) def test_execute_nix_switch_flake_target_host( @@ -817,7 +849,11 @@ def test_execute_nix_switch_flake_target_host( ) -@patch.dict(os.environ, {}, clear=True) +@patch.dict( + os.environ, + {"NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM": "1"}, + clear=True, +) @patch("subprocess.run", autospec=True) @patch(get_qualified_name(nr.cleanup_ssh), autospec=True) def test_execute_nix_switch_flake_build_host( From 8481fa781e03ca06d084f353a9ce2ff355a9e95f Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 19 Jun 2025 20:48:48 +0100 Subject: [PATCH 30/62] nixos-rebuild-ng: simplify `Flake.parse()` code --- .../src/nixos_rebuild/models.py | 45 +++++++++---------- .../nixos-rebuild-ng/src/tests/test_models.py | 25 ++++++++--- 2 files changed, 41 insertions(+), 29 deletions(-) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py index 0d67bc81aed9..f8439461b6bd 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py @@ -4,7 +4,7 @@ import subprocess from dataclasses import dataclass from enum import Enum from pathlib import Path -from typing import Any, Callable, ClassVar, Self, TypedDict, override +from typing import Any, ClassVar, Self, TypedDict, override from .process import Remote, run_wrapper @@ -100,6 +100,20 @@ def discover_closest_flake(location: Path) -> Path | None: return None +def get_hostname(target_host: Remote | None) -> str | None: + if target_host: + try: + return run_wrapper( + ["uname", "-n"], + capture_output=True, + remote=target_host, + ).stdout.strip() + except (AttributeError, subprocess.CalledProcessError): + return None + else: + return platform.node() + + @dataclass(frozen=True) class Flake: path: Path | str @@ -114,15 +128,13 @@ class Flake: return f"{self.path}#{self.attr}" @classmethod - def parse( - cls, - flake_str: str, - hostname_fn: Callable[[], str | None] = lambda: None, - ) -> Self: + def parse(cls, flake_str: str, target_host: Remote | None = None) -> Self: m = cls._re.match(flake_str) assert m is not None, f"got no matches for {flake_str}" attr = m.group("attr") - nixos_attr = f'nixosConfigurations."{attr or hostname_fn() or "default"}"' + nixos_attr = ( + f'nixosConfigurations."{attr or get_hostname(target_host) or "default"}"' + ) path_str = m.group("path") if ":" in path_str: return cls(path_str, nixos_attr) @@ -143,24 +155,11 @@ class Flake: @classmethod def from_arg(cls, flake_arg: Any, target_host: Remote | None) -> Self | None: - def get_hostname() -> str | None: - if target_host: - try: - return run_wrapper( - ["uname", "-n"], - stdout=subprocess.PIPE, - remote=target_host, - ).stdout.strip() - except (AttributeError, subprocess.CalledProcessError): - return None - else: - return platform.node() - match flake_arg: case str(s): - return cls.parse(s, get_hostname) + return cls.parse(s, target_host) case True: - return cls.parse(".", get_hostname) + return cls.parse(".", target_host) case False: return None case _: @@ -169,7 +168,7 @@ class Flake: if default_path.exists(): # It can be a symlink to the actual flake. default_path = default_path.resolve() - return cls.parse(str(default_path.parent), get_hostname) + return cls.parse(str(default_path.parent), target_host) else: return None diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py index 2cc450e00a36..1922b4682cbf 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_models.py @@ -30,16 +30,23 @@ def test_build_attr_to_attr() -> None: ) -def test_flake_parse(tmpdir: Path, monkeypatch: MonkeyPatch) -> None: +@patch("platform.node", autospec=True, return_value="hostname") +def test_flake_parse(mock_node: Mock, tmpdir: Path, monkeypatch: MonkeyPatch) -> None: assert m.Flake.parse("/path/to/flake#attr") == m.Flake( Path("/path/to/flake"), 'nixosConfigurations."attr"' ) - assert m.Flake.parse("/path/ to /flake", lambda: "hostname") == m.Flake( + assert m.Flake.parse("/path/ to /flake") == m.Flake( Path("/path/ to /flake"), 'nixosConfigurations."hostname"' ) - assert m.Flake.parse("/path/to/flake", lambda: "hostname") == m.Flake( - Path("/path/to/flake"), 'nixosConfigurations."hostname"' - ) + with patch( + get_qualified_name(m.run_wrapper, m), + autospec=True, + return_value=subprocess.CompletedProcess([], 0, stdout="remote\n"), + ): + target_host = m.Remote("target@remote", [], None) + assert m.Flake.parse("/path/to/flake", target_host) == m.Flake( + Path("/path/to/flake"), 'nixosConfigurations."remote"' + ) # change directory to tmpdir with monkeypatch.context() as patch_context: patch_context.chdir(tmpdir) @@ -49,10 +56,16 @@ def test_flake_parse(tmpdir: Path, monkeypatch: MonkeyPatch) -> None: assert m.Flake.parse("#attr") == m.Flake( Path("."), 'nixosConfigurations."attr"' ) - assert m.Flake.parse(".") == m.Flake(Path("."), 'nixosConfigurations."default"') + assert m.Flake.parse(".") == m.Flake( + Path("."), 'nixosConfigurations."hostname"' + ) assert m.Flake.parse("path:/to/flake#attr") == m.Flake( "path:/to/flake", 'nixosConfigurations."attr"' ) + + # from here on we should return "default" + mock_node.return_value = None + assert m.Flake.parse("github:user/repo/branch") == m.Flake( "github:user/repo/branch", 'nixosConfigurations."default"' ) From e2dbb9de3392c12142c827127f405b84507dfde9 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 19 Jun 2025 22:04:27 +0100 Subject: [PATCH 31/62] nixos-rebuild-ng: add string concatenation linter --- .../src/nixos_rebuild/__init__.py | 12 ++++++------ .../nixos-rebuild-ng/src/nixos_rebuild/nix.py | 2 +- .../src/nixos_rebuild/process.py | 6 +++--- .../ni/nixos-rebuild-ng/src/pyproject.toml | 19 ++++++++++--------- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py index fb68b219c1f9..2e3a321fbcd4 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py @@ -100,7 +100,7 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa "--attr", "-A", help="Enable and build the NixOS system from nix file and use the " - + "specified attribute path from file specified by the --file option", + "specified attribute path from file specified by the --file option", ) main_parser.add_argument( "--flake", @@ -118,7 +118,7 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa "--install-bootloader", action="store_true", help="Causes the boot loader to be (re)installed on the device specified " - + "by the relevant configuration options", + "by the relevant configuration options", ) main_parser.add_argument( "--install-grub", @@ -143,7 +143,7 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa "--upgrade", action="store_true", help="Update the root user's channel named 'nixos' before rebuilding " - + "the system and channels which have a file named '.update-on-nixos-rebuild'", + "the system and channels which have a file named '.update-on-nixos-rebuild'", ) main_parser.add_argument( "--upgrade-all", @@ -187,7 +187,7 @@ def get_parser() -> tuple[argparse.ArgumentParser, dict[str, argparse.ArgumentPa main_parser.add_argument( "--image-variant", help="Selects an image variant to build from the " - + "config.system.build.images attribute of the given configuration", + "config.system.build.images attribute of the given configuration", ) main_parser.add_argument("action", choices=Action.values(), nargs="?") @@ -322,7 +322,7 @@ def reexec( # - Exec format error (e.g.: another OS/CPU arch) logger.warning( "could not re-exec in a newer version of nixos-rebuild, " - + "using current version", + "using current version", exc_info=logger.isEnabledFor(logging.DEBUG), ) # We already run clean-up, let's re-exec in the current version @@ -422,7 +422,7 @@ def execute(argv: list[str]) -> None: if args.image_variant not in variants: raise NRError( "please specify one of the following " - + "supported image variants via --image-variant:\n" + "supported image variants via --image-variant:\n" + "\n".join(f"- {v}" for v in variants) ) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py index 3be610b5ddbd..a55bfd508e37 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py @@ -652,7 +652,7 @@ def switch_to_configuration( if r.returncode: logger.debug( "skipping systemd-run to switch configuration since systemd is " - + "not working in target host" + "not working in target host" ) cmd = [] diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py index 462c4178e8f7..1f57111a72ef 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/process.py @@ -55,12 +55,12 @@ class Remote: if o in ["-t", "-tt", "RequestTTY=yes", "RequestTTY=force"]: logger.warning( f"detected option '{o}' in NIX_SSHOPTS. SSH's TTY may " - + "cause issues, it is recommended to remove this option" + "cause issues, it is recommended to remove this option" ) if not ask_sudo_password: logger.warning( "if you want to prompt for sudo password use " - + "'--ask-sudo-password' option instead" + "'--ask-sudo-password' option instead" ) @@ -161,7 +161,7 @@ def run_wrapper( if sudo and remote and remote.sudo_password is None: logger.error( "while running command with remote sudo, did you forget to use " - + "--ask-sudo-password?" + "--ask-sudo-password?" ) raise diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/pyproject.toml b/pkgs/by-name/ni/nixos-rebuild-ng/src/pyproject.toml index 7874c217468d..3eb78f58e032 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/pyproject.toml +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/pyproject.toml @@ -39,37 +39,38 @@ ignore_missing_imports = true [tool.ruff.lint] extend-select = [ - # Enforce type annotations + # enforce type annotations "ANN", # don't shadow built-in names "A", - # Better list/set/dict comprehensions + # better list/set/dict comprehensions "C4", - # Check for debugger statements + # check for debugger statements "T10", # ensure imports are sorted "I", - # Automatically upgrade syntax for newer versions + # automatically upgrade syntax for newer versions "UP", # detect common sources of bugs "B", - # Ruff specific rules + # ruff specific rules "RUF", # require `check` argument for `subprocess.run` "PLW1510", # check for needless exception names in raise statements "TRY201", - # Pythonic naming conventions + # pythonic naming conventions "N", + # string concatenation rules + "ISC001", + "ISC002", + "ISC003", ] ignore = [ # allow Any type "ANN401" ] -[tool.ruff.lint.per-file-ignores] -"tests/" = ["FA102"] - [tool.pytest.ini_options] pythonpath = ["."] addopts = "--import-mode=importlib" From 3f58a116563b6f6becd5a1260ca6796b4be469c9 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 19 Jun 2025 22:17:53 +0100 Subject: [PATCH 32/62] nixos-rebuild-ng: move validate_image_variant() outside execute() --- .../src/nixos_rebuild/__init__.py | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py index 2e3a321fbcd4..761af4b8b16d 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py @@ -330,6 +330,14 @@ def reexec( os.execve(current, argv, os.environ | {"_NIXOS_REBUILD_REEXEC": "1"}) +def validate_image_variant(image_variant: str, variants: ImageVariants) -> None: + if image_variant not in variants: + raise NRError( + "please specify one of the following supported image variants via " + "--image-variant:\n" + "\n".join(f"- {v}" for v in variants) + ) + + def validate_nixos_config(path_to_config: Path) -> None: if not (path_to_config / "nixos-version").exists() and not os.environ.get( "NIXOS_REBUILD_I_UNDERSTAND_THE_CONSEQUENCES_PLEASE_BREAK_MY_SYSTEM" @@ -350,8 +358,7 @@ def validate_nixos_config(path_to_config: Path) -> None: Please open an issue if this is the case. """ ).strip() - logger.error(msg) - sys.exit(1) + raise NRError(msg) def execute(argv: list[str]) -> None: @@ -418,28 +425,20 @@ def execute(argv: list[str]) -> None: no_link = action in (Action.SWITCH, Action.BOOT) rollback = bool(args.rollback) - def validate_image_variant(variants: ImageVariants) -> None: - if args.image_variant not in variants: - raise NRError( - "please specify one of the following " - "supported image variants via --image-variant:\n" - + "\n".join(f"- {v}" for v in variants) - ) - match action: case Action.BUILD_IMAGE if flake: variants = nix.get_build_image_variants_flake( flake, eval_flags=flake_common_flags, ) - validate_image_variant(variants) + validate_image_variant(args.image_variant, variants) attr = f"config.system.build.images.{args.image_variant}" case Action.BUILD_IMAGE: variants = nix.get_build_image_variants( build_attr, instantiate_flags=common_flags, ) - validate_image_variant(variants) + validate_image_variant(args.image_variant, variants) attr = f"config.system.build.images.{args.image_variant}" case Action.BUILD_VM: attr = "config.system.build.vm" From e364976238fcc10cb7005e2b12e71c4b0a9691a4 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Thu, 19 Jun 2025 22:39:02 +0100 Subject: [PATCH 33/62] nixos-rebuild-ng: NRError -> NixOSRebuildError --- .../nixos-rebuild-ng/src/nixos_rebuild/__init__.py | 12 +++++++----- .../nixos-rebuild-ng/src/nixos_rebuild/models.py | 2 +- .../ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py | 14 +++++++------- .../ni/nixos-rebuild-ng/src/tests/test_nix.py | 2 +- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py index 761af4b8b16d..f89eddab6183 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/__init__.py @@ -10,7 +10,7 @@ from typing import Final, assert_never from . import nix, tmpdir from .constants import EXECUTABLE, WITH_NIX_2_18, WITH_REEXEC, WITH_SHELL_FILES -from .models import Action, BuildAttr, Flake, ImageVariants, NRError, Profile +from .models import Action, BuildAttr, Flake, ImageVariants, NixOSRebuildError, Profile from .process import Remote, cleanup_ssh from .utils import Args, LogFormatter, tabulate @@ -332,7 +332,7 @@ def reexec( def validate_image_variant(image_variant: str, variants: ImageVariants) -> None: if image_variant not in variants: - raise NRError( + raise NixOSRebuildError( "please specify one of the following supported image variants via " "--image-variant:\n" + "\n".join(f"- {v}" for v in variants) ) @@ -358,7 +358,7 @@ def validate_nixos_config(path_to_config: Path) -> None: Please open an issue if this is the case. """ ).strip() - raise NRError(msg) + raise NixOSRebuildError(msg) def execute(argv: list[str]) -> None: @@ -459,9 +459,11 @@ def execute(argv: list[str]) -> None: if maybe_path_to_config: # kinda silly but this makes mypy happy path_to_config = maybe_path_to_config else: - raise NRError("could not find previous generation") + raise NixOSRebuildError("could not find previous generation") case (_, True, _, _): - raise NRError(f"--rollback is incompatible with '{action}'") + raise NixOSRebuildError( + f"--rollback is incompatible with '{action}'" + ) case (_, False, Remote(_), Flake(_)): path_to_config = nix.build_remote_flake( attr, diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py index f8439461b6bd..c0183e1a265b 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/models.py @@ -11,7 +11,7 @@ from .process import Remote, run_wrapper type ImageVariants = list[str] -class NRError(Exception): +class NixOSRebuildError(Exception): "nixos-rebuild general error." def __init__(self, message: str) -> None: diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py index a55bfd508e37..77113a093a77 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/nixos_rebuild/nix.py @@ -20,7 +20,7 @@ from .models import ( Generation, GenerationJson, ImageVariants, - NRError, + NixOSRebuildError, Profile, Remote, ) @@ -256,7 +256,7 @@ def edit(flake: Flake | None, flake_flags: Args | None = None) -> None: ) else: if flake_flags: - raise NRError("'edit' does not support extra Nix flags") + raise NixOSRebuildError("'edit' does not support extra Nix flags") nixos_config = Path( os.getenv("NIXOS_CONFIG") or find_file("nixos-config") or "/etc/nixos" ) @@ -266,7 +266,7 @@ def edit(flake: Flake | None, flake_flags: Args | None = None) -> None: if nixos_config.exists(): run_wrapper([os.getenv("EDITOR", "nano"), nixos_config], check=False) else: - raise NRError("cannot find NixOS config file") + raise NixOSRebuildError("cannot find NixOS config file") def find_file(file: str, nix_flags: Args | None = None) -> Path | None: @@ -424,7 +424,7 @@ def get_generations(profile: Profile) -> list[Generation]: and if this is the current active profile or not. """ if not profile.path.exists(): - raise NRError(f"no profile '{profile.name}' found") + raise NixOSRebuildError(f"no profile '{profile.name}' found") def parse_path(path: Path, profile: Profile) -> Generation: entry_id = path.name.split("-")[1] @@ -456,7 +456,7 @@ def get_generations_from_nix_env( and if this is the current active profile or not. """ if not profile.path.exists(): - raise NRError(f"no profile '{profile.name}' found") + raise NixOSRebuildError(f"no profile '{profile.name}' found") # Using `nix-env --list-generations` needs root to lock the profile r = run_wrapper( @@ -635,13 +635,13 @@ def switch_to_configuration( """ if specialisation: if action not in (Action.SWITCH, Action.TEST): - raise NRError( + raise NixOSRebuildError( "'--specialisation' can only be used with 'switch' and 'test'" ) path_to_config = path_to_config / f"specialisation/{specialisation}" if not path_to_config.exists(): - raise NRError(f"specialisation not found: {specialisation}") + raise NixOSRebuildError(f"specialisation not found: {specialisation}") r = run_wrapper( ["test", "-d", "/run/systemd/system"], diff --git a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py index d87b6b62dca8..d965212a8d74 100644 --- a/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py +++ b/pkgs/by-name/ni/nixos-rebuild-ng/src/tests/test_nix.py @@ -714,7 +714,7 @@ def test_switch_to_configuration_without_systemd_run( remote=None, ) - with pytest.raises(m.NRError) as e: + with pytest.raises(m.NixOSRebuildError) as e: n.switch_to_configuration( config_path, m.Action.BOOT, From fc68bd853638c80148d5e407809289f21f2b44f4 Mon Sep 17 00:00:00 2001 From: botnk Date: Fri, 20 Jun 2025 01:46:31 +0000 Subject: [PATCH 34/62] zed-editor: 0.191.5 -> 0.191.6 Changelog: https://github.com/zed-industries/zed/releases/tag/v0.191.6 --- pkgs/by-name/ze/zed-editor/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ze/zed-editor/package.nix b/pkgs/by-name/ze/zed-editor/package.nix index e256b8b0f1db..67bbec6bc452 100644 --- a/pkgs/by-name/ze/zed-editor/package.nix +++ b/pkgs/by-name/ze/zed-editor/package.nix @@ -99,7 +99,7 @@ let in rustPlatform.buildRustPackage (finalAttrs: { pname = "zed-editor"; - version = "0.191.5"; + version = "0.191.6"; outputs = [ "out" ] @@ -111,7 +111,7 @@ rustPlatform.buildRustPackage (finalAttrs: { owner = "zed-industries"; repo = "zed"; tag = "v${finalAttrs.version}"; - hash = "sha256-RPUNWnkJfuI97z8IzBZ5L8Vjjk9mwzPd2ZgMZwgp3FU="; + hash = "sha256-GQzAXjOvtjbkBgBkX9Xp6mn3uP5wXStpsaC6rQMwTvs="; }; patches = [ @@ -138,7 +138,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ''; useFetchCargoVendor = true; - cargoHash = "sha256-vl/6WE7XdkkcddrBxPF5tZJibPGGq6g6gTTXiFloKEw="; + cargoHash = "sha256-ZDL9arQpYsMzQrIHNejkBcsBNlKeSPOU+Ev0nsa9yIE="; nativeBuildInputs = [ From 3045cecacf56bad446baf2d4125f938c35f15059 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Fri, 20 Jun 2025 13:08:22 +0800 Subject: [PATCH 35/62] nixos/fish: allow disabling completion generation --- nixos/modules/programs/fish.nix | 40 ++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix index b4431aba8797..38700fa387b4 100644 --- a/nixos/modules/programs/fish.nix +++ b/nixos/modules/programs/fish.nix @@ -72,6 +72,11 @@ in ''; }; + generateCompletions = lib.mkEnableOption "generating completion files from man pages" // { + default = true; + example = false; + }; + vendor.config.enable = lib.mkOption { type = lib.types.bool; default = true; @@ -247,7 +252,7 @@ in ''; } - { + (lib.mkIf cfg.generateCompletions { etc."fish/generated_completions".source = let patchedGenerator = pkgs.stdenv.mkDerivation { @@ -297,7 +302,7 @@ in ignoreCollisions = true; paths = builtins.map generateCompletions config.environment.systemPackages; }; - } + }) # include programs that bring their own completions { @@ -318,20 +323,23 @@ in } ]; - programs.fish.interactiveShellInit = '' - # add completions generated by NixOS to $fish_complete_path - begin - # joins with null byte to accommodate all characters in paths, then respectively gets all paths before (exclusive) / after (inclusive) the first one including "generated_completions", - # splits by null byte, and then removes all empty lines produced by using 'string' - set -l prev (string join0 $fish_complete_path | string match --regex "^.*?(?=\x00[^\x00]*generated_completions.*)" | string split0 | string match -er ".") - set -l post (string join0 $fish_complete_path | string match --regex "[^\x00]*generated_completions.*" | string split0 | string match -er ".") - set fish_complete_path $prev "/etc/fish/generated_completions" $post - end - # prevent fish from generating completions on first run - if not test -d $__fish_user_data_dir/generated_completions - ${pkgs.coreutils}/bin/mkdir $__fish_user_data_dir/generated_completions - end - ''; + programs.fish.interactiveShellInit = + lib.optionalString cfg.generateCompletions '' + # add completions generated by NixOS to $fish_complete_path + begin + # joins with null byte to accommodate all characters in paths, then respectively gets all paths before (exclusive) / after (inclusive) the first one including "generated_completions", + # splits by null byte, and then removes all empty lines produced by using 'string' + set -l prev (string join0 $fish_complete_path | string match --regex "^.*?(?=\x00[^\x00]*generated_completions.*)" | string split0 | string match -er ".") + set -l post (string join0 $fish_complete_path | string match --regex "[^\x00]*generated_completions.*" | string split0 | string match -er ".") + set fish_complete_path $prev "/etc/fish/generated_completions" $post + end + '' + + '' + # prevent fish from generating completions on first run + if not test -d $__fish_user_data_dir/generated_completions + ${pkgs.coreutils}/bin/mkdir $__fish_user_data_dir/generated_completions + end + ''; }; meta.maintainers = with lib.maintainers; [ sigmasquadron ]; From dbf39b7ddb142eed801ec0aabcd155d28a3fd458 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Fri, 20 Jun 2025 14:11:15 +0800 Subject: [PATCH 36/62] nixos/profiles/minimal: don't generate fish completions --- nixos/modules/profiles/minimal.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/profiles/minimal.nix b/nixos/modules/profiles/minimal.nix index f4b0ea0668a6..ddeca9601e66 100644 --- a/nixos/modules/profiles/minimal.nix +++ b/nixos/modules/profiles/minimal.nix @@ -27,6 +27,7 @@ in # The lessopen package pulls in Perl. less.lessopen = mkDefault null; command-not-found.enable = mkDefault false; + fish.generateCompletions = mkDefault false; }; # This pulls in nixos-containers which depends on Perl. From 74d37cf3481117423817fa0d605f4945a6417030 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 20 Jun 2025 07:16:30 +0100 Subject: [PATCH 37/62] actual-server.webUi: remove non-existent attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before ther change `actual-server` exported unevaluatable `webUi` attribute: $ nix eval --impure --expr 'with import ./. {}; actual-server.webUi' error: … while evaluating the attribute 'webUi' at pkgs/by-name/ac/actual-server/package.nix:111:39: 110| passthru = { 111| inherit (finalAttrs) offlineCache webUi; | ^ 112| tests = nixosTests.actual; error: attribute 'webUi' missing at pkgs/by-name/ac/actual-server/package.nix:111:39: 110| passthru = { 111| inherit (finalAttrs) offlineCache webUi; | ^ 112| tests = nixosTests.actual; --- pkgs/by-name/ac/actual-server/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ac/actual-server/package.nix b/pkgs/by-name/ac/actual-server/package.nix index 4d3e8ac3fa39..d8c8ec35447b 100644 --- a/pkgs/by-name/ac/actual-server/package.nix +++ b/pkgs/by-name/ac/actual-server/package.nix @@ -108,7 +108,7 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - inherit (finalAttrs) offlineCache webUi; + inherit (finalAttrs) offlineCache; tests = nixosTests.actual; }; From 7057aec790982a72b05b5b8adae082553fb7022f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 20 Jun 2025 07:09:49 +0000 Subject: [PATCH 38/62] fastfetchMinimal: 2.45.0 -> 2.46.0 --- pkgs/by-name/fa/fastfetch/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index d770b96376b8..d23690f03995 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -59,13 +59,13 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "fastfetch"; - version = "2.45.0"; + version = "2.46.0"; src = fetchFromGitHub { owner = "fastfetch-cli"; repo = "fastfetch"; tag = finalAttrs.version; - hash = "sha256-HDr4goUvAKeMk2UGmF2ON72ETQQipNwLfsvyB+f74LE="; + hash = "sha256-gRDG3lbUcApUushUPCpTkzc6FOB/CHrsVZwdRn6IEL8="; }; outputs = [ From 431d3c55a19a9764173bedff2fded37d3ff9a3f2 Mon Sep 17 00:00:00 2001 From: isabel Date: Fri, 20 Jun 2025 09:46:58 +0100 Subject: [PATCH 39/62] vlang: 0.4.8 -> 0.4.11 --- pkgs/by-name/vl/vlang/package.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/vl/vlang/package.nix b/pkgs/by-name/vl/vlang/package.nix index 8f5ca40616ce..465fe327a9d5 100644 --- a/pkgs/by-name/vl/vlang/package.nix +++ b/pkgs/by-name/vl/vlang/package.nix @@ -13,7 +13,7 @@ }: let - version = "0.4.8"; + version = "0.4.11"; ptraceSubstitution = '' #include #include @@ -22,12 +22,12 @@ let # So we fix its rev to correspond to the V version. vc = stdenv.mkDerivation { pname = "v.c"; - version = "0.4.8"; + version = "0.4.11"; src = fetchFromGitHub { owner = "vlang"; repo = "vc"; - rev = "54beb1f416b404a06b894e6883a0e2368d80bc3e"; - hash = "sha256-hofganRnWPRCjjsItwF2BKam4dCqzMCrjgWSjZLSrlo="; + rev = "a17f1105aa18b604ed8dac8fa5ca9424362c6e15"; + hash = "sha256-DAsVr1wtRfGbKO74Vfq7ejci+zQabSWeir8njbHYV3o="; }; # patch the ptrace reference for darwin @@ -45,8 +45,8 @@ let markdown = fetchFromGitHub { owner = "vlang"; repo = "markdown"; - rev = "0c280130cb7ec410b7d21810d1247956c15b72fc"; - hash = "sha256-Fmhkrg9DBiWxInostNp+WfA3V5GgEIs5+KIYrqZosqY="; + rev = "5a1c9d82669e765493abe19488eaef0252c97dac"; + hash = "sha256-d/HGVYbbMv7cmF3I4LzD6N0gXSd8CJlPp0la3nPe1dw="; }; boehmgcStatic = boehmgc.override { enableStatic = true; @@ -60,7 +60,7 @@ stdenv.mkDerivation { owner = "vlang"; repo = "v"; rev = version; - hash = "sha256-V4f14TcuKW8unzlo6i/tE6MzSb3HAll478OU2LxiTPQ="; + hash = "sha256-K5B/fjdCYLE14LPg3ccS+sGC8CS7jZiuuxYkHvljGFA="; }; propagatedBuildInputs = [ From b0e8b75c6bf2bf0b8b4ba2a6dba3d093a271edd2 Mon Sep 17 00:00:00 2001 From: Defelo Date: Fri, 20 Jun 2025 11:54:43 +0200 Subject: [PATCH 40/62] anubis: don't update to pre-releases --- pkgs/by-name/an/anubis/update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/an/anubis/update.sh b/pkgs/by-name/an/anubis/update.sh index 62f67a857d0c..fa62b90b82cc 100755 --- a/pkgs/by-name/an/anubis/update.sh +++ b/pkgs/by-name/an/anubis/update.sh @@ -3,6 +3,6 @@ set -euo pipefail -nix-update anubis --src-only +nix-update anubis --src-only --version-regex='^v(\d+\.\d+\.\d+)$' nix-update anubis.xess --version=skip nix-update anubis --version=skip From c34a981ac2998efc294b423b6b2a99aec9b258c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Fri, 20 Jun 2025 12:08:22 +0200 Subject: [PATCH 41/62] eza: 0.21.4 -> 0.21.5 changelog: https://github.com/eza-community/eza/releases/tag/v0.21.5 --- pkgs/by-name/ez/eza/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ez/eza/package.nix b/pkgs/by-name/ez/eza/package.nix index 87c02bcacc9c..1d9e4d1049b3 100644 --- a/pkgs/by-name/ez/eza/package.nix +++ b/pkgs/by-name/ez/eza/package.nix @@ -15,17 +15,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "eza"; - version = "0.21.4"; + version = "0.21.5"; src = fetchFromGitHub { owner = "eza-community"; repo = "eza"; tag = "v${finalAttrs.version}"; - hash = "sha256-lwCZj4EHzgZSAQTnJZizonh4FmKoX3dkYKbIcn1WBHs="; + hash = "sha256-Mnd4Hzuzq8aawwDn7qtjbAyM/JLlhtoATF/OUzqQkHc="; }; useFetchCargoVendor = true; - cargoHash = "sha256-8XkkClXyTT2+py57rSTMNpnuesTujNgHTz6K2gmDHYM="; + cargoHash = "sha256-3BNyoKWPmq2CHiBeliUGWpChtSmfJUEmf4JZoYVVpb8="; nativeBuildInputs = [ cmake From 0b4a4ef878273847514546b3b1da024da6b94806 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 20 Jun 2025 10:41:26 +0000 Subject: [PATCH 42/62] claude-code: 1.0.29 -> 1.0.30 --- pkgs/by-name/cl/claude-code/package-lock.json | 8 ++++---- pkgs/by-name/cl/claude-code/package.nix | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/cl/claude-code/package-lock.json b/pkgs/by-name/cl/claude-code/package-lock.json index f201f3d6f686..68c9496e4b78 100644 --- a/pkgs/by-name/cl/claude-code/package-lock.json +++ b/pkgs/by-name/cl/claude-code/package-lock.json @@ -6,13 +6,13 @@ "packages": { "": { "dependencies": { - "@anthropic-ai/claude-code": "^1.0.29" + "@anthropic-ai/claude-code": "^1.0.30" } }, "node_modules/@anthropic-ai/claude-code": { - "version": "1.0.29", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.29.tgz", - "integrity": "sha512-ZHw84ZJTxtG/jTLioTkF2ck+whQEKQvCrYvjP+nZnVFirOPV0QwpJyhKsdHFUufnbO4lqACs4dNNnhy0IlKTzQ==", + "version": "1.0.30", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.30.tgz", + "integrity": "sha512-qIs92Cq3hFwn9/lZBta+wWJfGoQsrbFuiVm0bkurwGKxaJV69Ibr6hYfSU/lIKLcbvSygkZ/tWRxFQt44gnFhQ==", "hasInstallScript": true, "license": "SEE LICENSE IN README.md", "bin": { diff --git a/pkgs/by-name/cl/claude-code/package.nix b/pkgs/by-name/cl/claude-code/package.nix index 2226e22589f2..f9e4e0528762 100644 --- a/pkgs/by-name/cl/claude-code/package.nix +++ b/pkgs/by-name/cl/claude-code/package.nix @@ -7,16 +7,16 @@ buildNpmPackage rec { pname = "claude-code"; - version = "1.0.29"; + version = "1.0.30"; nodejs = nodejs_20; # required for sandboxed Nix builds on Darwin src = fetchzip { url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz"; - hash = "sha256-IQnDrtHeK1F7+yKtPXvfhb6iZq6IKQsn8p7WY8s3jgg="; + hash = "sha256-DwzSXpDrNV8FhfqrRQ3OK/LjmiXd+VHEW91jnyds2P4="; }; - npmDepsHash = "sha256-Lhzl/Wgvn42ODu18jd0CIuCXziSX25C9ec7yNxdPi2w="; + npmDepsHash = "sha256-M6H6A4i4JBqcFTG/ZkmxpINa4lw8sO5+iu2YcBqmvi4="; postPatch = '' cp ${./package-lock.json} package-lock.json From 939b7583daf4a62838fc089e6b5a1db196360c81 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 20 Jun 2025 13:01:34 +0200 Subject: [PATCH 43/62] nixos/matrix-synapse: fix test eval --- nixos/tests/matrix/synapse.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nixos/tests/matrix/synapse.nix b/nixos/tests/matrix/synapse.nix index 323fa25ccb6c..4b9ade875a78 100644 --- a/nixos/tests/matrix/synapse.nix +++ b/nixos/tests/matrix/synapse.nix @@ -187,8 +187,6 @@ in networksStyle = "subnet"; enableSubmission = true; tlsTrustedAuthorities = "${mailerCerts.ca.cert}"; - sslCert = "${mailerCerts.${mailerDomain}.cert}"; - sslKey = "${mailerCerts.${mailerDomain}.key}"; # blackhole transport transport = "example.com discard:silently"; @@ -205,6 +203,14 @@ in smtp_tls_protocols = "TLSv1.3, TLSv1.2, !TLSv1.1, !TLSv1, !SSLv2, !SSLv3"; smtpd_tls_mandatory_protocols = "TLSv1.3, TLSv1.2, !TLSv1.1, !TLSv1, !SSLv2, !SSLv3"; smtp_tls_mandatory_protocols = "TLSv1.3, TLSv1.2, !TLSv1.1, !TLSv1, !SSLv2, !SSLv3"; + smtp_tls_chain_files = [ + "${mailerCerts.${mailerDomain}.key}" + "${mailerCerts.${mailerDomain}.cert}" + ]; + smtpd_tls_chain_files = [ + "${mailerCerts.${mailerDomain}.key}" + "${mailerCerts.${mailerDomain}.cert}" + ]; }; }; }; From 3bb4fd1edd8f4a8b64dabd0800d468d620d6f89c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 20 Jun 2025 11:30:31 +0000 Subject: [PATCH 44/62] pixi: 0.48.0 -> 0.48.2 --- pkgs/by-name/pi/pixi/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/pi/pixi/package.nix b/pkgs/by-name/pi/pixi/package.nix index 7ce94382415a..591ae99258eb 100644 --- a/pkgs/by-name/pi/pixi/package.nix +++ b/pkgs/by-name/pi/pixi/package.nix @@ -14,17 +14,17 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "pixi"; - version = "0.48.0"; + version = "0.48.2"; src = fetchFromGitHub { owner = "prefix-dev"; repo = "pixi"; tag = "v${finalAttrs.version}"; - hash = "sha256-GCmjR5js8Ewds9Eur7i6vrfsQbcJ2AoWA+MNczu4os0="; + hash = "sha256-v6t3o6/GPgIh8bJ1EQ2KRYoBRpFFejRIG805EbLRjz8="; }; useFetchCargoVendor = true; - cargoHash = "sha256-AMXSqEoMpm5+fm/mMD/JFMAaj2leaNQhJA5Cj9XQVrU="; + cargoHash = "sha256-8aYYGySZAGcgPFPeCZ5Zx2UMkgJGKQEgCSTQ8HIh9G4="; nativeBuildInputs = [ pkg-config From 69fd391d62d85b750f8b1a72056adbf7a0f7b415 Mon Sep 17 00:00:00 2001 From: Sizhe Zhao Date: Fri, 20 Jun 2025 17:12:56 +0800 Subject: [PATCH 45/62] librashader: fix building with stable rust --- pkgs/by-name/li/librashader/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/li/librashader/package.nix b/pkgs/by-name/li/librashader/package.nix index a9d64c3e9d49..cdb4fa85d3de 100644 --- a/pkgs/by-name/li/librashader/package.nix +++ b/pkgs/by-name/li/librashader/package.nix @@ -24,11 +24,9 @@ rustPlatform.buildRustPackage (finalAttrs: { useFetchCargoVendor = true; cargoHash = "sha256-fKYpRvH8zt7GeiaBf1oZHBY4WSCVQzZ0Ca7Q3ek6QE0="; - RUSTC_BOOTSTRAP = 1; - buildPhase = '' runHook preBuild - cargo run -p librashader-build-script -- --profile optimized + cargo run -p librashader-build-script -- --profile optimized --stable runHook postBuild ''; @@ -54,7 +52,7 @@ rustPlatform.buildRustPackage (finalAttrs: { '' ) + '' - install -m644 librashader.h -t $out/include/librashader + install -m644 ../../include/librashader.h -t $out/include/librashader install -m644 ../../include/librashader_ld.h -t $out/include/librashader runHook postInstall ''; From 90fce842255a029ba9930a8f0e2f68b95d20d37c Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Fri, 20 Jun 2025 05:02:53 -0700 Subject: [PATCH 46/62] Revert "treewide: passthru outputBin as `bin`" --- pkgs/by-name/ap/aprutil/package.nix | 7 +++---- pkgs/by-name/ca/cairo/package.nix | 1 - pkgs/by-name/db/dbus-glib/package.nix | 7 +++---- pkgs/by-name/ex/expat/package.nix | 1 - pkgs/by-name/gs/gspell/package.nix | 9 ++++----- pkgs/by-name/gt/gtk-layer-shell/package.nix | 1 - pkgs/by-name/gt/gtk4-layer-shell/package.nix | 1 - pkgs/by-name/li/libadwaita/package.nix | 1 - pkgs/by-name/li/libassuan/package.nix | 9 ++++----- pkgs/by-name/li/libdazzle/package.nix | 9 ++++----- pkgs/by-name/li/libevent/package.nix | 7 +++---- pkgs/by-name/li/libgpg-error/package.nix | 8 +++----- pkgs/by-name/li/liboil/package.nix | 7 +++---- pkgs/by-name/li/libpanel/package.nix | 1 - pkgs/by-name/li/libshumate/package.nix | 1 - pkgs/by-name/on/oniguruma/package.nix | 7 +++---- pkgs/by-name/sd/sdl2-compat/package.nix | 3 --- pkgs/development/libraries/apr/default.nix | 7 +++---- pkgs/development/libraries/libhandy/0.x.nix | 9 ++++----- pkgs/development/libraries/libhandy/default.nix | 9 ++++----- pkgs/development/libraries/libusb-compat/0.1.nix | 9 ++++----- 21 files changed, 45 insertions(+), 69 deletions(-) diff --git a/pkgs/by-name/ap/aprutil/package.nix b/pkgs/by-name/ap/aprutil/package.nix index d431a348d42c..1f23af533b76 100644 --- a/pkgs/by-name/ap/aprutil/package.nix +++ b/pkgs/by-name/ap/aprutil/package.nix @@ -22,12 +22,12 @@ assert sslSupport -> openssl != null; assert bdbSupport -> db != null; assert ldapSupport -> openldap != null; -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "apr-util"; version = "1.6.3"; src = fetchurl { - url = "mirror://apache/apr/apr-util-${finalAttrs.version}.tar.bz2"; + url = "mirror://apache/apr/${pname}-${version}.tar.bz2"; sha256 = "sha256-pBB243EHRjJsOUUEKZStmk/KwM4Cd92P6gdv7DyXcrU="; }; @@ -44,7 +44,6 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe nativeBuildInputs = [ makeWrapper @@ -122,4 +121,4 @@ stdenv.mkDerivation (finalAttrs: { platforms = platforms.unix; license = licenses.asl20; }; -}) +} diff --git a/pkgs/by-name/ca/cairo/package.nix b/pkgs/by-name/ca/cairo/package.nix index b4f59a0b7153..1d96951ac59c 100644 --- a/pkgs/by-name/ca/cairo/package.nix +++ b/pkgs/by-name/ca/cairo/package.nix @@ -49,7 +49,6 @@ stdenv.mkDerivation ( "devdoc" ]; outputBin = "dev"; # very small - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe separateDebugInfo = true; nativeBuildInputs = [ diff --git a/pkgs/by-name/db/dbus-glib/package.nix b/pkgs/by-name/db/dbus-glib/package.nix index 4ab5a596f14a..e5e4854aadbd 100644 --- a/pkgs/by-name/db/dbus-glib/package.nix +++ b/pkgs/by-name/db/dbus-glib/package.nix @@ -11,12 +11,12 @@ glib, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "dbus-glib"; version = "0.114"; src = fetchurl { - url = "${finalAttrs.meta.homepage}/releases/dbus-glib/dbus-glib-${finalAttrs.version}.tar.gz"; + url = "${meta.homepage}/releases/dbus-glib/dbus-glib-${version}.tar.gz"; sha256 = "sha256-wJxcCFsqDjkbjufXg6HWP+RE6WcXzBgU1htej8KCenw="; }; @@ -26,7 +26,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe nativeBuildInputs = [ pkg-config @@ -65,4 +64,4 @@ stdenv.mkDerivation (finalAttrs: { maintainers = [ ]; platforms = lib.platforms.unix; }; -}) +} diff --git a/pkgs/by-name/ex/expat/package.nix b/pkgs/by-name/ex/expat/package.nix index 3a8ea413caf8..e8ead2467c64 100644 --- a/pkgs/by-name/ex/expat/package.nix +++ b/pkgs/by-name/ex/expat/package.nix @@ -40,7 +40,6 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; # TODO: fix referrers outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe enableParallelBuilding = true; diff --git a/pkgs/by-name/gs/gspell/package.nix b/pkgs/by-name/gs/gspell/package.nix index df9f95157d20..eb9d6f29c99c 100644 --- a/pkgs/by-name/gs/gspell/package.nix +++ b/pkgs/by-name/gs/gspell/package.nix @@ -17,7 +17,7 @@ gnome, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "gspell"; version = "1.14.0"; @@ -28,10 +28,9 @@ stdenv.mkDerivation (finalAttrs: { ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchurl { - url = "mirror://gnome/sources/gspell/${lib.versions.majorMinor finalAttrs.version}/gspell-${finalAttrs.version}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "ZOodjp7cHCW0WpIOgNr2dVnRhm/81/hDL+z+ptD+iJc="; }; @@ -62,7 +61,7 @@ stdenv.mkDerivation (finalAttrs: { passthru = { updateScript = gnome.updateScript { - packageName = "gspell"; + packageName = pname; versionPolicy = "none"; }; }; @@ -75,4 +74,4 @@ stdenv.mkDerivation (finalAttrs: { teams = [ teams.gnome ]; platforms = platforms.unix; }; -}) +} diff --git a/pkgs/by-name/gt/gtk-layer-shell/package.nix b/pkgs/by-name/gt/gtk-layer-shell/package.nix index 2ac01848d1e7..195c4a56f236 100644 --- a/pkgs/by-name/gt/gtk-layer-shell/package.nix +++ b/pkgs/by-name/gt/gtk-layer-shell/package.nix @@ -25,7 +25,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "devdoc"; # for demo - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchFromGitHub { owner = "wmww"; diff --git a/pkgs/by-name/gt/gtk4-layer-shell/package.nix b/pkgs/by-name/gt/gtk4-layer-shell/package.nix index f1ec6a831e8f..c47de743da1b 100644 --- a/pkgs/by-name/gt/gtk4-layer-shell/package.nix +++ b/pkgs/by-name/gt/gtk4-layer-shell/package.nix @@ -27,7 +27,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "devdoc"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchFromGitHub { owner = "wmww"; diff --git a/pkgs/by-name/li/libadwaita/package.nix b/pkgs/by-name/li/libadwaita/package.nix index af5c7d98a25e..3dfd38cd4cad 100644 --- a/pkgs/by-name/li/libadwaita/package.nix +++ b/pkgs/by-name/li/libadwaita/package.nix @@ -31,7 +31,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "devdoc"; # demo app - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchFromGitLab { domain = "gitlab.gnome.org"; diff --git a/pkgs/by-name/li/libassuan/package.nix b/pkgs/by-name/li/libassuan/package.nix index 1ef37ce72a56..4c6fbea82951 100644 --- a/pkgs/by-name/li/libassuan/package.nix +++ b/pkgs/by-name/li/libassuan/package.nix @@ -9,12 +9,12 @@ gitUpdater, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libassuan"; version = "3.0.2"; src = fetchurl { - url = "mirror://gnupg/libassuan/libassuan-${finalAttrs.version}.tar.bz2"; + url = "mirror://gnupg/libassuan/libassuan-${version}.tar.bz2"; hash = "sha256-0pMc2tJm5jNRD5lw4aLzRgVeNRuxn5t4kSR1uAdMNvY="; }; @@ -24,7 +24,6 @@ stdenv.mkDerivation (finalAttrs: { "info" ]; outputBin = "dev"; # libassuan-config - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ @@ -60,9 +59,9 @@ stdenv.mkDerivation (finalAttrs: { provided. ''; homepage = "https://gnupg.org/software/libassuan/"; - changelog = "https://dev.gnupg.org/source/libassuan/browse/master/NEWS;libassuan-${finalAttrs.version}"; + changelog = "https://dev.gnupg.org/source/libassuan/browse/master/NEWS;libassuan-${version}"; license = lib.licenses.lgpl2Plus; platforms = lib.platforms.all; maintainers = [ ]; }; -}) +} diff --git a/pkgs/by-name/li/libdazzle/package.nix b/pkgs/by-name/li/libdazzle/package.nix index 9dd59a2c1bb2..484d2968752f 100644 --- a/pkgs/by-name/li/libdazzle/package.nix +++ b/pkgs/by-name/li/libdazzle/package.nix @@ -19,7 +19,7 @@ gnome, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libdazzle"; version = "3.44.0"; @@ -29,10 +29,9 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchurl { - url = "mirror://gnome/sources/libdazzle/${lib.versions.majorMinor finalAttrs.version}/libdazzle-${finalAttrs.version}.tar.xz"; + url = "mirror://gnome/sources/libdazzle/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "PNPkXrbiaAywXVLh6A3Y+dWdR2UhLw4o945sF4PRjq4="; }; @@ -76,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: { passthru = { updateScript = gnome.updateScript { - packageName = "libdazzle"; + packageName = pname; }; }; @@ -95,4 +94,4 @@ stdenv.mkDerivation (finalAttrs: { teams = [ teams.gnome ]; platforms = platforms.unix; }; -}) +} diff --git a/pkgs/by-name/li/libevent/package.nix b/pkgs/by-name/li/libevent/package.nix index ff873db34dfe..42c2d2fe120e 100644 --- a/pkgs/by-name/li/libevent/package.nix +++ b/pkgs/by-name/li/libevent/package.nix @@ -12,12 +12,12 @@ static ? stdenv.hostPlatform.isStatic, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libevent"; version = "2.1.12"; src = fetchurl { - url = "https://github.com/libevent/libevent/releases/download/release-${finalAttrs.version}-stable/libevent-${finalAttrs.version}-stable.tar.gz"; + url = "https://github.com/libevent/libevent/releases/download/release-${version}-stable/libevent-${version}-stable.tar.gz"; sha256 = "1fq30imk8zd26x8066di3kpc5zyfc5z6frr3zll685zcx4dxxrlj"; }; @@ -48,7 +48,6 @@ stdenv.mkDerivation (finalAttrs: { "dev" ] ++ lib.optional sslSupport "openssl"; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe propagatedBuildOutputs = [ "out" ] ++ lib.optional sslSupport "openssl"; nativeBuildInputs = [ @@ -88,4 +87,4 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; platforms = platforms.all; }; -}) +} diff --git a/pkgs/by-name/li/libgpg-error/package.nix b/pkgs/by-name/li/libgpg-error/package.nix index 7fe5f777e659..2270bea43e21 100644 --- a/pkgs/by-name/li/libgpg-error/package.nix +++ b/pkgs/by-name/li/libgpg-error/package.nix @@ -23,13 +23,12 @@ let }; in stdenv.mkDerivation ( - finalAttrs: - { + rec { pname = "libgpg-error"; version = "1.51"; src = fetchurl { - url = "mirror://gnupg/libgpg-error/libgpg-error-${finalAttrs.version}.tar.bz2"; + url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2"; hash = "sha256-vg8bLba5Pu1VNpzfefGfcnUMjHw5/CC1d+ckVFQn5rI="; }; @@ -50,7 +49,6 @@ stdenv.mkDerivation ( "info" ]; outputBin = "dev"; # deps want just the lib, most likely - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe # If architecture-dependent MO files aren't available, they're generated # during build, so we need gettext for cross-builds. @@ -80,7 +78,7 @@ stdenv.mkDerivation ( homepage = "https://www.gnupg.org/software/libgpg-error/index.html"; changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=blob;f=NEWS;hb=refs/tags/libgpg-error-${version}"; description = "Small library that defines common error values for all GnuPG components"; - mainProgram = if genPosixLockObjOnly then "gen-posix-lock-obj" else "gpg-error"; + mainProgram = "gen-posix-lock-obj"; longDescription = '' Libgpg-error is a small library that defines common error values diff --git a/pkgs/by-name/li/liboil/package.nix b/pkgs/by-name/li/liboil/package.nix index cbce87f4ed28..f9f9cdc5ea93 100644 --- a/pkgs/by-name/li/liboil/package.nix +++ b/pkgs/by-name/li/liboil/package.nix @@ -5,12 +5,12 @@ pkg-config, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "liboil"; version = "0.3.17"; src = fetchurl { - url = "${finalAttrs.meta.homepage}/download/liboil-${finalAttrs.version}.tar.gz"; + url = "${meta.homepage}/download/liboil-${version}.tar.gz"; sha256 = "0sgwic99hxlb1av8cm0albzh8myb7r3lpcwxfm606l0bkc3h4pqh"; }; @@ -22,7 +22,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "dev"; # oil-bugreport - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe nativeBuildInputs = [ pkg-config ]; @@ -43,4 +42,4 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ lovek323 ]; platforms = platforms.all; }; -}) +} diff --git a/pkgs/by-name/li/libpanel/package.nix b/pkgs/by-name/li/libpanel/package.nix index 14aa09a355f6..b577910323a3 100644 --- a/pkgs/by-name/li/libpanel/package.nix +++ b/pkgs/by-name/li/libpanel/package.nix @@ -25,7 +25,6 @@ stdenv.mkDerivation (finalAttrs: { ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchurl { url = "mirror://gnome/sources/libpanel/${lib.versions.majorMinor finalAttrs.version}/libpanel-${finalAttrs.version}.tar.xz"; diff --git a/pkgs/by-name/li/libshumate/package.nix b/pkgs/by-name/li/libshumate/package.nix index 94c9a3b35e35..6e9cbb678d06 100644 --- a/pkgs/by-name/li/libshumate/package.nix +++ b/pkgs/by-name/li/libshumate/package.nix @@ -31,7 +31,6 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "devdoc"; # demo app - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchurl { url = "mirror://gnome/sources/libshumate/${lib.versions.majorMinor finalAttrs.version}/libshumate-${finalAttrs.version}.tar.xz"; diff --git a/pkgs/by-name/on/oniguruma/package.nix b/pkgs/by-name/on/oniguruma/package.nix index 9c210efd7d2a..4f6e11d6a0ad 100644 --- a/pkgs/by-name/on/oniguruma/package.nix +++ b/pkgs/by-name/on/oniguruma/package.nix @@ -5,13 +5,13 @@ autoreconfHook, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "oniguruma"; version = "6.9.10"; # Note: do not use fetchpatch or fetchFromGitHub to keep this package available in __bootPackages src = fetchurl { - url = "https://github.com/kkos/oniguruma/releases/download/v${finalAttrs.version}/onig-${finalAttrs.version}.tar.gz"; + url = "https://github.com/kkos/oniguruma/releases/download/v${version}/onig-${version}.tar.gz"; sha256 = "sha256-Klz8WuJZ5Ol/hraN//wVLNr/6U4gYLdwy4JyONdp/AU="; }; @@ -21,7 +21,6 @@ stdenv.mkDerivation (finalAttrs: { "out" ]; outputBin = "dev"; # onig-config - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe nativeBuildInputs = [ autoreconfHook ]; configureFlags = [ "--enable-posix-api=yes" ]; @@ -34,4 +33,4 @@ stdenv.mkDerivation (finalAttrs: { maintainers = with maintainers; [ artturin ]; platforms = platforms.unix; }; -}) +} diff --git a/pkgs/by-name/sd/sdl2-compat/package.nix b/pkgs/by-name/sd/sdl2-compat/package.nix index 96366f7d187f..20783cab0638 100644 --- a/pkgs/by-name/sd/sdl2-compat/package.nix +++ b/pkgs/by-name/sd/sdl2-compat/package.nix @@ -79,8 +79,6 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe - tests = { pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; @@ -113,7 +111,6 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://libsdl.org"; changelog = "https://github.com/libsdl-org/sdl2-compat/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.zlib; - mainProgram = "sdl2-config"; maintainers = with lib.maintainers; [ nadiaholmquist ]; diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index 3d70cc9b5055..8ded7258aca7 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -6,12 +6,12 @@ autoreconfHook, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "apr"; version = "1.7.6"; src = fetchurl { - url = "mirror://apache/apr/apr-${finalAttrs.version}.tar.bz2"; + url = "mirror://apache/apr/${pname}-${version}.tar.bz2"; hash = "sha256-SQMNktJXXac1eRtJbcMi885c/5SUd5uozCjH9Gxd6zI="; }; @@ -29,7 +29,6 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe preConfigure = '' configureFlagsArray+=("--with-installbuilddir=$dev/share/build") @@ -83,4 +82,4 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.asl20; maintainers = [ ]; }; -}) +} diff --git a/pkgs/development/libraries/libhandy/0.x.nix b/pkgs/development/libraries/libhandy/0.x.nix index f49773d044bb..9df815ce2e6c 100644 --- a/pkgs/development/libraries/libhandy/0.x.nix +++ b/pkgs/development/libraries/libhandy/0.x.nix @@ -18,7 +18,7 @@ hicolor-icon-theme, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libhandy"; version = "0.0.13"; @@ -28,13 +28,12 @@ stdenv.mkDerivation (finalAttrs: { "devdoc" ]; outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchFromGitLab { domain = "source.puri.sm"; owner = "Librem5"; - repo = "libhandy"; - tag = "v${finalAttrs.version}"; + repo = pname; + rev = "v${version}"; sha256 = "1y23k623sjkldfrdiwfarpchg5mg58smcy1pkgnwfwca15wm1ra5"; }; @@ -84,4 +83,4 @@ stdenv.mkDerivation (finalAttrs: { maintainers = [ ]; platforms = platforms.unix; }; -}) +} diff --git a/pkgs/development/libraries/libhandy/default.nix b/pkgs/development/libraries/libhandy/default.nix index 88abf888f1da..f6fdf43b56b0 100644 --- a/pkgs/development/libraries/libhandy/default.nix +++ b/pkgs/development/libraries/libhandy/default.nix @@ -25,7 +25,7 @@ runCommand, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libhandy"; version = "1.8.3"; @@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: { outputBin = "dev"; src = fetchurl { - url = "mirror://gnome/sources/libhandy/${lib.versions.majorMinor finalAttrs.version}/libhandy-${finalAttrs.version}.tar.xz"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; hash = "sha256-BbSXIpBz/1V/ELMm4HTFBm+HQ6MC1IIKuXvLXNLasIc="; }; @@ -122,9 +122,8 @@ stdenv.mkDerivation (finalAttrs: { passthru = { - bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe updateScript = gnome.updateScript { - packageName = "libhandy"; + packageName = pname; versionPolicy = "odd-unstable"; }; } @@ -151,4 +150,4 @@ stdenv.mkDerivation (finalAttrs: { teams = [ teams.gnome ]; platforms = platforms.unix; }; -}) +} diff --git a/pkgs/development/libraries/libusb-compat/0.1.nix b/pkgs/development/libraries/libusb-compat/0.1.nix index 0c840af64b68..904848cf78fb 100644 --- a/pkgs/development/libraries/libusb-compat/0.1.nix +++ b/pkgs/development/libraries/libusb-compat/0.1.nix @@ -7,7 +7,7 @@ libusb1, }: -stdenv.mkDerivation (finalAttrs: { +stdenv.mkDerivation rec { pname = "libusb-compat"; version = "0.1.8"; @@ -16,12 +16,11 @@ stdenv.mkDerivation (finalAttrs: { "dev" ]; # get rid of propagating systemd closure outputBin = "dev"; - passthru.bin = finalAttrs.finalPackage.${finalAttrs.outputBin}; # fixes lib.getExe src = fetchFromGitHub { owner = "libusb"; repo = "libusb-compat-0.1"; - tag = "v${finalAttrs.version}"; + rev = "v${version}"; sha256 = "sha256-pAPERYSxoc47gwpPUoMkrbK8TOXyx03939vlFN0hHRg="; }; @@ -37,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: { # without this, libusb-compat is unable to find libusb1 postFixup = '' find $out/lib -name \*.so\* -type f -exec \ - patchelf --set-rpath ${lib.makeLibraryPath finalAttrs.buildInputs} {} \; + patchelf --set-rpath ${lib.makeLibraryPath buildInputs} {} \; ''; meta = with lib; { @@ -51,4 +50,4 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.lgpl2Plus; platforms = platforms.unix; }; -}) +} From 8754c663569af27746b71188599f2bb9081bafdc Mon Sep 17 00:00:00 2001 From: Yongun Seong Date: Fri, 20 Jun 2025 21:24:02 +0900 Subject: [PATCH 47/62] gnucash: unbreak on recent libxml2 deprecation --- pkgs/by-name/gn/gnucash/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/gn/gnucash/package.nix b/pkgs/by-name/gn/gnucash/package.nix index d47ecd67ed2b..e0a179c07614 100644 --- a/pkgs/by-name/gn/gnucash/package.nix +++ b/pkgs/by-name/gn/gnucash/package.nix @@ -3,6 +3,7 @@ stdenv, fetchFromGitHub, fetchurl, + fetchpatch2, aqbanking, boost, cmake, @@ -89,6 +90,12 @@ stdenv.mkDerivation rec { ./0004-exec-fq-wrapper.patch # this patch adds in env vars to the Python lib that makes it able to find required resource files ./0005-python-env.patch + # this patch backports a fix to remove unused includes causing build failures + (fetchpatch2 { + url = "https://github.com/Gnucash/gnucash/commit/940085a0172216240232551022686cea4da86096.patch?full_index=1"; + name = "0006-remove-unused-includes.patch"; + hash = "sha256-4CpBtKDkcT1HlOAHsbASxPiHKVpZ9ETWS3fXEupOl0Q="; + }) ]; postPatch = '' From e6140c26a8da7c39365366b829ce25843c5e350b Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Fri, 20 Jun 2025 08:34:15 -0400 Subject: [PATCH 48/62] ristate: unstable-2021-09-10 -> 0-unstable-2023-07-23 --- pkgs/by-name/ri/ristate/package.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ri/ristate/package.nix b/pkgs/by-name/ri/ristate/package.nix index 7c20c4a34274..dd13629ce3a3 100644 --- a/pkgs/by-name/ri/ristate/package.nix +++ b/pkgs/by-name/ri/ristate/package.nix @@ -2,21 +2,24 @@ lib, rustPlatform, fetchFromGitLab, + nix-update-script, }: rustPlatform.buildRustPackage { pname = "ristate"; - version = "unstable-2021-09-10"; + version = "0-unstable-2023-07-23"; src = fetchFromGitLab { owner = "snakedye"; repo = "ristate"; - rev = "34dfd0a0bab5b36df118d8da3956fd938c625b15"; - hash = "sha256-CH9DZ/7Bhbe6qKg1Nbj1rA9SzIsqVlBJg51XxAh0XnY="; + rev = "92e989f26cadac69af1208163733e73b4cf447da"; + hash = "sha256-6slH7R6kbSXQBd7q38oBEbngaCbFv0Tyq34VB1PAfhM="; }; useFetchCargoVendor = true; - cargoHash = "sha256-kzy0U2ZdmEr/F1edQDM3S30ETXaVUXrSoUA+8v486O0="; + cargoHash = "sha256-6uvIc69x/yHkAC3GJUuYGcCbpVyX/mb/pXLf+BQC+48="; + + passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; meta = with lib; { description = "River-status client written in Rust"; From ed0af3bf25cc138e6a2942c8483e87b5e5fd0762 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Wed, 18 Jun 2025 13:56:00 +0200 Subject: [PATCH 49/62] nixos/mastodon: make robust for cases where postgresql isn't enabled on the host E.g. when a remote PostgreSQL database is used Apparently you can't access the services.postgresql.package value anymore if postgresql isn't enabled? --- nixos/modules/services/web-apps/mastodon.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix index da6a09a00101..a415e8d7f771 100644 --- a/nixos/modules/services/web-apps/mastodon.nix +++ b/nixos/modules/services/web-apps/mastodon.nix @@ -973,7 +973,7 @@ in ''; path = [ cfg.package - config.services.postgresql.package + (if databaseActuallyCreateLocally then config.services.postgresql.package else pkgs.postgresql) ]; environment = env From 7fe7b58fdcfae4bcbe30953cc29933788f56c844 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Tue, 25 Mar 2025 13:58:56 -0700 Subject: [PATCH 50/62] python3Packages.llm-openrouter: add arcuru as maintainer Co-authored-by: Philip Taron --- pkgs/development/python-modules/llm-openrouter/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/llm-openrouter/default.nix b/pkgs/development/python-modules/llm-openrouter/default.nix index ada713681c69..d3254edb6cdc 100644 --- a/pkgs/development/python-modules/llm-openrouter/default.nix +++ b/pkgs/development/python-modules/llm-openrouter/default.nix @@ -51,6 +51,9 @@ buildPythonPackage rec { homepage = "https://github.com/simonw/llm-openrouter"; changelog = "https://github.com/simonw/llm-openrouter/releases/tag/${version}/CHANGELOG.md"; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ philiptaron ]; + maintainers = with lib.maintainers; [ + arcuru + philiptaron + ]; }; } From 35e471ad45b7fdf1c1f5a7e624a15671994888ae Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 20 Jun 2025 14:55:12 +0200 Subject: [PATCH 51/62] tlsrpt-reporter: apply patch for fetcher issue when no db exists The fetcher would then error out and not return the proper protocol version to the reportd instance, causing an error message. This is annoying, because I want to match success in the test. --- nixos/tests/tlsrpt.nix | 1 + pkgs/by-name/tl/tlsrpt-reporter/package.nix | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/nixos/tests/tlsrpt.nix b/nixos/tests/tlsrpt.nix index ccbb5c25e0fc..d93ac78b5240 100644 --- a/nixos/tests/tlsrpt.nix +++ b/nixos/tests/tlsrpt.nix @@ -31,6 +31,7 @@ machine.wait_for_file("/run/tlsrpt/collectd.sock") machine.wait_until_succeeds("journalctl -o cat -u tlsrpt-collectd | grep -Pq 'Database .* setup finished'") machine.wait_until_succeeds("journalctl -o cat -u tlsrpt-reportd | grep -Pq 'Database .* setup finished'") + machine.wait_until_succeeds("journalctl -o cat -u tlsrpt-reportd | grep -Pq 'Fetcher .* finished'") # Enabling postfix should put sendmail as the sendmail setting machine.succeed("grep -q sendmail_script=sendmail /etc/tlsrpt/reportd.cfg") diff --git a/pkgs/by-name/tl/tlsrpt-reporter/package.nix b/pkgs/by-name/tl/tlsrpt-reporter/package.nix index 713870ae063e..bbd2a6e94c4a 100644 --- a/pkgs/by-name/tl/tlsrpt-reporter/package.nix +++ b/pkgs/by-name/tl/tlsrpt-reporter/package.nix @@ -5,6 +5,7 @@ installShellFiles, python3, fetchFromGitHub, + fetchpatch, nixosTests, }: @@ -25,6 +26,14 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-IH8hJX9l+YonqOuszcMome4mjdIaedgGNIptxTyH1ng="; }; + patches = [ + (fetchpatch { + # https://github.com/sys4/tlsrpt-reporter/issues/43 + url = "https://github.com/sys4/tlsrpt-reporter/commit/32d00c13508dd7f9695b77e253e88c88dc838fbd.patch"; + hash = "sha256-RUNF86RkTu6DLv6/7eaY//fFB8kGzmZxQ70kdNpLxj8="; + }) + ]; + nativeBuildInputs = [ asciidoctor automake From 015bd4d0de149fabf57a4e63101313a8c895b8c9 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Fri, 20 Jun 2025 05:57:17 -0700 Subject: [PATCH 52/62] sfwbar: 1.0_beta16 -> 1.0_beta16.1 This fixes the build after NixOS/nixpkgs#409607 broke it. Diff: https://github.com/LBCrion/sfwbar/compare/refs/tags/v1.0_beta16...refs/tags/v1.0_beta16.1 Changelog: https://github.com/LBCrion/sfwbar/releases/tag/v1.0_beta16.1 Also, switch to finalAttrs style. --- pkgs/by-name/sf/sfwbar/package.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/sf/sfwbar/package.nix b/pkgs/by-name/sf/sfwbar/package.nix index f862473a27ec..8f832c00e8c8 100644 --- a/pkgs/by-name/sf/sfwbar/package.nix +++ b/pkgs/by-name/sf/sfwbar/package.nix @@ -16,18 +16,16 @@ docutils, wayland-scanner, }: -let - version = "1.0_beta16"; -in -stdenv.mkDerivation { + +stdenv.mkDerivation (finalAttrs: { pname = "sfwbar"; - inherit version; + version = "1.0_beta16.1"; src = fetchFromGitHub { owner = "LBCrion"; repo = "sfwbar"; - rev = "v${version}"; - hash = "sha256-jMEbw3Xla2cod/oKFQ4bD3sTHi7DZ0deG0H0Yt0Y7ck="; + tag = "v${finalAttrs.version}"; + hash = "sha256-WA9BXX+0VR8eSdHOYLs+DoazBqVwMllQSxkubq4SkWo="; }; buildInputs = [ @@ -57,7 +55,7 @@ stdenv.mkDerivation { meta = { homepage = "https://github.com/LBCrion/sfwbar"; description = "Flexible taskbar application for wayland compositors, designed with a stacking layout in mind"; - changelog = "https://github.com/LBCrion/sfwbar/releases/tag/v${version}"; + changelog = "https://github.com/LBCrion/sfwbar/releases/tag/v${finalAttrs.version}"; mainProgram = "sfwbar"; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ @@ -66,4 +64,4 @@ stdenv.mkDerivation { ]; license = lib.licenses.gpl3Only; }; -} +}) From c1ee60f76939728866bd7ed66dd8043972990201 Mon Sep 17 00:00:00 2001 From: amesgen Date: Fri, 20 Jun 2025 15:41:27 +0200 Subject: [PATCH 53/62] python3Packages.fpylll: fix standalone usage Otherwise, we get: >>> from fpylll import * Traceback (most recent call last): File "", line 1, in File "/nix/store/2dmfqi6fhmmrp3jgaz2fznasifxkr1zi-python3-3.12.10-env/lib/python3.12/site-packages/fpylll/__init__.py", line 3, in from .fplll.integer_matrix import IntegerMatrix File "src/fpylll/fplll/integer_matrix.pyx", line 1, in init fpylll.fplll.integer_matrix ModuleNotFoundError: No module named 'cysignals' --- pkgs/development/python-modules/fpylll/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/fpylll/default.nix b/pkgs/development/python-modules/fpylll/default.nix index d0ddbf91ceda..b6a0e447ea0a 100644 --- a/pkgs/development/python-modules/fpylll/default.nix +++ b/pkgs/development/python-modules/fpylll/default.nix @@ -48,7 +48,10 @@ buildPythonPackage rec { fplll ]; - propagatedBuildInputs = [ numpy ]; + propagatedBuildInputs = [ + numpy + cysignals + ]; nativeCheckInputs = [ pytestCheckHook ]; From 51d4495ae763e99fede1a09cfc268e9cf1e248fa Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Thu, 19 Jun 2025 23:41:06 +0800 Subject: [PATCH 54/62] xfce.xfburn: 0.7.2 -> 0.8.0 https://gitlab.xfce.org/apps/xfburn/-/compare/xfburn-0.7.2...xfburn-0.8.0 --- .../xfce/applications/xfburn/default.nix | 48 ++++++++++++++----- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/pkgs/desktops/xfce/applications/xfburn/default.nix b/pkgs/desktops/xfce/applications/xfburn/default.nix index 8ebcca1aa114..a3b816c1a65d 100644 --- a/pkgs/desktops/xfce/applications/xfburn/default.nix +++ b/pkgs/desktops/xfce/applications/xfburn/default.nix @@ -1,7 +1,14 @@ { - mkXfceDerivation, + stdenv, lib, + fetchFromGitLab, docbook_xsl, + glib, + libxslt, + meson, + ninja, + pkg-config, + wrapGAppsHook3, exo, gst_all_1, gtk3, @@ -9,24 +16,37 @@ libgudev, libisofs, libxfce4ui, - libxslt, + libxfce4util, + gitUpdater, }: -mkXfceDerivation { - category = "apps"; +stdenv.mkDerivation (finalAttrs: { pname = "xfburn"; - version = "0.7.2"; - odd-unstable = false; + version = "0.8.0"; - sha256 = "sha256-eJ+MxNdJiDTLW4GhrwgQIyFuOSTWsF34Oet9HJAtIqI="; + src = fetchFromGitLab { + domain = "gitlab.xfce.org"; + owner = "apps"; + repo = "xfburn"; + tag = "xfburn-${finalAttrs.version}"; + hash = "sha256-10MjUxy1Ul6CVLdEWFnjppgsI4fAUWqkT2azJBzp0/Q="; + }; + + strictDeps = true; nativeBuildInputs = [ - libxslt docbook_xsl + glib # glib-genmarshal + libxslt # xsltproc + meson + ninja + pkg-config + wrapGAppsHook3 ]; buildInputs = [ exo + glib gst_all_1.gstreamer gst_all_1.gst-plugins-base gtk3 @@ -34,11 +54,17 @@ mkXfceDerivation { libgudev libisofs libxfce4ui + libxfce4util ]; - meta = with lib; { + passthru.updateScript = gitUpdater { rev-prefix = "xfburn-"; }; + + meta = { description = "Disc burner and project creator for Xfce"; + homepage = "https://gitlab.xfce.org/apps/xfburn"; + license = lib.licenses.gpl2Plus; mainProgram = "xfburn"; - teams = [ teams.xfce ]; + teams = [ lib.teams.xfce ]; + platforms = lib.platforms.linux; }; -} +}) From f5177f3d1eec2d3608a438fe84a6235ce7be99cc Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Fri, 20 Jun 2025 08:09:40 -0700 Subject: [PATCH 55/62] rocmPackages.llvm.rocmcxx: rm bootstrap compiler references Fixes rocmPackages.clr failure due to gcc-unwrapped in disallowedRequisites. This also adds this as a disallowed requisite to rocmcxx so failure will happen closer to the cause if it regresses. Fixes https://github.com/NixOS/nixpkgs/issues/417992 --- .../rocm-modules/6/llvm/default.nix | 52 ++++++++++++------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/pkgs/development/rocm-modules/6/llvm/default.nix b/pkgs/development/rocm-modules/6/llvm/default.nix index 5131fc979df8..c4174805684c 100644 --- a/pkgs/development/rocm-modules/6/llvm/default.nix +++ b/pkgs/development/rocm-modules/6/llvm/default.nix @@ -54,6 +54,8 @@ let stdenv.cc.bintools gcc-unwrapped stdenvToBuildRocmLlvm + stdenvToBuildRocmLlvm.cc + stdenvToBuildRocmLlvm.cc.cc ]; gcc-prefix = let @@ -126,28 +128,36 @@ let let linked = symlinkJoin { inherit name paths; }; in - runCommand name { } '' - set -x - mkdir -p $out/ - cp --reflink=auto -rL ${linked}/* $out/ - chmod -R +rw $out - mkdir -p $out/usr - ln -s $out/ $out/usr/local - mkdir -p $out/nix-support/ - rm -rf $out/lib64 # we don't need mixed 32 bit - echo 'export CC=clang' >> $out/nix-support/setup-hook - echo 'export CXX=clang++' >> $out/nix-support/setup-hook - mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/linux/ - ln -s $out/lib/linux/libclang_rt.* $out/lib/clang/${llvmMajorVersion}/lib/linux/ + runCommand name + { + # If this is erroring, try why-depends --precise on the symlinkJoin of inputs to look for the problem + # nix why-depends --precise .#rocmPackages.llvm.rocmcxx.linked /store/path/its/not/allowed + disallowedRequisites = disallowedRefsForToolchain; + passthru.linked = linked; + } + '' + set -x + mkdir -p $out/ + cp --reflink=auto -rL ${linked}/* $out/ + chmod -R +rw $out + mkdir -p $out/usr + ln -s $out/ $out/usr/local + mkdir -p $out/nix-support/ + # we don't need mixed 32 bit, the presence of lib64 is used by LLVM to decide it's a multilib sysroot + rm -rf $out/lib64 + echo 'export CC=clang' >> $out/nix-support/setup-hook + echo 'export CXX=clang++' >> $out/nix-support/setup-hook + mkdir -p $out/lib/clang/${llvmMajorVersion}/lib/linux/ + ln -s $out/lib/linux/libclang_rt.* $out/lib/clang/${llvmMajorVersion}/lib/linux/ - find $out -type f -exec sed -i "s|${cc.out}|$out|g" {} + - find $out -type f -exec sed -i "s|${cc.dev}|$out|g" {} + + find $out -type f -exec sed -i "s|${cc.out}|$out|g" {} + + find $out -type f -exec sed -i "s|${cc.dev}|$out|g" {} + - # our /include now has more than clang expects, so this specific dir still needs to point to cc.dev - # FIXME: could copy into a different subdir? - sed -i 's|set(CLANG_INCLUDE_DIRS.*$|set(CLANG_INCLUDE_DIRS "${cc.dev}/include")|g' $out/lib/cmake/clang/ClangConfig.cmake - ${lib.getExe rdfind} -makesymlinks true $out/ # create links *within* the sysroot to save space - ''; + # our /include now has more than clang expects, so this specific dir still needs to point to cc.dev + # FIXME: could copy into a different subdir? + sed -i 's|set(CLANG_INCLUDE_DIRS.*$|set(CLANG_INCLUDE_DIRS "${cc.dev}/include")|g' $out/lib/cmake/clang/ClangConfig.cmake + ${lib.getExe rdfind} -makesymlinks true $out/ # create links *within* the sysroot to save space + ''; findClangNostdlibincPatch = x: ( @@ -371,6 +381,8 @@ rec { postFixup = (old.postFixup or "") + '' + find $lib -type f -exec remove-references-to -t ${stdenvToBuildRocmLlvm.cc} {} + + find $lib -type f -exec remove-references-to -t ${stdenv.cc} {} + find $lib -type f -exec remove-references-to -t ${stdenv.cc.cc} {} + find $lib -type f -exec remove-references-to -t ${stdenv.cc.bintools} {} + ''; From 88f129f5d168b0d00cdac112f1d5fe08db501881 Mon Sep 17 00:00:00 2001 From: vik Date: Fri, 20 Jun 2025 08:32:25 -0700 Subject: [PATCH 56/62] rclone: 1.70.0 -> 1.70.1 Diff: https://github.com/rclone/rclone/compare/v1.70.0...v1.70.1 Changelog: https://github.com/rclone/rclone/blob/v1.70.1/docs/content/changelog.md --- pkgs/applications/networking/sync/rclone/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index c8ad4a6a789e..56b455daa28d 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { pname = "rclone"; - version = "1.70.0"; + version = "1.70.1"; outputs = [ "out" @@ -28,7 +28,7 @@ buildGoModule rec { owner = "rclone"; repo = "rclone"; tag = "v${version}"; - hash = "sha256-HBH3cOJzp3lNI9U2PWChjWmOurmq7clOPFvwnqOg1xA="; + hash = "sha256-lfBwVRYqMjmSQBq3D20G8TfxnTUTspPM3x88UAqReVE="; }; vendorHash = "sha256-9yEWEM96cRUzp1mRXEzxvOaBZQsf7Zifoe163OtJCPw="; From d1da9cce7caa1aa1336a7d41395060f585935901 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Thu, 19 Jun 2025 21:09:43 +0100 Subject: [PATCH 57/62] spire: move to finalAttrs pattern and enable tests * Moved to finalAttrs pattern to eliminate use of rec * Added ldflags to reduce binary size and add version info * Enable the majority of tests * Added install check with version checks which run on compatible builders * Updated homepage * Added myself as a maintainer --- pkgs/by-name/sp/spire/package.nix | 68 ++++++++++++++++++++++++++++--- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/sp/spire/package.nix b/pkgs/by-name/sp/spire/package.nix index 7f21df254a72..726685379259 100644 --- a/pkgs/by-name/sp/spire/package.nix +++ b/pkgs/by-name/sp/spire/package.nix @@ -4,7 +4,7 @@ fetchFromGitHub, }: -buildGoModule rec { +buildGoModule (finalAttrs: { pname = "spire"; version = "1.12.3"; @@ -17,17 +17,50 @@ buildGoModule rec { src = fetchFromGitHub { owner = "spiffe"; repo = "spire"; - rev = "v${version}"; + tag = "v${finalAttrs.version}"; sha256 = "sha256-ZtSJ5/Qg4r2dkFGM/WiDWwQc2OtkX45kGXTdXU35Cng="; }; vendorHash = "sha256-1ngjcqGwUNMyR/wBCo0MYguD1gGH8rbI2j9BB+tGL9k="; + ldflags = [ + "-s" + "-w" + "-X github.com/spiffe/spire/pkg/common/version.gittag=${finalAttrs.version}" + ]; + subPackages = [ "cmd/spire-agent" "cmd/spire-server" ]; + excludedPackages = [ + # ensure these files aren't evaluated, see preCheck + "test/tmpsimulator" + "pkg/agent/plugin/nodeattestor/tpmdevid" + ]; + + __darwinAllowLocalNetworking = true; + + checkFlags = + let + skippedTests = [ + # wants to reach remote TUF mirror + "TestDockerConfig" + "TestPlugin" + ]; + in + [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ]; + + preCheck = '' + # remove test files which reference github.com/google/go-tpm-tools/simulator + # since it requires cgo and some missing header files + rm -rf test/tpmsimulator pkg/server/plugin/nodeattestor/tpmdevid/devid_test.go + + # unset to run all tests + unset subPackages + ''; + # Usually either the agent or server is needed for a given use case, but not both postInstall = '' mkdir -vp $agent/bin $server/bin @@ -38,11 +71,34 @@ buildGoModule rec { ln -vs $server/bin/spire-server $out/bin/spire-server ''; + doInstallCheck = true; + installCheckPhase = '' + runHook preInstallCheck + + $out/bin/spire-agent -h + if [ "$($out/bin/spire-agent --version 2>&1)" != "${finalAttrs.version}" ]; then + echo "spire-agent version does not match" + exit 1 + fi + + $out/bin/spire-server -h + if [ "$($out/bin/spire-server --version 2>&1)" != "${finalAttrs.version}" ]; then + echo "spire-server version does not match" + exit 1 + fi + + runHook postInstallCheck + ''; + meta = { description = "SPIFFE Runtime Environment"; - homepage = "https://github.com/spiffe/spire"; - changelog = "https://github.com/spiffe/spire/releases/tag/v${version}"; + homepage = "https://spiffe.io/"; + downloadPage = "https://github.com/spiffe/spire"; + changelog = "https://github.com/spiffe/spire/releases/tag/v${finalAttrs.version}"; license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ fkautz ]; + maintainers = with lib.maintainers; [ + fkautz + jk + ]; }; -} +}) From d096ae2640dc577d73d0f519e583c9bf5fd9b91b Mon Sep 17 00:00:00 2001 From: Romanos Skiadas Date: Fri, 20 Jun 2025 18:37:38 +0300 Subject: [PATCH 58/62] gnucash: remove me from maintainers I haven't used it in years. --- pkgs/by-name/gn/gnucash/package.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/by-name/gn/gnucash/package.nix b/pkgs/by-name/gn/gnucash/package.nix index d47ecd67ed2b..926a0670edd5 100644 --- a/pkgs/by-name/gn/gnucash/package.nix +++ b/pkgs/by-name/gn/gnucash/package.nix @@ -188,7 +188,6 @@ stdenv.mkDerivation rec { ''; license = licenses.gpl2Plus; maintainers = with maintainers; [ - rski nevivurn ]; platforms = platforms.unix; From 1d1faeb638eed5f6fe6a1f4d20a9d42dafd5dc51 Mon Sep 17 00:00:00 2001 From: Naxdy Date: Fri, 20 Jun 2025 17:29:31 +0200 Subject: [PATCH 59/62] decklink: fix build for kernel 6.15 --- .../decklink/02-rename-timer-delete.patch | 26 +++++++++++++++++++ pkgs/os-specific/linux/decklink/default.nix | 21 +++++++++------ 2 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch diff --git a/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch b/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch new file mode 100644 index 000000000000..3535f8b9af09 --- /dev/null +++ b/pkgs/os-specific/linux/decklink/02-rename-timer-delete.patch @@ -0,0 +1,26 @@ +diff --git a/blackmagic-io-14.4.1a4/bm_util.c b/blackmagic-io-14.4.1a4/bm_util.c +index 66751cb..bf9723c 100644 +--- a/blackmagic-io-14.4.1a4/bm_util.c ++++ b/blackmagic-io-14.4.1a4/bm_util.c +@@ -471,10 +471,10 @@ void bm_timer_free(bm_timer_t* timer) + { + #if KERNEL_VERSION_OR_LATER(4, 15, 0) + struct bm_timer_wrapper* timer_wrapper = container_of(timer, struct bm_timer_wrapper, timer); +- del_timer(timer); ++ timer_delete(timer); + bm_kfree(timer_wrapper); + #else +- del_timer(timer); ++ timer_delete(timer); + bm_kfree(timer); + #endif + } +@@ -491,7 +491,7 @@ void bm_timer_expire_at(bm_timer_t* timer, uint64_t ns) + + void bm_timer_cancel(bm_timer_t* timer) + { +- del_timer_sync(timer); ++ timer_delete_sync(timer); + } + + // Event waiting diff --git a/pkgs/os-specific/linux/decklink/default.nix b/pkgs/os-specific/linux/decklink/default.nix index 3c2320b43a26..03f1b5cb61f8 100644 --- a/pkgs/os-specific/linux/decklink/default.nix +++ b/pkgs/os-specific/linux/decklink/default.nix @@ -13,14 +13,19 @@ stdenv.mkDerivation (finalAttrs: { # See pkgs/by-name/bl/blackmagic-desktop-video/package.nix for more. inherit (blackmagic-desktop-video) src version; - patches = lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.13") [ - # needed for version 14.4.x to build for kernel 6.13 - (fetchpatch { - name = "01-update-makefiles"; - url = "https://aur.archlinux.org/cgit/aur.git/plain/01-update-makefiles.patch?h=decklink"; - hash = "sha256-l3iu0fG/QJMdGI/WSlNn+qjF4nK25JxoiwhPrMGTqE4="; - }) - ]; + patches = + (lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.13") [ + # needed for version 14.4.x to build for kernel 6.13 + (fetchpatch { + name = "01-update-makefiles"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/01-update-makefiles.patch?h=decklink"; + hash = "sha256-l3iu0fG/QJMdGI/WSlNn+qjF4nK25JxoiwhPrMGTqE4="; + }) + ]) + ++ (lib.optionals (lib.versionAtLeast kernel.modDirVersion "6.15") [ + # needed for version 14.4.x to build for kernel 6.15 + ./02-rename-timer-delete.patch + ]); KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; INSTALL_MOD_PATH = placeholder "out"; From abc8eb2b78869076f8acd4842ad176a502f7aa76 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 19 Jun 2025 08:33:27 +0000 Subject: [PATCH 60/62] liburing: 2.10 -> 2.11 --- pkgs/by-name/li/liburing/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/liburing/package.nix b/pkgs/by-name/li/liburing/package.nix index b4cde206e844..995c1b59ab46 100644 --- a/pkgs/by-name/li/liburing/package.nix +++ b/pkgs/by-name/li/liburing/package.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "liburing"; - version = "2.10"; + version = "2.11"; src = fetchFromGitHub { owner = "axboe"; repo = "liburing"; tag = "liburing-${version}"; - hash = "sha256-yw21Krg/xsBGCbwwQDIbrq/7q+LNCwC3cXyGPANjkEA="; + hash = "sha256-V73QP89WMrL2fkPRbo/TSkfO7GeDsCudlw2Ut5baDzA="; }; separateDebugInfo = true; From ee9679e3cfe6780faccd56de34b0b2732d44d54f Mon Sep 17 00:00:00 2001 From: Mason Mackaman Date: Wed, 28 May 2025 13:14:49 -0400 Subject: [PATCH 61/62] Add meta.mainProgram to crane/go-containerregistry so `lib.getExe pkgs.crane` works --- pkgs/by-name/go/go-containerregistry/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/go/go-containerregistry/package.nix b/pkgs/by-name/go/go-containerregistry/package.nix index 93d47d41e03f..cfb94d695d71 100644 --- a/pkgs/by-name/go/go-containerregistry/package.nix +++ b/pkgs/by-name/go/go-containerregistry/package.nix @@ -68,6 +68,7 @@ buildGoModule rec { description = "Tools for interacting with remote images and registries including crane and gcrane"; homepage = "https://github.com/google/go-containerregistry"; license = licenses.asl20; + mainProgram = "crane"; maintainers = with maintainers; [ yurrriq ]; }; } From ee52555ca7c6b63f09a0db298a1806fdc4929382 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Fri, 20 Jun 2025 11:26:53 +0100 Subject: [PATCH 62/62] hardinfo2: 2.2.10 -> 2.2.13 * Provide newly required wayland dependencies * Move to finalAttrs pattern * Remove update menu item * Default to no-theme * Fix access to xdg-open * Provide runtime tooling for various benchmarks * Make cups available for printer support * Fix path on service file * Added passthru.updateScript accounting for release- to get auto-updates * Added meta.downloadPage * Added meta.changelog * Add myself as a maintainer --- .../ha/hardinfo2/default-no-theme.patch | 13 +++ pkgs/by-name/ha/hardinfo2/package.nix | 103 ++++++++++++++---- pkgs/by-name/ha/hardinfo2/remove-update.patch | 58 ++++++++++ 3 files changed, 155 insertions(+), 19 deletions(-) create mode 100644 pkgs/by-name/ha/hardinfo2/default-no-theme.patch create mode 100644 pkgs/by-name/ha/hardinfo2/remove-update.patch diff --git a/pkgs/by-name/ha/hardinfo2/default-no-theme.patch b/pkgs/by-name/ha/hardinfo2/default-no-theme.patch new file mode 100644 index 000000000000..14ec8807e853 --- /dev/null +++ b/pkgs/by-name/ha/hardinfo2/default-no-theme.patch @@ -0,0 +1,13 @@ +diff --git a/shell/shell.c b/shell/shell.c +index 76523e9a..dbfe2d16 100644 +--- a/shell/shell.c ++++ b/shell/shell.c +@@ -620,7 +620,7 @@ static void create_window(void) + gchar *conf_path = g_build_filename(g_get_user_config_dir(), "hardinfo2","settings.ini", NULL); + g_key_file_load_from_file(key_file, conf_path, G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, NULL); + params.theme = g_key_file_get_integer(key_file, "Theme", "ThemeNumber", NULL); +- if(params.theme==0) params.theme=1; ++ if(params.theme==0) params.theme=-1; //default to no theme + if(params.theme<-1) params.theme=-1; + if(params.theme>6) params.theme=-1; + diff --git a/pkgs/by-name/ha/hardinfo2/package.nix b/pkgs/by-name/ha/hardinfo2/package.nix index 44385da328b3..63c8658cdc9f 100644 --- a/pkgs/by-name/ha/hardinfo2/package.nix +++ b/pkgs/by-name/ha/hardinfo2/package.nix @@ -4,14 +4,18 @@ fetchFromGitHub, cmake, + glslang, pkg-config, libsForQt5, + makeWrapper, wrapGAppsHook4, + cups, gtk3, json-glib, lerc, libdatrie, + libdecor, libepoxy, libnghttp2, libpsl, @@ -21,46 +25,69 @@ libsysprof-capture, libthai, libxkbcommon, + libXdmcp, + libXtst, pcre2, sqlite, util-linux, - libXdmcp, - libXtst, - mesa-demos, - makeWrapper, + vulkan-headers, + wayland, + + # runtime dmidecode, + gawk, + iperf, + mesa-demos, + sysbench, + udisks, + vulkan-tools, + xdg-utils, + xrandr, + + nix-update-script, + + printingSupport ? true, }: -stdenv.mkDerivation (finalAtrs: { +stdenv.mkDerivation (finalAttrs: { pname = "hardinfo2"; - version = "2.2.10"; + version = "2.2.13"; src = fetchFromGitHub { owner = "hardinfo2"; repo = "hardinfo2"; - tag = "release-${finalAtrs.version}"; - hash = "sha256-Ea1uhzAQEn8oDvWslGzrqoI2yzVDGxwTqbthfKEkYyQ="; + tag = "release-${finalAttrs.version}"; + hash = "sha256-HRP8xjiwhlNHjW4D8y74Pshpn7bksmN5j4jhfF6KOYo="; }; + patches = [ + ./remove-update.patch + ./default-no-theme.patch + ]; + + # fix absolute path for xdg-open + postPatch = '' + substituteInPlace deps/sysobj_early/gui/uri_handler.c \ + --replace-fail /usr/bin/xdg-open "${lib.getExe' xdg-utils "xdg-open"}" + ''; + nativeBuildInputs = [ cmake pkg-config + + glslang + wrapGAppsHook4 libsForQt5.wrapQtAppsHook makeWrapper ]; - preFixup = '' - makeWrapperArgs+=("''${qtWrapperArgs[@]}") - ''; - - dontWrapQtApps = true; - buildInputs = [ gtk3 json-glib lerc libdatrie + libdecor libepoxy libnghttp2 libpsl @@ -75,6 +102,8 @@ stdenv.mkDerivation (finalAtrs: { util-linux libXdmcp libXtst + vulkan-headers + wayland ]; hardeningDisable = [ "fortify" ]; @@ -84,20 +113,56 @@ stdenv.mkDerivation (finalAtrs: { (lib.cmakeFeature "CMAKE_INSTALL_SERVICEDIR" "${placeholder "out"}/lib") ]; - postFixup = '' - wrapProgram $out/bin/hardinfo2 \ - --prefix PATH : "${dmidecode}/bin:${mesa-demos}/bin" + dontWrapQtApps = true; + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; + runtimeDeps = [ + # system stats + dmidecode + mesa-demos # glxinfo + vkgears for benchmark + + # display info + vulkan-tools # vulkaninfo + xrandr + + # additional tooling for benchmarks + # https://github.com/hardinfo2/hardinfo2/blob/release-2.2.13/shell/shell.c#L641-L652 + gawk + iperf + sysbench + udisks + ]; + + runtimeLibs = lib.optionals printingSupport [ cups ]; + + postFixup = '' + wrapProgram $out/bin/hardinfo2 \ + --prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.runtimeLibs} + + substituteInPlace $out/lib/systemd/system/hardinfo2.service \ + --replace-fail "ExecStart=/usr/bin/hwinfo2_fetch_sysdata" "ExecStart=$out/hwinfo2_fetch_sysdata" + ''; + + # account for tags having a release- prefix + passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=release-(.*)" ]; }; + meta = { - homepage = "http://www.hardinfo2.org"; description = "System information and benchmarks for Linux systems"; + homepage = "http://www.hardinfo2.org/"; + downloadPage = "https://github.com/hardinfo2/hardinfo2/"; + changelog = "https://github.com/hardinfo2/hardinfo2/releases/tag/release-${finalAttrs.version}"; license = with lib.licenses; [ gpl2Plus gpl3Plus lgpl2Plus ]; - maintainers = with lib.maintainers; [ sigmanificient ]; + maintainers = with lib.maintainers; [ + sigmanificient + jk + ]; platforms = lib.platforms.linux; mainProgram = "hardinfo2"; }; diff --git a/pkgs/by-name/ha/hardinfo2/remove-update.patch b/pkgs/by-name/ha/hardinfo2/remove-update.patch new file mode 100644 index 000000000000..960e79b3fedf --- /dev/null +++ b/pkgs/by-name/ha/hardinfo2/remove-update.patch @@ -0,0 +1,58 @@ +diff --git a/includes/uidefs.h b/includes/uidefs.h +index 552fd3cb..4998f677 100644 +--- a/includes/uidefs.h ++++ b/includes/uidefs.h +@@ -36,7 +36,6 @@ char *uidefs_str = + " " + " " + " " +- " " + " " + " " + " " +@@ -48,8 +47,6 @@ char *uidefs_str = + /* " "*/ + " " + " " +- " " +- " " + " " + ""; + +diff --git a/shell/menu.c b/shell/menu.c +index 5ffd4410..04398b1d 100644 +--- a/shell/menu.c ++++ b/shell/menu.c +@@ -52,11 +52,6 @@ static GtkActionEntry entries[] = { + N_("Send benchmark results and receive updated data from the network"), + G_CALLBACK(cb_sync_manager)}, + +- {"UpdateAction", HI_STOCK_UPDATES, +- N_("Update Available"), "", +- N_("Update Available"), +- G_CALLBACK(cb_update)}, +- + //does not work correctly and value low + /*{"CopyAction", HI_STOCK_CLIPBOARD, + N_("_Copy to Clipboard"), "C", +@@ -78,11 +73,6 @@ static GtkActionEntry entries[] = { + NULL, + G_CALLBACK(cb_open_help_page)}, + +- {"UpdatesPageAction", NULL, +- N_("_Update HardInfo2"), "", +- NULL, +- G_CALLBACK(cb_open_updates_page)}, +- + {"ReportBugAction", NULL, + N_("_Report bug"), NULL, + NULL, +@@ -237,8 +227,6 @@ void menu_init(Shell * shell) + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("home.svg",size,size)); + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/HelpPage")); + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("help.svg",size,size)); +- t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/UpdatesPage")); +- gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("updates.svg",size,size)); + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/ReportBug")); + gtk_image_menu_item_set_image(t,icon_cache_get_image_at_size("report-bug.svg",size,size)); + t=GTK_IMAGE_MENU_ITEM(gtk_ui_manager_get_widget(shell->ui_manager, "/MainMenu/HelpMenu/About"));