2018-12-31 07:10:28 +00:00
<section xmlns= "http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/xinclude"
xml:id="sec-prefer-remote-fetch">
<title > prefer-remote-fetch overlay</title>
<para >
2019-09-18 20:12:54 +00:00
<function > prefer-remote-fetch</function> is an overlay that download sources on remote builder. This is useful when the evaluating machine has a slow upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay:
2019-03-09 05:07:11 +00:00
<programlisting >
2019-06-17 10:17:16 +00:00
self: super:
(super.prefer-remote-fetch self super)
</programlisting>
2019-09-18 20:12:54 +00:00
A full configuration example for that sets the overlay up for your own account, could look like this
2019-06-17 10:17:16 +00:00
<screen >
<prompt > $ </prompt> mkdir ~/.config/nixpkgs/overlays/
<prompt > $ </prompt> cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix < < EOF
self: super: super.prefer-remote-fetch self super
EOF
</screen>
2018-12-31 07:10:28 +00:00
</para>
</section>