From 64c90e53e742a4edc65afa059639c9853696c2c3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 23 May 2018 01:24:16 -0400 Subject: [PATCH 1/2] darwin stdenv: Persist `darwin.binutils-unwrapped` binutils-unwrapped was added in ef3db7d14c90e1876d38ebc25428b4f65962ffbc and needs a corresponding `persisted` attr in the Darwin stdenv. --- pkgs/stdenv/darwin/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 9563f52ea263..24dc30692fa5 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -321,7 +321,7 @@ in rec { darwin = super.darwin // { inherit (darwin) dyld ICU Libsystem libiconv; } // lib.optionalAttrs (super.targetPlatform == localSystem) { - inherit (darwin) binutils cctools; + inherit (darwin) binutils binutils-unwrapped cctools; }; } // lib.optionalAttrs (super.targetPlatform == localSystem) { # Need to get rid of these when cross-compiling. From f567a851a15d31be2ce95856b93a9f71adfae601 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 23 May 2018 02:06:18 -0400 Subject: [PATCH 2/2] darwin stdenv: Properly compose overrides `super` usage was very suspect. --- pkgs/stdenv/darwin/default.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 24dc30692fa5..951c96877f96 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -294,7 +294,7 @@ in rec { extraPreHook = '' export PATH_LOCALE=${pkgs.darwin.locale}/share/locale ''; - overrides = self: super: (persistent self super) // { + overrides = lib.composeExtensions persistent (self: super: { # Hack to make sure we don't link ncurses in bootstrap tools. The proper # solution is to avoid passing -L/nix-store/...-bootstrap-tools/lib, # quite a sledgehammer just to get the C runtime. @@ -303,7 +303,7 @@ in rec { "--disable-curses" ]; }); - }; + }); }; stdenvDarwin = prevStage: let @@ -386,16 +386,15 @@ in rec { dyld Libsystem CF cctools ICU libiconv locale ]); - overrides = self: super: - let persistent' = persistent self super; in persistent' // { - clang = cc; - llvmPackages = persistent'.llvmPackages // { clang = cc; }; - inherit cc; + overrides = lib.composeExtensions persistent (self: super: { + clang = cc; + llvmPackages = super.llvmPackages // { clang = cc; }; + inherit cc; - darwin = super.darwin // { - xnu = super.darwin.xnu.override { python = super.python.override { configd = null; }; }; - }; + darwin = super.darwin // { + xnu = super.darwin.xnu.override { python = super.python.override { configd = null; }; }; }; + }); }; stagesDarwin = [