diff --git a/pkgs/top-level/release-attrpaths-superset.nix b/pkgs/top-level/release-attrpaths-superset.nix index 968ca142ecf7..e339d15e1554 100644 --- a/pkgs/top-level/release-attrpaths-superset.nix +++ b/pkgs/top-level/release-attrpaths-superset.nix @@ -30,63 +30,6 @@ }: let - # No release package attrpath may have any of these attrnames as - # its initial component. - # - # If you can find a way to remove any of these entries without - # causing CI to fail, please do so. - # - excluded-toplevel-attrs = { - # spliced packagesets - __splicedPackages = true; - pkgsBuildBuild = true; - pkgsBuildHost = true; - pkgsBuildTarget = true; - pkgsHostHost = true; - pkgsHostTarget = true; - pkgsTargetTarget = true; - buildPackages = true; - targetPackages = true; - - # cross packagesets - pkgsLLVM = true; - pkgsMusl = true; - pkgsStatic = true; - pkgsCross = true; - pkgsx86_64Darwin = true; - pkgsi686Linux = true; - pkgsLinux = true; - pkgsExtraHardening = true; - }; - - # No release package attrname may have any of these at a component - # anywhere in its attrpath. These are the names of gigantic - # top-level attrsets that have leaked into so many sub-packagesets - # that it's easier to simply exclude them entirely. - # - # If you can find a way to remove any of these entries without - # causing CI to fail, please do so. - # - excluded-attrnames-at-any-depth = { - lib = true; - override = true; - __functor = true; - __functionArgs = true; - __splicedPackages = true; - newScope = true; - scope = true; - pkgs = true; - test-pkgs = true; - callPackage = true; - mkDerivation = true; - overrideDerivation = true; - overrideScope = true; - - # Special case: lib/types.nix leaks into a lot of nixos-related - # derivations, and does not eval deeply. - type = true; - }; - # __attrsFailEvaluation is a temporary workaround to get top-level # eval to succeed (under builtins.tryEval) for the entire # packageset, without deep invasve changes into individual @@ -104,17 +47,11 @@ let # part of the (unfiltered) release jobset iff all of the following # are true: # - # 1. The first component of the attrpath is not in - # `excluded-toplevel-attrs` + # 1. The attrpath leads to a value for which lib.isDerivation is true # - # 2. No attrname in the attrpath belongs to the list of forbidden - # attrnames `excluded-attrnames-at-any-depth` + # 2. No proper prefix of the attrpath has __attrsFailEvaluation=true # - # 3. The attrpath leads to a value for which lib.isDerivation is true - # - # 4. No proper prefix of the attrpath has __attrsFailEvaluation=true - # - # 5. Any proper prefix of the attrpath at which lib.isDerivation + # 3. Any proper prefix of the attrpath at which lib.isDerivation # is true also has __recurseIntoDerivationForReleaseJobs=true. # # The last condition is unfortunately necessary because there are @@ -150,14 +87,9 @@ let lib.pipe value [ (builtins.mapAttrs ( name: value: - builtins.addErrorContext - "while evaluating package set attribute path '${lib.showAttrPath (path ++ [ name ])}'" - ( - if excluded-attrnames-at-any-depth.${name} or false then - [ ] - else - (justAttrNames (path ++ [ name ]) value) - ) + builtins.addErrorContext "while evaluating package set attribute path '${ + lib.showAttrPath (path ++ [ name ]) + }'" (justAttrNames (path ++ [ name ]) value) )) builtins.attrValues builtins.concatLists @@ -176,16 +108,12 @@ let in if !trace then result else lib.trace "** ${lib.concatStringsSep "." path}" result; - unfiltered = import ./release-outpaths.nix { + releaseOutpaths = import ./release-outpaths.nix { inherit checkMeta; attrNamesOnly = true; inherit path; }; - filtered = lib.pipe unfiltered [ - (pkgs: builtins.removeAttrs pkgs (builtins.attrNames excluded-toplevel-attrs)) - ]; - paths = [ # I am not entirely sure why these three packages end up in # the Hydra jobset. But they do, and they don't meet the @@ -202,7 +130,7 @@ let "pkgsMusl" "stdenv" ] - ] ++ justAttrNames [ ] filtered; + ] ++ justAttrNames [ ] releaseOutpaths; names = map (path: (lib.concatStringsSep "." path)) paths;