diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-14 17:05:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-14 17:05:47 +0200 |
commit | 9b9d5297baf02923a1e2879441bc1e25190d01cc (patch) | |
tree | cde8f4722537ad8638dbe604c23c7e115bc0fcb7 /doc | |
parent | d81f13f7cbb3989477d092b712877fb0835fd155 (diff) | |
parent | 96c158d6e1c6c3bed6451a3c6447d2b0bd0337ad (diff) |
Merge pull request #3909 from matthewbauer/readd-hashed-mirrors
Add hashed-mirrors back
Diffstat (limited to 'doc')
-rw-r--r-- | doc/manual/command-ref/conf-file.xml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/manual/command-ref/conf-file.xml b/doc/manual/command-ref/conf-file.xml index 9c55526a3..d0f1b09ca 100644 --- a/doc/manual/command-ref/conf-file.xml +++ b/doc/manual/command-ref/conf-file.xml @@ -370,6 +370,33 @@ false</literal>.</para> </varlistentry> + <varlistentry xml:id="conf-hashed-mirrors"><term><literal>hashed-mirrors</literal></term> + + <listitem><para>A list of web servers used by + <function>builtins.fetchurl</function> to obtain files by hash. + Given a hash type <replaceable>ht</replaceable> and a base-16 hash + <replaceable>h</replaceable>, Nix will try to download the file + from + <literal>hashed-mirror/<replaceable>ht</replaceable>/<replaceable>h</replaceable></literal>. + This allows files to be downloaded even if they have disappeared + from their original URI. For example, given the hashed mirror + <literal>http://tarballs.example.com/</literal>, when building the + derivation + +<programlisting> +builtins.fetchurl { + url = "https://example.org/foo-1.2.3.tar.xz"; + sha256 = "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"; +} +</programlisting> + + Nix will attempt to download this file from + <literal>http://tarballs.example.com/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae</literal> + first. If it is not available there, if will try the original URI.</para></listitem> + + </varlistentry> + + <varlistentry xml:id="conf-http-connections"><term><literal>http-connections</literal></term> <listitem><para>The maximum number of parallel TCP connections |