diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile | 4 | ||||
-rw-r--r-- | doc/functions/library/attrsets.xml | 44 |
2 files changed, 46 insertions, 2 deletions
diff --git a/doc/Makefile b/doc/Makefile index e7ca31b20d71..cdef493502bf 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -87,7 +87,7 @@ functions/library/generated: doc-support/result ln -rfs ./doc-support/result/function-docs functions/library/generated %.section.xml: %.section.md - pandoc $^ -w docbook+smart \ + pandoc $^ -w docbook \ -f markdown+smart \ | sed -e 's|<ulink url=|<link xlink:href=|' \ -e 's|</ulink>|</link>|' \ @@ -98,7 +98,7 @@ functions/library/generated: doc-support/result | cat > $@ %.chapter.xml: %.chapter.md - pandoc $^ -w docbook+smart \ + pandoc $^ -w docbook \ --top-level-division=chapter \ -f markdown+smart \ | sed -e 's|<ulink url=|<link xlink:href=|' \ diff --git a/doc/functions/library/attrsets.xml b/doc/functions/library/attrsets.xml index b1ea05a2381d..3c5823c25891 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> |