diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2020-03-01 11:05:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-01 11:05:34 +0100 |
commit | e38a01db5d8afe312d684e8c2ddbdb4e11d9307f (patch) | |
tree | 8e57912a3d467cbaab77fd558fdc7f71230734ab /lib/attrsets.nix | |
parent | 02ca096a85eced0d653004ae95f7cc6d8597b13e (diff) | |
parent | a96f37db10fb2892d0420a7ef51c5b157d9e58dd (diff) | |
download | nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar.gz nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar.bz2 nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar.lz nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar.xz nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.tar.zst nixpkgs-e38a01db5d8afe312d684e8c2ddbdb4e11d9307f.zip |
Merge pull request #68491 from roberth/fix-dontRecurseIntoAttrs
Fix dontRecurseIntoAttrs + add to lib + doc
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 32994432d53..72430522f7d 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; |