From c70ec3ec63dc0ee995ac16cd6699d20934911353 Mon Sep 17 00:00:00 2001 From: Jude Taylor Date: Thu, 15 Oct 2015 17:19:10 -0700 Subject: [PATCH] re-fix evaluation of libSystemClosure --- pkgs/stdenv/pure-darwin/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/stdenv/pure-darwin/default.nix b/pkgs/stdenv/pure-darwin/default.nix index 860d2e0b54b..5fbfb16a66e 100644 --- a/pkgs/stdenv/pure-darwin/default.nix +++ b/pkgs/stdenv/pure-darwin/default.nix @@ -6,8 +6,7 @@ let # libSystem and its transitive dependencies. Get used to this; it's a recurring theme in darwin land - libSystemClosure = if system == "x86_64-darwin" - then [ + libSystemClosure = [ "/usr/lib/libSystem.dylib" "/usr/lib/libSystem.B.dylib" "/usr/lib/libobjc.A.dylib" @@ -17,16 +16,18 @@ let "/usr/lib/libc++.1.dylib" "/usr/lib/libDiagnosticMessagesClient.dylib" "/usr/lib/system" - ] - else []; + ]; - fetch = { file, sha256 }: derivation ((import { + fetch = { file, sha256 }: let drv = import { url = "https://dl.dropboxusercontent.com/u/2857322/${file}"; inherit sha256; executable = true; - }).drvAttrs // { - __impureHostDeps = libSystemClosure; - }); + }; in + if drv.drvAttrs.system == "x86_64-darwin" + then derivation (drv.drvAttrs // { + __impureHostDeps = libSystemClosure; + }) + else drv; bootstrapFiles = { sh = fetch { file = "sh"; sha256 = "1qakpg37vl61jnkplz13m3g1csqr85cg8ybp6jwiv6apmg26isnm"; };