diff options
author | Robert Hensing <robert@roberthensing.nl> | 2019-09-11 12:57:38 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2019-09-11 13:12:06 +0200 |
commit | 8935bfb4ac3680e38a8811c12282e2026f7e82ae (patch) | |
tree | 12644c0cbf2d2868ce2595373e69294315f39915 /lib/attrsets.nix | |
parent | 0d71e6910131e5bf331c2c43967c87ab5ffccf0a (diff) | |
download | nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar.gz nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar.bz2 nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar.lz nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar.xz nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.tar.zst nixpkgs-8935bfb4ac3680e38a8811c12282e2026f7e82ae.zip |
lib: Add recurseIntoAttrs
This makes the function available without having to evaluate the Nixpkgs fix-point, making it available in a more natural way for code that deals with multiple Nixpkgs invocations. Its definition is coupled to Nix rather than Nixpkgs, so it will feel right at home in lib.
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index d374d229f59..4b73735fd85 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -473,6 +473,12 @@ 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. + */ + recurseIntoAttrs = + attrs: attrs // { recurseForDerivations = true; }; + /*** deprecated stuff ***/ zipWithNames = zipAttrsWithNames; |