Merge pull request #2464 from Profpatsch/docs-builtins-add-ids
manual: add XML IDs to all builtin list entries
This commit is contained in:
commit
d93db0ace0
|
@ -21,7 +21,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
<variablelist>
|
||||
|
||||
|
||||
<varlistentry><term><function>abort</function> <replaceable>s</replaceable></term>
|
||||
<varlistentry xml:id='builtin-abort'>
|
||||
<term><function>abort</function> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Abort Nix expression evaluation, print error
|
||||
message <replaceable>s</replaceable>.</para></listitem>
|
||||
|
@ -29,8 +30,10 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.add</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
<varlistentry xml:id='builtin-add'>
|
||||
<term><function>builtins.add</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable>
|
||||
</term>
|
||||
|
||||
<listitem><para>Return the sum of the numbers
|
||||
<replaceable>e1</replaceable> and
|
||||
|
@ -39,7 +42,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.all</function>
|
||||
<varlistentry xml:id='builtin-all'>
|
||||
<term><function>builtins.all</function>
|
||||
<replaceable>pred</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if the function
|
||||
|
@ -50,7 +54,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.any</function>
|
||||
<varlistentry xml:id='builtin-any'>
|
||||
<term><function>builtins.any</function>
|
||||
<replaceable>pred</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if the function
|
||||
|
@ -61,7 +66,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.attrNames</function>
|
||||
<varlistentry xml:id='builtin-attrNames'>
|
||||
<term><function>builtins.attrNames</function>
|
||||
<replaceable>set</replaceable></term>
|
||||
|
||||
<listitem><para>Return the names of the attributes in the set
|
||||
|
@ -72,7 +78,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.attrValues</function>
|
||||
<varlistentry xml:id='builtin-attrValues'>
|
||||
<term><function>builtins.attrValues</function>
|
||||
<replaceable>set</replaceable></term>
|
||||
|
||||
<listitem><para>Return the values of the attributes in the set
|
||||
|
@ -82,7 +89,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>baseNameOf</function> <replaceable>s</replaceable></term>
|
||||
<varlistentry xml:id='builtin-baseNameOf'>
|
||||
<term><function>baseNameOf</function> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Return the <emphasis>base name</emphasis> of the
|
||||
string <replaceable>s</replaceable>, that is, everything following
|
||||
|
@ -92,7 +100,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.bitAnd</function>
|
||||
<varlistentry xml:id='builtin-bitAnd'>
|
||||
<term><function>builtins.bitAnd</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the bitwise AND of the integers
|
||||
|
@ -102,7 +111,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.bitOr</function>
|
||||
<varlistentry xml:id='builtin-bitOr'>
|
||||
<term><function>builtins.bitOr</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the bitwise OR of the integers
|
||||
|
@ -112,7 +122,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.bitXor</function>
|
||||
<varlistentry xml:id='builtin-bitXor'>
|
||||
<term><function>builtins.bitXor</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the bitwise XOR of the integers
|
||||
|
@ -122,7 +133,8 @@ available as <function>builtins.derivation</function>.</para>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><varname>builtins</varname></term>
|
||||
<varlistentry xml:id='builtin-builtins'>
|
||||
<term><varname>builtins</varname></term>
|
||||
|
||||
<listitem><para>The set <varname>builtins</varname> contains all
|
||||
the built-in functions and values. You can use
|
||||
|
@ -139,7 +151,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.compareVersions</function>
|
||||
<varlistentry xml:id='builtin-compareVersions'>
|
||||
<term><function>builtins.compareVersions</function>
|
||||
<replaceable>s1</replaceable> <replaceable>s2</replaceable></term>
|
||||
|
||||
<listitem><para>Compare two strings representing versions and
|
||||
|
@ -156,7 +169,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.splitVersion</function>
|
||||
<varlistentry xml:id='builtin-splitVersion'>
|
||||
<term><function>builtins.splitVersion</function>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Split a string representing a version into its
|
||||
|
@ -167,7 +181,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.concatLists</function>
|
||||
<varlistentry xml:id='builtin-concatLists'>
|
||||
<term><function>builtins.concatLists</function>
|
||||
<replaceable>lists</replaceable></term>
|
||||
|
||||
<listitem><para>Concatenate a list of lists into a single
|
||||
|
@ -175,7 +190,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.concatStringsSep</function>
|
||||
<varlistentry xml:id='builtin-concatStringsSep'>
|
||||
<term><function>builtins.concatStringsSep</function>
|
||||
<replaceable>separator</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Concatenate a list of strings with a separator
|
||||
|
@ -184,8 +200,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry
|
||||
xml:id='builtin-currentSystem'><term><varname>builtins.currentSystem</varname></term>
|
||||
<varlistentry xml:id='builtin-currentSystem'>
|
||||
<term><varname>builtins.currentSystem</varname></term>
|
||||
|
||||
<listitem><para>The built-in value <varname>currentSystem</varname>
|
||||
evaluates to the Nix platform identifier for the Nix installation
|
||||
|
@ -218,7 +234,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
-->
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.deepSeq</function>
|
||||
<varlistentry xml:id='builtin-deepSeq'>
|
||||
<term><function>builtins.deepSeq</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>This is like <literal>seq
|
||||
|
@ -231,7 +248,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>derivation</function>
|
||||
<varlistentry xml:id='builtin-derivation'>
|
||||
<term><function>derivation</function>
|
||||
<replaceable>attrs</replaceable></term>
|
||||
|
||||
<listitem><para><function>derivation</function> is described in
|
||||
|
@ -240,7 +258,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>dirOf</function> <replaceable>s</replaceable></term>
|
||||
<varlistentry xml:id='builtin-dirOf'>
|
||||
<term><function>dirOf</function> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Return the directory part of the string
|
||||
<replaceable>s</replaceable>, that is, everything before the final
|
||||
|
@ -250,7 +269,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.div</function>
|
||||
<varlistentry xml:id='builtin-div'>
|
||||
<term><function>builtins.div</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the quotient of the numbers
|
||||
|
@ -259,7 +279,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.elem</function>
|
||||
<varlistentry xml:id='builtin-elem'>
|
||||
<term><function>builtins.elem</function>
|
||||
<replaceable>x</replaceable> <replaceable>xs</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if a value equal to
|
||||
|
@ -270,7 +291,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.elemAt</function>
|
||||
<varlistentry xml:id='builtin-elemAt'>
|
||||
<term><function>builtins.elemAt</function>
|
||||
<replaceable>xs</replaceable> <replaceable>n</replaceable></term>
|
||||
|
||||
<listitem><para>Return element <replaceable>n</replaceable> from
|
||||
|
@ -281,7 +303,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.fetchurl</function>
|
||||
<varlistentry xml:id='builtin-fetchurl'>
|
||||
<term><function>builtins.fetchurl</function>
|
||||
<replaceable>url</replaceable></term>
|
||||
|
||||
<listitem><para>Download the specified URL and return the path of
|
||||
|
@ -292,7 +315,8 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>fetchTarball</function>
|
||||
<varlistentry xml:id='builtin-fetchTarball'>
|
||||
<term><function>fetchTarball</function>
|
||||
<replaceable>url</replaceable></term>
|
||||
|
||||
<listitem><para>Download the specified URL, unpack it and return
|
||||
|
@ -346,7 +370,7 @@ stdenv.mkDerivation { … }
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<varlistentry xml:id='builtin-fetchGit'>
|
||||
<term>
|
||||
<function>builtins.fetchGit</function>
|
||||
<replaceable>args</replaceable>
|
||||
|
@ -546,7 +570,8 @@ stdenv.mkDerivation {
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.foldl’</function>
|
||||
<varlistentry xml:id='builtin-foldl-prime'>
|
||||
<term><function>builtins.foldl’</function>
|
||||
<replaceable>op</replaceable> <replaceable>nul</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Reduce a list by applying a binary operator, from
|
||||
|
@ -559,7 +584,8 @@ stdenv.mkDerivation {
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.functionArgs</function>
|
||||
<varlistentry xml:id='builtin-functionArgs'>
|
||||
<term><function>builtins.functionArgs</function>
|
||||
<replaceable>f</replaceable></term>
|
||||
|
||||
<listitem><para>
|
||||
|
@ -577,7 +603,8 @@ stdenv.mkDerivation {
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.fromJSON</function> <replaceable>e</replaceable></term>
|
||||
<varlistentry xml:id='builtin-fromJSON'>
|
||||
<term><function>builtins.fromJSON</function> <replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Convert a JSON string to a Nix
|
||||
value. For example,
|
||||
|
@ -592,7 +619,8 @@ builtins.fromJSON ''{"x": [1, 2, 3], "y": null}''
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.genList</function>
|
||||
<varlistentry xml:id='builtin-genList'>
|
||||
<term><function>builtins.genList</function>
|
||||
<replaceable>generator</replaceable> <replaceable>length</replaceable></term>
|
||||
|
||||
<listitem><para>Generate list of size
|
||||
|
@ -610,7 +638,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.getAttr</function>
|
||||
<varlistentry xml:id='builtin-getAttr'>
|
||||
<term><function>builtins.getAttr</function>
|
||||
<replaceable>s</replaceable> <replaceable>set</replaceable></term>
|
||||
|
||||
<listitem><para><function>getAttr</function> returns the attribute
|
||||
|
@ -623,7 +652,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.getEnv</function>
|
||||
<varlistentry xml:id='builtin-getEnv'>
|
||||
<term><function>builtins.getEnv</function>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para><function>getEnv</function> returns the value of
|
||||
|
@ -641,7 +671,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.hasAttr</function>
|
||||
<varlistentry xml:id='builtin-hasAttr'>
|
||||
<term><function>builtins.hasAttr</function>
|
||||
<replaceable>s</replaceable> <replaceable>set</replaceable></term>
|
||||
|
||||
<listitem><para><function>hasAttr</function> returns
|
||||
|
@ -655,7 +686,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.hashString</function>
|
||||
<varlistentry xml:id='builtin-hashString'>
|
||||
<term><function>builtins.hashString</function>
|
||||
<replaceable>type</replaceable> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Return a base-16 representation of the
|
||||
|
@ -667,7 +699,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.head</function>
|
||||
<varlistentry xml:id='builtin-head'>
|
||||
<term><function>builtins.head</function>
|
||||
<replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Return the first element of a list; abort
|
||||
|
@ -678,7 +711,8 @@ builtins.genList (x: x * x) 5
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>import</function>
|
||||
<varlistentry xml:id='builtin-import'>
|
||||
<term><function>import</function>
|
||||
<replaceable>path</replaceable></term>
|
||||
|
||||
<listitem><para>Load, parse and return the Nix expression in the
|
||||
|
@ -733,7 +767,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.intersectAttrs</function>
|
||||
<varlistentry xml:id='builtin-intersectAttrs'>
|
||||
<term><function>builtins.intersectAttrs</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return a set consisting of the attributes in the
|
||||
|
@ -743,7 +778,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isAttrs</function>
|
||||
<varlistentry xml:id='builtin-isAttrs'>
|
||||
<term><function>builtins.isAttrs</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -753,7 +789,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isList</function>
|
||||
<varlistentry xml:id='builtin-isList'>
|
||||
<term><function>builtins.isList</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -763,7 +800,7 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isFunction</function>
|
||||
<varlistentry xml:id='builtin-isFunction'><term><function>builtins.isFunction</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -773,7 +810,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isString</function>
|
||||
<varlistentry xml:id='builtin-isString'>
|
||||
<term><function>builtins.isString</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -783,7 +821,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isInt</function>
|
||||
<varlistentry xml:id='builtin-isInt'>
|
||||
<term><function>builtins.isInt</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -793,7 +832,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isFloat</function>
|
||||
<varlistentry xml:id='builtin-isFloat'>
|
||||
<term><function>builtins.isFloat</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -803,7 +843,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.isBool</function>
|
||||
<varlistentry xml:id='builtin-isBool'>
|
||||
<term><function>builtins.isBool</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -813,7 +854,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>isNull</function>
|
||||
<varlistentry xml:id='builtin-isNull'>
|
||||
<term><function>isNull</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if
|
||||
|
@ -828,7 +870,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.length</function>
|
||||
<varlistentry xml:id='builtin-length'>
|
||||
<term><function>builtins.length</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return the length of the list
|
||||
|
@ -837,7 +880,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.lessThan</function>
|
||||
<varlistentry xml:id='builtin-lessThan'>
|
||||
<term><function>builtins.lessThan</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if the number
|
||||
|
@ -850,7 +894,8 @@ x: x + 456</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.listToAttrs</function>
|
||||
<varlistentry xml:id='builtin-listToAttrs'>
|
||||
<term><function>builtins.listToAttrs</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Construct a set from a list specifying the names
|
||||
|
@ -877,7 +922,8 @@ builtins.listToAttrs
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>map</function>
|
||||
<varlistentry xml:id='builtin-map'>
|
||||
<term><function>map</function>
|
||||
<replaceable>f</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Apply the function <replaceable>f</replaceable> to
|
||||
|
@ -893,7 +939,8 @@ map (x: "foo" + x) [ "bar" "bla" "abc" ]</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.match</function>
|
||||
<varlistentry xml:id='builtin-match'>
|
||||
<term><function>builtins.match</function>
|
||||
<replaceable>regex</replaceable> <replaceable>str</replaceable></term>
|
||||
|
||||
<listitem><para>Returns a list if the <link
|
||||
|
@ -929,7 +976,8 @@ Evaluates to <literal>[ "foo" ]</literal>.
|
|||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.mul</function>
|
||||
<varlistentry xml:id='builtin-mul'>
|
||||
<term><function>builtins.mul</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the product of the numbers
|
||||
|
@ -939,7 +987,8 @@ Evaluates to <literal>[ "foo" ]</literal>.
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.parseDrvName</function>
|
||||
<varlistentry xml:id='builtin-parseDrvName'>
|
||||
<term><function>builtins.parseDrvName</function>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Split the string <replaceable>s</replaceable> into
|
||||
|
@ -953,7 +1002,7 @@ Evaluates to <literal>[ "foo" ]</literal>.
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<varlistentry xml:id='builtin-path'>
|
||||
<term>
|
||||
<function>builtins.path</function>
|
||||
<replaceable>args</replaceable>
|
||||
|
@ -1023,7 +1072,8 @@ Evaluates to <literal>[ "foo" ]</literal>.
|
|||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.pathExists</function>
|
||||
<varlistentry xml:id='builtin-pathExists'>
|
||||
<term><function>builtins.pathExists</function>
|
||||
<replaceable>path</replaceable></term>
|
||||
|
||||
<listitem><para>Return <literal>true</literal> if the path
|
||||
|
@ -1047,7 +1097,8 @@ in config.someSetting</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.readDir</function>
|
||||
<varlistentry xml:id='builtin-readDir'>
|
||||
<term><function>builtins.readDir</function>
|
||||
<replaceable>path</replaceable></term>
|
||||
|
||||
<listitem><para>Return the contents of the directory
|
||||
|
@ -1069,7 +1120,8 @@ in config.someSetting</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.readFile</function>
|
||||
<varlistentry xml:id='builtin-readFile'>
|
||||
<term><function>builtins.readFile</function>
|
||||
<replaceable>path</replaceable></term>
|
||||
|
||||
<listitem><para>Return the contents of the file
|
||||
|
@ -1078,7 +1130,8 @@ in config.someSetting</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>removeAttrs</function>
|
||||
<varlistentry xml:id='builtin-removeAttrs'>
|
||||
<term><function>removeAttrs</function>
|
||||
<replaceable>set</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Remove the attributes listed in
|
||||
|
@ -1094,7 +1147,8 @@ removeAttrs { x = 1; y = 2; z = 3; } [ "a" "x" "z" ]</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.replaceStrings</function>
|
||||
<varlistentry xml:id='builtin-replaceStrings'>
|
||||
<term><function>builtins.replaceStrings</function>
|
||||
<replaceable>from</replaceable> <replaceable>to</replaceable> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Given string <replaceable>s</replaceable>, replace
|
||||
|
@ -1111,7 +1165,8 @@ builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.seq</function>
|
||||
<varlistentry xml:id='builtin-seq'>
|
||||
<term><function>builtins.seq</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Evaluate <replaceable>e1</replaceable>, then
|
||||
|
@ -1122,7 +1177,8 @@ builtins.replaceStrings ["oo" "a"] ["a" "i"] "foobar"
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.sort</function>
|
||||
<varlistentry xml:id='builtin-sort'>
|
||||
<term><function>builtins.sort</function>
|
||||
<replaceable>comparator</replaceable> <replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Return <replaceable>list</replaceable> in sorted
|
||||
|
@ -1145,7 +1201,8 @@ builtins.sort builtins.lessThan [ 483 249 526 147 42 77 ]
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.split</function>
|
||||
<varlistentry xml:id='builtin-split'>
|
||||
<term><function>builtins.split</function>
|
||||
<replaceable>regex</replaceable> <replaceable>str</replaceable></term>
|
||||
|
||||
<listitem><para>Returns a list composed of non matched strings interleaved
|
||||
|
@ -1182,7 +1239,8 @@ Evaluates to <literal>[ " " [ "FOO" ] " " ]</literal>.
|
|||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.stringLength</function>
|
||||
<varlistentry xml:id='builtin-stringLength'>
|
||||
<term><function>builtins.stringLength</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return the length of the string
|
||||
|
@ -1192,7 +1250,8 @@ Evaluates to <literal>[ " " [ "FOO" ] " " ]</literal>.
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.sub</function>
|
||||
<varlistentry xml:id='builtin-sub'>
|
||||
<term><function>builtins.sub</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Return the difference between the numbers
|
||||
|
@ -1202,7 +1261,8 @@ Evaluates to <literal>[ " " [ "FOO" ] " " ]</literal>.
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.substring</function>
|
||||
<varlistentry xml:id='builtin-substring'>
|
||||
<term><function>builtins.substring</function>
|
||||
<replaceable>start</replaceable> <replaceable>len</replaceable>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
|
@ -1227,7 +1287,8 @@ builtins.substring 0 3 "nixos"
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.tail</function>
|
||||
<varlistentry xml:id='builtin-tail'>
|
||||
<term><function>builtins.tail</function>
|
||||
<replaceable>list</replaceable></term>
|
||||
|
||||
<listitem><para>Return the second to last elements of a list;
|
||||
|
@ -1237,7 +1298,8 @@ builtins.substring 0 3 "nixos"
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>throw</function>
|
||||
<varlistentry xml:id='builtin-throw'>
|
||||
<term><function>throw</function>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Throw an error message
|
||||
|
@ -1251,9 +1313,10 @@ builtins.substring 0 3 "nixos"
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry
|
||||
xml:id='builtin-toFile'><term><function>builtins.toFile</function>
|
||||
<replaceable>name</replaceable> <replaceable>s</replaceable></term>
|
||||
<varlistentry xml:id='builtin-toFile'>
|
||||
<term><function>builtins.toFile</function>
|
||||
<replaceable>name</replaceable>
|
||||
<replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Store the string <replaceable>s</replaceable> in a
|
||||
file in the Nix store and return its path. The file has suffix
|
||||
|
@ -1329,7 +1392,8 @@ in foo</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.toJSON</function> <replaceable>e</replaceable></term>
|
||||
<varlistentry xml:id='builtin-toJSON'>
|
||||
<term><function>builtins.toJSON</function> <replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return a string containing a JSON representation
|
||||
of <replaceable>e</replaceable>. Strings, integers, floats, booleans,
|
||||
|
@ -1342,7 +1406,8 @@ in foo</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.toPath</function> <replaceable>s</replaceable></term>
|
||||
<varlistentry xml:id='builtin-toPath'>
|
||||
<term><function>builtins.toPath</function> <replaceable>s</replaceable></term>
|
||||
|
||||
<listitem><para>Convert the string value
|
||||
<replaceable>s</replaceable> into a path value. The string
|
||||
|
@ -1355,7 +1420,8 @@ in foo</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>toString</function> <replaceable>e</replaceable></term>
|
||||
<varlistentry xml:id='builtin-toString'>
|
||||
<term><function>toString</function> <replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Convert the expression
|
||||
<replaceable>e</replaceable> to a string.
|
||||
|
@ -1374,7 +1440,8 @@ in foo</programlisting>
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry xml:id='builtin-toXML'><term><function>builtins.toXML</function> <replaceable>e</replaceable></term>
|
||||
<varlistentry xml:id='builtin-toXML'>
|
||||
<term><function>builtins.toXML</function> <replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return a string containing an XML representation
|
||||
of <replaceable>e</replaceable>. The main application for
|
||||
|
@ -1489,7 +1556,8 @@ stdenv.mkDerivation (rec {
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.trace</function>
|
||||
<varlistentry xml:id='builtin-trace'>
|
||||
<term><function>builtins.trace</function>
|
||||
<replaceable>e1</replaceable> <replaceable>e2</replaceable></term>
|
||||
|
||||
<listitem><para>Evaluate <replaceable>e1</replaceable> and print its
|
||||
|
@ -1499,7 +1567,8 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><function>builtins.tryEval</function>
|
||||
<varlistentry xml:id='builtin-tryEval'>
|
||||
<term><function>builtins.tryEval</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Try to evaluate <replaceable>e</replaceable>.
|
||||
|
@ -1513,7 +1582,8 @@ stdenv.mkDerivation (rec {
|
|||
</varlistentry>
|
||||
|
||||
|
||||
<varlistentry><term><function>builtins.typeOf</function>
|
||||
<varlistentry xml:id='builtin-typeOf'>
|
||||
<term><function>builtins.typeOf</function>
|
||||
<replaceable>e</replaceable></term>
|
||||
|
||||
<listitem><para>Return a string representing the type of the value
|
||||
|
|
Loading…
Reference in a new issue