<nix/fetchurl.nix>: Don't access builtins.currentSystem

This doesn't work in pure evaluation mode.
This commit is contained in:
Eelco Dolstra 2018-01-16 19:07:27 +01:00
parent 75b9670df6
commit 6ddfe9a999
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ system ? builtins.currentSystem
{ system ? "" # obsolete
, url
, md5 ? "", sha1 ? "", sha256 ? "", sha512 ? ""
, outputHash ?
@ -17,7 +17,9 @@ derivation {
inherit outputHashAlgo outputHash;
outputHashMode = if unpack || executable then "recursive" else "flat";
inherit name system url executable unpack;
inherit name url executable unpack;
system = "builtin";
# No need to double the amount of network traffic
preferLocalBuild = true;