diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-04 12:13:58 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-08-04 12:13:58 +0000 |
commit | 7f893b7a43fdca728fd1f7a72e51d31d2a6e7147 (patch) | |
tree | 16c0e1f63820e841d211c6280e42da181bc80566 /corepkgs | |
parent | 87ef5907e97f455bd4064f4d6e5f3c972402a8b9 (diff) |
* Allow derivations to hint that they should not be built remotely
using the build hook mechanism, by setting the derivation attribute
"preferLocalBuild" to true. This has a few use cases:
- The user environment builder. Since it just creates a bunch of
symlinks without much computation, there is no reason to do it
remotely. In fact, doing it remotely requires the entire closure
of the user environment to be copied to the remote machine, which
is extremely wasteful.
- `fetchurl'. Performing the download on a remote machine and then
copying it to the local machine involves twice as much network
traffic as performing the download locally, and doesn't save any
CPU cycles on the local machine.
Diffstat (limited to 'corepkgs')
-rw-r--r-- | corepkgs/buildenv/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/corepkgs/buildenv/default.nix b/corepkgs/buildenv/default.nix index 36dd9d0c6..d76f52740 100644 --- a/corepkgs/buildenv/default.nix +++ b/corepkgs/buildenv/default.nix @@ -11,4 +11,8 @@ derivation { paths = derivations; active = map (x: if x ? meta && x.meta ? active then x.meta.active else "true") derivations; priority = map (x: if x ? meta && x.meta ? priority then x.meta.priority else "5") derivations; + + # Building user environments remotely just causes huge amounts of + # network traffic, so don't do that. + preferLocalBuild = true; } |