From d0c0b875f7bbf75a255d5410a356fca3043aee97 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 31 Aug 2025 14:59:47 +0200 Subject: [PATCH] treewide: remove __recurseIntoDerivationForReleaseJobs This attribute was supposed to be set on derivations, to make the release tools recurse into them. The remaining uses were all on regular attrsets, though, so this is safe to remove. --- ci/eval/attrpaths.nix | 21 +----------- pkgs/test/default.nix | 4 +-- pkgs/top-level/all-packages.nix | 33 ++++++++----------- pkgs/top-level/linux-kernels.nix | 1 - pkgs/top-level/pkg-config/tests.nix | 4 +-- pkgs/top-level/release-python.nix | 6 +--- .../release-unfree-redistributable.nix | 6 +--- 7 files changed, 18 insertions(+), 57 deletions(-) diff --git a/ci/eval/attrpaths.nix b/ci/eval/attrpaths.nix index b198a51c8837..8ebc822ccb0d 100644 --- a/ci/eval/attrpaths.nix +++ b/ci/eval/attrpaths.nix @@ -21,20 +21,6 @@ }: let - # The intended semantics are that an attrpath rooted at pkgs is - # part of the (unfiltered) release jobset iff both of the following - # are true: - # - # 1. The attrpath leads to a value for which lib.isDerivation is true - # - # 2. Any proper prefix of the attrpath at which lib.isDerivation - # is true also has __recurseIntoDerivationForReleaseJobs=true. - # - # The second condition is unfortunately necessary because there are - # Hydra release jobnames which have proper prefixes which are - # attrnames of derivations (!). We should probably restructure - # the job tree so that this is not the case. - # # TODO: Use mapAttrsToListRecursiveCond when this PR lands: # https://github.com/NixOS/nixpkgs/pull/395160 justAttrNames = @@ -43,12 +29,7 @@ let result = if path == [ "AAAAAASomeThingsFailToEvaluate" ] || !(lib.isAttrs value) then [ ] - else if - lib.isDerivation value - && - # in some places we have *derivations* with jobsets as subattributes, ugh - !(value.__recurseIntoDerivationForReleaseJobs or false) - then + else if lib.isDerivation value then [ path ] else lib.pipe value [ diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix index dd1e30d09fa5..cf7327c8242d 100644 --- a/pkgs/test/default.nix +++ b/pkgs/test/default.nix @@ -152,9 +152,7 @@ with pkgs; php = recurseIntoAttrs (callPackages ./php { }); - pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { }) // { - __recurseIntoDerivationForReleaseJobs = true; - }; + pkg-config = recurseIntoAttrs (callPackage ../top-level/pkg-config/tests.nix { }); buildRustCrate = recurseIntoAttrs (callPackage ../build-support/rust/build-rust-crate/test { }); importCargoLock = recurseIntoAttrs (callPackage ../build-support/rust/test/import-cargo-lock { }); diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 22a006492506..b6d11ebc4124 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5177,10 +5177,7 @@ with pkgs; haskell.packages.ghc96 else haskell.packages.ghc98 - ) - // { - __recurseIntoDerivationForReleaseJobs = true; - }; + ); # haskellPackages.ghc is build->host (it exposes the compiler used to build the # set, similarly to stdenv.cc), but pkgs.ghc should be host->target to be more @@ -8868,22 +8865,18 @@ with pkgs; } ); - libsForQt5 = - (recurseIntoAttrs ( - import ./qt5-packages.nix { - inherit - lib - config - __splicedPackages - makeScopeWithSplicing' - generateSplicesForMkScope - pkgsHostTarget - ; - } - )) - // { - __recurseIntoDerivationForReleaseJobs = true; - }; + libsForQt5 = recurseIntoAttrs ( + import ./qt5-packages.nix { + inherit + lib + config + __splicedPackages + makeScopeWithSplicing' + generateSplicesForMkScope + pkgsHostTarget + ; + } + ); # plasma5Packages maps to the Qt5 packages set that is used to build the plasma5 desktop plasma5Packages = libsForQt5; diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 92e7265ed62b..f03f4bb76b8d 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -789,7 +789,6 @@ in linux_libre = recurseIntoAttrs (packagesFor kernels.linux_libre); linux_latest_libre = recurseIntoAttrs (packagesFor kernels.linux_latest_libre); - __recurseIntoDerivationForReleaseJobs = true; } // lib.optionalAttrs config.allowAliases { diff --git a/pkgs/top-level/pkg-config/tests.nix b/pkgs/top-level/pkg-config/tests.nix index 345283f83d81..4f3e6c8fb7cf 100644 --- a/pkgs/top-level/pkg-config/tests.nix +++ b/pkgs/top-level/pkg-config/tests.nix @@ -22,7 +22,5 @@ let }; in lib.recurseIntoAttrs { - defaultPkgConfigPackages = allPkgs.callPackage ./test-defaultPkgConfigPackages.nix { } // { - __recurseIntoDerivationForReleaseJobs = true; - }; + defaultPkgConfigPackages = allPkgs.callPackage ./test-defaultPkgConfigPackages.nix { }; } diff --git a/pkgs/top-level/release-python.nix b/pkgs/top-level/release-python.nix index 18774202503f..b02b749577a9 100644 --- a/pkgs/top-level/release-python.nix +++ b/pkgs/top-level/release-python.nix @@ -36,11 +36,7 @@ let res = builtins.tryEval ( if isDerivation value then value.meta.isBuildPythonPackage or [ ] - else if - value.recurseForDerivations or false - || value.recurseForRelease or false - || value.__recurseIntoDerivationForReleaseJobs or false - then + else if value.recurseForDerivations or false || value.recurseForRelease or false then packagePython value else [ ] diff --git a/pkgs/top-level/release-unfree-redistributable.nix b/pkgs/top-level/release-unfree-redistributable.nix index 45940c4d02cc..cf5c8a4d4987 100644 --- a/pkgs/top-level/release-unfree-redistributable.nix +++ b/pkgs/top-level/release-unfree-redistributable.nix @@ -69,11 +69,7 @@ let value.meta.hydraPlatforms or (lib.subtractLists (value.meta.badPlatforms or [ ]) (value.meta.platforms or [ "x86_64-linux" ])) ) - else if - value.recurseForDerivations or false - || value.recurseForRelease or false - || value.__recurseIntoDerivationForReleaseJobs or false - then + else if value.recurseForDerivations or false || value.recurseForRelease or false then # Recurse packagesWith attrPath cond value else