diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/expressions/builtins.xml | 29 | ||||
-rw-r--r-- | doc/manual/expressions/language-values.xml | 11 | ||||
-rw-r--r-- | doc/manual/hacking.xml | 4 | ||||
-rw-r--r-- | doc/manual/installation/prerequisites-source.xml | 2 |
4 files changed, 42 insertions, 4 deletions
diff --git a/doc/manual/expressions/builtins.xml b/doc/manual/expressions/builtins.xml index 9517f20106ef..063bc04be483 100644 --- a/doc/manual/expressions/builtins.xml +++ b/doc/manual/expressions/builtins.xml @@ -210,6 +210,35 @@ if builtins ? getEnv then builtins.getEnv "PATH" else ""</programlisting> </varlistentry> + <varlistentry><term><function>builtins.match</function> + <replaceable>regex</replaceable> <replaceable>str</replaceable></term> + + <listitem><para>Returns a list if + <replaceable>regex</replaceable> matches + <replaceable>str</replaceable> precisely, otherwise returns <literal>null</literal>. + Each item in the list is a regex group. + +<programlisting> +builtins.match "ab" "abc" +</programlisting> + +Evaluates to <literal>null</literal>. + +<programlisting> +builtins.match "abc" "abc" +</programlisting> + +Evaluates to <literal>[ ]</literal>. + +<programlisting> +builtins.match "a(b)(c)" "abc" +</programlisting> + +Evaluates to <literal>[ "b" "c" ]</literal>. + + + </para></listitem> + </varlistentry> <varlistentry><term><function>builtins.elem</function> <replaceable>x</replaceable> <replaceable>xs</replaceable></term> diff --git a/doc/manual/expressions/language-values.xml b/doc/manual/expressions/language-values.xml index b90baac5054c..67da688a4fc5 100644 --- a/doc/manual/expressions/language-values.xml +++ b/doc/manual/expressions/language-values.xml @@ -167,7 +167,16 @@ stdenv.mkDerivation { user's home directory. e.g. <filename>~/foo</filename> would be equivalent to <filename>/home/edolstra/foo</filename> for a user whose home directory is <filename>/home/edolstra</filename>. - </para></listitem> + </para> + + <para>Paths can also be specified between angle brackets, e.g. + <literal><nixpkgs></literal>. This means that the directories + listed in the environment variable + <envar linkend="env-NIX_PATH">NIX_PATH</envar> will be searched + for the given file or directory name. + </para> + + </listitem> <listitem><para><emphasis>Booleans</emphasis> with values <literal>true</literal> and diff --git a/doc/manual/hacking.xml b/doc/manual/hacking.xml index 11af0998f982..183aed7adff2 100644 --- a/doc/manual/hacking.xml +++ b/doc/manual/hacking.xml @@ -22,7 +22,7 @@ $ nix-build release.nix -A build.x86_64-linux environment variables are set up so that those dependencies can be found: <screen> -$ ./dev-shell +$ nix-shell </screen> To build Nix itself in this shell: <screen> @@ -30,7 +30,7 @@ To build Nix itself in this shell: [nix-shell]$ configurePhase [nix-shell]$ make </screen> -To test it: +To install it in <literal>$(pwd)/nix</literal> and test it: <screen> [nix-shell]$ make install [nix-shell]$ make installcheck diff --git a/doc/manual/installation/prerequisites-source.xml b/doc/manual/installation/prerequisites-source.xml index c0065f133700..cd6d61356ba1 100644 --- a/doc/manual/installation/prerequisites-source.xml +++ b/doc/manual/installation/prerequisites-source.xml @@ -34,7 +34,7 @@ or higher. If your distribution does not provide it, please install it from <link xlink:href="http://www.sqlite.org/" />.</para></listitem> - <listitem><para>The Perl DBI, DBD::SQLite, and WWW::Curl libraries, which are + <listitem><para>The Perl DBI and DBD::SQLite libraries, which are available from <link xlink:href="http://search.cpan.org/">CPAN</link> if your distribution does not provide them.</para></listitem> |