diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 4b73735fd85..607a22393f8 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -479,6 +479,11 @@ rec { recurseIntoAttrs = attrs: attrs // { recurseForDerivations = true; }; + /* Undo the effect of recurseIntoAttrs. + */ + dontRecurseIntoAttrs = + attrs: attrs // { recurseForDerivations = false; }; + /*** deprecated stuff ***/ zipWithNames = zipAttrsWithNames; diff --git a/lib/default.nix b/lib/default.nix index 34c72a3512e..88083214a31 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -71,7 +71,7 @@ let zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil recursiveUpdate matchAttrs overrideExisting getOutput getBin getLib getDev chooseDevOutputs zipWithNames zip - recurseIntoAttrs; + recurseIntoAttrs dontRecurseIntoAttrs; inherit (lists) singleton forEach foldr fold foldl foldl' imap0 imap1 concatMap flatten remove findSingle findFirst any all count optional optionals toList range partition zipListsWith zipLists diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c50e8eaca23..5fa010558ca 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -72,7 +72,7 @@ in # the Attrs which is useful for testing massive changes. Ideally, # every package subset not marked with recurseIntoAttrs should be # marked with this. - dontRecurseIntoAttrs = x: x; + inherit (lib) dontRecurseIntoAttrs; stringsWithDeps = lib.stringsWithDeps;