diff options
author | Robert Hensing <robert@roberthensing.nl> | 2019-09-11 14:51:28 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2019-09-11 14:55:23 +0200 |
commit | a96f37db10fb2892d0420a7ef51c5b157d9e58dd (patch) | |
tree | 4217f8ffd0ea88de2146da62fc5b2392abf15232 /doc/functions/library | |
parent | fc64cf65abfd6f42910a639f7ffb996788a95797 (diff) |
Document attrsets.recurseIntoAttrs
Diffstat (limited to 'doc/functions/library')
-rw-r--r-- | doc/functions/library/attrsets.xml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml index 65d0b40e2e827..8fe2e324b3b22 100644 --- a/doc/functions/library/attrsets.xml +++ b/doc/functions/library/attrsets.xml @@ -1728,4 +1728,48 @@ recursiveUpdate ]]></programlisting> </example> </section> + + <section xml:id="function-library-lib.attrsets.recurseIntoAttrs"> + <title><function>lib.attrsets.recurseIntoAttrs</function></title> + + <subtitle><literal>recurseIntoAttrs :: AttrSet -> AttrSet</literal> + </subtitle> + + <xi:include href="./locations.xml" xpointer="lib.attrsets.recurseIntoAttrs" /> + + <para> + Make various Nix tools consider the contents of the resulting + attribute set when looking for what to build, find, etc. + </para> + + <para> + This function only affects a single attribute set; it does not apply itself recursively for nested attribute sets. + </para> + + <variablelist> + <varlistentry> + <term> + <varname>attrs</varname> + </term> + <listitem> + <para> + An attribute set to scan for derivations. + </para> + </listitem> + </varlistentry> + </variablelist> + + <example xml:id="function-library-lib.attrsets.recurseIntoAttrs-example"> + <title>Making Nix look inside an attribute set</title> +<programlisting><![CDATA[ +{ pkgs ? import <nixpkgs> {} }: +{ + myTools = pkgs.lib.recurseIntoAttrs { + inherit (pkgs) hello figlet; + }; +} +]]></programlisting> + </example> + </section> + </section> |