diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-23 02:06:18 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-05-23 09:59:29 -0400 |
commit | f567a851a15d31be2ce95856b93a9f71adfae601 (patch) | |
tree | 4e9887a7144501eb31130862e13ff9c28096c8cb /pkgs/stdenv/darwin | |
parent | e3f35d14914820d27617bb1c34affe8ce2a0eae0 (diff) | |
download | nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar.gz nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar.bz2 nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar.lz nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar.xz nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.tar.zst nixpkgs-f567a851a15d31be2ce95856b93a9f71adfae601.zip |
darwin stdenv: Properly compose overrides
`super` usage was very suspect.
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 24dc30692fa..951c96877f9 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 = [ |