Merge pull request #2164 from mickours/doc-fetchTarball-timout

Explain fetchTarball timeout behavior in the doc
This commit is contained in:
Graham Christensen 2018-05-30 08:04:26 -04:00 committed by GitHub
commit f9940f47b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -310,8 +310,17 @@ with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixo
stdenv.mkDerivation { … } stdenv.mkDerivation { … }
</programlisting> </programlisting>
</para>
Note that when obtaining the hash with <varname>nix-prefetch-url <para>The fetched tarball is cached for a certain amount of time
(1 hour by default) in <filename>~/.cache/nix/tarballs/</filename>.
You can change the cache timeout either on the command line with
<option>--option tarball-ttl <replaceable>number of seconds</replaceable></option> or
in the Nix configuration file with this option:
<literal>tarball-ttl <replaceable>number of seconds to cache</replaceable></literal>.
</para>
<para>Note that when obtaining the hash with <varname>nix-prefetch-url
</varname> the option <varname>--unpack</varname> is required. </varname> the option <varname>--unpack</varname> is required.
</para> </para>