Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain fetchTarball timeout behavior in the doc #2164

Merged
merged 1 commit into from May 30, 2018

Conversation

mickours
Copy link
Contributor

Just add some doc on the timeout mechanism of the fetchTarball builtins (because I only find this information on the IRC :))

<para>The fetched tarball is chached for a certain amount of time
(1 hour by default) in <literal>~/.cache/nix/tarballs/</literal>.
You can change the cache timeout either in command line with
<literal>--option tarball-ttl <number of seconds></literal> or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<number of seconds> is not valid XML. You should do something like <replaceable>ttl</replaceable>.

Note that when obtaining the hash with <varname>nix-prefetch-url
<para>The fetched tarball is chached for a certain amount of time
(1 hour by default) in <literal>~/.cache/nix/tarballs/</literal>.
You can change the cache timeout either in command line with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in -> on the.

You can change the cache timeout either in command line with
<literal>--option tarball-ttl <number of seconds></literal> or
in the Nix configuration file with tarball-ttl
<literal><number of seconds to cache></literal>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Period missing.

Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally chached will be fixed to cached. If you feel especially interested, the tags could be made a bit more semantically correct.

@@ -280,8 +280,15 @@ with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixo

stdenv.mkDerivation { … }
</programlisting>

Note that when obtaining the hash with <varname>nix-prefetch-url
<para>The fetched tarball is chached for a certain amount of time
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chached -> cached


Note that when obtaining the hash with <varname>nix-prefetch-url
<para>The fetched tarball is chached for a certain amount of time
(1 hour by default) in <literal>~/.cache/nix/tarballs/</literal>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(a nit, you don't have to change this:) <literal> could be <filename>.

<para>The fetched tarball is chached for a certain amount of time
(1 hour by default) in <literal>~/.cache/nix/tarballs/</literal>.
You can change the cache timeout either on the command line with
<literal>--option tarball-ttl <replaceable>number of seconds</replaceable></literal> or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(a nit, you don't have to change this:) <literal> could be <option>, same with the following <literal>.

@mickours
Copy link
Contributor Author

Done! Thanks for the review :)

@@ -280,8 +280,15 @@ with import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixo

stdenv.mkDerivation { … }
</programlisting>
<para>The fetched tarball is cached for a certain amount of time
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, one more thing: there also needs to be a </para> before this opening <para>.

@grahamc
Copy link
Member

grahamc commented May 30, 2018

There was one minor problem left, where you committed <\para> instead of </para>. I went ahead and fixed that and squashed it in to one commit. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants