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 /doc | |
parent | 02ca096a85eced0d653004ae95f7cc6d8597b13e (diff) | |
parent | a96f37db10fb2892d0420a7ef51c5b157d9e58dd (diff) |
Merge pull request #68491 from roberth/fix-dontRecurseIntoAttrs
Fix dontRecurseIntoAttrs + add to lib + doc
Diffstat (limited to 'doc')
-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 b1ea05a2381d9..3c5823c25891c 100644 --- a/doc/functions/library/attrsets.xml +++ b/doc/functions/library/attrsets.xml @@ -1667,4 +1667,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> |