From 6ddfe9a999027f9867bbf61ae92c19c591c89a86 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Tue, 16 Jan 2018 19:07:27 +0100
Subject: [PATCH] <nix/fetchurl.nix>: Don't access builtins.currentSystem

This doesn't work in pure evaluation mode.
---
 corepkgs/fetchurl.nix | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/corepkgs/fetchurl.nix b/corepkgs/fetchurl.nix
index e135b947f..0ce1bab11 100644
--- a/corepkgs/fetchurl.nix
+++ b/corepkgs/fetchurl.nix
@@ -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;
-- 
GitLab