diff options
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index d76e361aedffd..7d84c25de77a1 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -473,6 +473,20 @@ rec { /* Pick the outputs of packages to place in buildInputs */ chooseDevOutputs = drvs: builtins.map getDev drvs; + /* Make various Nix tools consider the contents of the resulting + attribute set when looking for what to build, find, etc. + + This function only affects a single attribute set; it does not + apply itself recursively for nested attribute sets. + */ + recurseIntoAttrs = + attrs: attrs // { recurseForDerivations = true; }; + + /* Undo the effect of recurseIntoAttrs. + */ + dontRecurseIntoAttrs = + attrs: attrs // { recurseForDerivations = false; }; + /*** deprecated stuff ***/ zipWithNames = zipAttrsWithNames; |