From fc64cf65abfd6f42910a639f7ffb996788a95797 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 11 Sep 2019 13:03:48 +0200 Subject: [PATCH] top-level: Fix dontRecurseIntoAttrs and include in lib dontRecurseIntoAttrs was a noop (x: x), causing the expression dontRecurseIntoAttrs (recurseIntoAttrs a) to have the wrong effect. --- lib/attrsets.nix | 5 +++++ lib/default.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 4b73735fd850..607a22393f8a 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 34c72a3512ee..88083214a31a 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 c50e8eaca23b..5fa010558ca5 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;