diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/command-ref/conf-file.xml | 18 | ||||
-rw-r--r-- | doc/manual/expressions/language-constructs.xml | 15 | ||||
-rw-r--r-- | doc/manual/expressions/language-operators.xml | 40 | ||||
-rw-r--r-- | doc/manual/expressions/language-values.xml | 14 | ||||
-rw-r--r-- | doc/manual/installation/prerequisites-source.xml | 4 | ||||
-rw-r--r-- | doc/manual/release-notes/rl-1.12.xml | 97 |
6 files changed, 131 insertions, 57 deletions
diff --git a/doc/manual/command-ref/conf-file.xml b/doc/manual/command-ref/conf-file.xml index 6b90083f0873..fb4d8cefc4d2 100644 --- a/doc/manual/command-ref/conf-file.xml +++ b/doc/manual/command-ref/conf-file.xml @@ -563,7 +563,8 @@ password <replaceable>my-password</replaceable> <para>If set to <literal>true</literal>, the Nix evaluator will not allow access to any files outside of the Nix search path (as set via the <envar>NIX_PATH</envar> environment variable or the - <option>-I</option> option). The default is + <option>-I</option> option), or to URIs outside of + <option>allowed-uri</option>. The default is <literal>false</literal>.</para> </listitem> @@ -571,6 +572,21 @@ password <replaceable>my-password</replaceable> </varlistentry> + <varlistentry xml:id="conf-allowed-uris"><term><literal>allowed-uris</literal></term> + + <listitem> + + <para>A list of URI prefixes to which access is allowed in + restricted evaluation mode. For example, when set to + <literal>https://github.com/NixOS</literal>, builtin functions + such as <function>fetchGit</function> are allowed to access + <literal>https://github.com/NixOS/patchelf.git</literal>.</para> + + </listitem> + + </varlistentry> + + <varlistentry xml:id="conf-pre-build-hook"><term><literal>pre-build-hook</literal></term> <listitem> diff --git a/doc/manual/expressions/language-constructs.xml b/doc/manual/expressions/language-constructs.xml index fe69dba837a1..2f0027d479cd 100644 --- a/doc/manual/expressions/language-constructs.xml +++ b/doc/manual/expressions/language-constructs.xml @@ -333,7 +333,20 @@ with (import ./definitions.nix); ...</programlisting> makes all attributes defined in the file <filename>definitions.nix</filename> available as if they were defined -locally in a <literal>rec</literal>-expression.</para> +locally in a <literal>let</literal>-expression.</para> + +<para>The bindings introduced by <literal>with</literal> do not shadow bindings +introduced by other means, e.g. + +<programlisting> +let a = 3; in with { a = 1; }; let a = 4; in with { a = 2; }; ...</programlisting> + +establishes the same scope as + +<programlisting> +let a = 1; in let a = 2; in let a = 3; in let a = 4; in ...</programlisting> + +</para> </simplesect> diff --git a/doc/manual/expressions/language-operators.xml b/doc/manual/expressions/language-operators.xml index a3323ced4c50..f1f75093461b 100644 --- a/doc/manual/expressions/language-operators.xml +++ b/doc/manual/expressions/language-operators.xml @@ -41,6 +41,11 @@ weakest binding).</para> argument <replaceable>e2</replaceable>.</entry> </row> <row> + <entry><literal>-</literal> <replaceable>e</replaceable></entry> + <entry>none</entry> + <entry>Arithmetic negation.</entry> + </row> + <row> <entry><replaceable>e</replaceable> <literal>?</literal> <replaceable>attrpath</replaceable></entry> <entry>none</entry> @@ -55,13 +60,24 @@ weakest binding).</para> <entry>List concatenation.</entry> </row> <row> - <entry><replaceable>e1</replaceable> <literal>+</literal> <replaceable>e2</replaceable></entry> + <entry> + <replaceable>e1</replaceable> <literal>*</literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal>/</literal> <replaceable>e2</replaceable> + </entry> <entry>left</entry> - <entry>String or path concatenation.</entry> + <entry>Arithmetic multiplication and division.</entry> </row> <row> - <entry><literal>!</literal> <replaceable>e</replaceable></entry> + <entry> + <replaceable>e1</replaceable> <literal>+</literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal>-</literal> <replaceable>e2</replaceable> + </entry> <entry>left</entry> + <entry>Arithmetic addition and subtraction. String or path concatenation (only by <literal>+</literal>).</entry> + </row> + <row> + <entry><literal>!</literal> <replaceable>e</replaceable></entry> + <entry>none</entry> <entry>Boolean negation.</entry> </row> <row> @@ -75,16 +91,22 @@ weakest binding).</para> attributes).</entry> </row> <row> - <entry><replaceable>e1</replaceable> <literal>==</literal> - <replaceable>e2</replaceable></entry> + <entry> + <replaceable>e1</replaceable> <literal><</literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal>></literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal><=</literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal>>=</literal> <replaceable>e2</replaceable> + </entry> <entry>none</entry> - <entry>Equality.</entry> + <entry>Arithmetic comparison.</entry> </row> <row> - <entry><replaceable>e1</replaceable> <literal>!=</literal> - <replaceable>e2</replaceable></entry> + <entry> + <replaceable>e1</replaceable> <literal>==</literal> <replaceable>e2</replaceable>, + <replaceable>e1</replaceable> <literal>!=</literal> <replaceable>e2</replaceable> + </entry> <entry>none</entry> - <entry>Inequality.</entry> + <entry>Equality and inequality.</entry> </row> <row> <entry><replaceable>e1</replaceable> <literal>&&</literal> diff --git a/doc/manual/expressions/language-values.xml b/doc/manual/expressions/language-values.xml index 67da688a4fc5..bb2090c881fd 100644 --- a/doc/manual/expressions/language-values.xml +++ b/doc/manual/expressions/language-values.xml @@ -98,13 +98,17 @@ configureFlags = " <para>Since <literal>${</literal> and <literal>''</literal> have special meaning in indented strings, you need a way to quote them. - <literal>${</literal> can be escaped by prefixing it with + <literal>$</literal> can be escaped by prefixing it with <literal>''</literal> (that is, two single quotes), i.e., - <literal>''${</literal>. <literal>''</literal> can be escaped by + <literal>''$</literal>. <literal>''</literal> can be escaped by prefixing it with <literal>'</literal>, i.e., - <literal>'''</literal>. Finally, linefeed, carriage-return and - tab characters can be written as <literal>''\n</literal>, - <literal>''\r</literal>, <literal>''\t</literal>.</para> + <literal>'''</literal>. <literal>$</literal> removes any special meaning + from the following <literal>$</literal>. Linefeed, carriage-return and tab + characters can be written as <literal>''\n</literal>, + <literal>''\r</literal>, <literal>''\t</literal>, and <literal>''\</literal> + escapes any other character. + + </para> <para>Indented strings are primarily useful in that they allow multi-line string literals to follow the indentation of the diff --git a/doc/manual/installation/prerequisites-source.xml b/doc/manual/installation/prerequisites-source.xml index 7311e4885e74..49660c36e397 100644 --- a/doc/manual/installation/prerequisites-source.xml +++ b/doc/manual/installation/prerequisites-source.xml @@ -10,14 +10,14 @@ <listitem><para>GNU Make.</para></listitem> - <listitem><para>A version of GCC or Clang that supports C++11.</para></listitem> + <listitem><para>A version of GCC or Clang that supports C++14.</para></listitem> <listitem><para><command>pkg-config</command> to locate dependencies. If your distribution does not provide it, you can get it from <link xlink:href="http://www.freedesktop.org/wiki/Software/pkg-config" />.</para></listitem> - + <listitem><para>The OpenSSL library to calculate cryptographic hashes. If your distribution does not provide it, you can get it from <link xlink:href="https://www.openssl.org"/>.</para></listitem> diff --git a/doc/manual/release-notes/rl-1.12.xml b/doc/manual/release-notes/rl-1.12.xml index e15296965308..7c9a8b75ecee 100644 --- a/doc/manual/release-notes/rl-1.12.xml +++ b/doc/manual/release-notes/rl-1.12.xml @@ -52,8 +52,7 @@ information about store paths.</para></listitem> <listitem><para><command>nix run</command> starts a shell in - which the specified packages are available. (TODO: currently - broken in chroot mode)</para></listitem> + which the specified packages are available.</para></listitem> <listitem><para><command>nix log</command> shows the build log of a package or path. If the build log is not available locally, @@ -74,6 +73,17 @@ name, package name or description. It caches available packages to speed up searches.</para></listitem> + <listitem><para><command>nix why-depends</command> (d41c5eb13f4f3a37d80dbc6d3888644170c3b44a).</para></listitem> + + <listitem><para><command>nix show-derivation</command> (e8d6ee7c1b90a2fe6d824f1a875acc56799ae6e2).</para></listitem> + + <listitem><para><command>nix add-to-store</command> (970366266b8df712f5f9cedb45af183ef5a8357f).</para></listitem> + + <listitem><para>Progress indicator.</para></listitem> + + <listitem><para>All options are available as flags now + (b8283773bd64d7da6859ed520ee19867742a03ba).</para></listitem> + </itemizedlist> </listitem> @@ -84,10 +94,6 @@ </listitem> <listitem> - <para>Nix now supports floating-point numbers.</para> - </listitem> - - <listitem> <para>New build mode <command>nix-build --hash</command> that builds a derivation, computes the hash of the output, and moves the output to the store path corresponding to what a fixed-output @@ -172,18 +178,13 @@ </listitem> <listitem> - <para>“Nested” log output was removed. As a result, - <command>nix-log2xml</command> was also removed.</para> - </listitem> - - <listitem> <para>When <option>--no-build-output</option> is given, the last 10 lines of the build log will be shown if a build fails.</para> </listitem> <listitem> - <para><function>builtins.fetchgit</function>. + <para><function>builtins.fetchGit</function>. (38539b943a060d9cdfc24d6e5d997c0885b8aa2f)</para> </listitem> @@ -195,10 +196,6 @@ </listitem> <listitem> - <para>Removed OpenSSL-based signing. (f435f8247553656774dd1b2c88e9de5d59cab203)</para> - </listitem> - - <listitem> <para><literal><nix/fetchurl.nix></literal> now uses the content-addressable tarball cache at <uri>http://tarballs.nixos.org/</uri>, just like @@ -226,8 +223,7 @@ <para><function>builtins.fetchurl</function> and <function>builtins.fetchTarball</function> now support <varname>sha256</varname> and <varname>name</varname> - attributes. Using these functions is now allowed in restricted - mode if a hash is supplied.</para> + attributes.</para> </listitem> <listitem> @@ -252,21 +248,11 @@ configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev" </listitem> <listitem> - <para>Added builtin function - <varname>builtins.partition</varname>.</para> - </listitem> - - <listitem> <para>Support for HTTP/2. This makes binary cache lookups much more efficient. (90ad02bf626b885a5dd8967894e2eafc953bdf92)</para> </listitem> <listitem> - <para>Caching of failed builds has been - removed. (8cffec84859cec8b610a2a22ab0c4d462a9351ff)</para> - </listitem> - - <listitem> <para>The <option>build-sandbox-paths</option> configuration option can now specify optional paths by appending a <literal>?</literal>, e.g. <literal>/dev/nvidiactl?</literal> will @@ -373,7 +359,7 @@ configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev" </listitem> <listitem> - <para><command>nix-shell</command> now used + <para><command>nix-shell</command> now uses <varname>bashInteractive</varname> from Nixpkgs, rather than the <command>bash</command> command that happens to be in the caller’s <envar>PATH</envar>. This is especially important on macOS where @@ -383,28 +369,61 @@ configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev" </listitem> <listitem> - <para><function>builtins.split</function>. - (b8867a0239b1930a16f9ef3f7f3e864b01416dff))</para> + <para>New builtin functions: <function>builtins.split</function> + (b8867a0239b1930a16f9ef3f7f3e864b01416dff), + <function>builtins.partition</function>.</para> </listitem> <listitem> - <para><filename>nix-mode.el</filename> has been removed from Nix. It is now a separate repository - in <uri>https://github.com/NixOS/nix-mode</uri> and can be installed through the MELPA - package repository.</para> + <para>Automatic garbage collection.</para> </listitem> <listitem> - <para>Automatic garbage collection.</para> + <para><command>nix-store -q --roots</command> and + <command>nix-store --gc --print-roots</command> now show temporary + and in-memory roots.</para> </listitem> <listitem> - <para><command>nix why-depends</command></para> + <para>Builders can now communicate what build phase they are in by + writing messages to the file descriptor specified in + <envar>NIX_LOG_FD</envar>. (88e6bb76de5564b3217be9688677d1c89101b2a3) + </para> </listitem> +</itemizedlist> + +<para>Some features were removed:</para> + +<itemizedlist> + <listitem> - <para><command>nix-store -q --roots</command> and - <command>nix-store --gc --print-roots</command> now show temporary - and in-memory roots.</para> + <para>“Nested” log output. As a result, + <command>nix-log2xml</command> was also removed.</para> + </listitem> + + <listitem> + <para>OpenSSL-based signing. (f435f8247553656774dd1b2c88e9de5d59cab203)</para> + </listitem> + + <listitem> + <para>Caching of failed + builds. (8cffec84859cec8b610a2a22ab0c4d462a9351ff)</para> + </listitem> + + <listitem> + <para><filename>nix-mode.el</filename> has been removed from + Nix. It is now a separate repository in + <uri>https://github.com/NixOS/nix-mode</uri> and can be installed + through the MELPA package repository.</para> + </listitem> + + <listitem> + <para>In restricted evaluation mode + (<option>--restrict-eval</option>), builtin functions that + download from the network (such as <function>fetchGit</function>) + are permitted to fetch underneath the list of URI prefixes + specified in the option <option>allowed-uris</option>.</para> </listitem> </itemizedlist> |