From 8935bfb4ac3680e38a8811c12282e2026f7e82ae Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 11 Sep 2019 12:57:38 +0200 Subject: 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. --- lib/attrsets.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/attrsets.nix') 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; -- cgit 1.4.1