From be399bf24502b58c99fa524ff41f702ac8a8832d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 9 Aug 2014 23:31:00 +0200 Subject: [PATCH] Hack to fix llvm/clang build on Darwin (Or at least restore it to the same level as brokenness as before the staging merge. I.e. it depends on gcc-apple, which doesn't build on standard 10.9 systems.) --- .../compilers/gcc/4.2-apple64/default.nix | 2 +- pkgs/top-level/all-packages.nix | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.2-apple64/default.nix b/pkgs/development/compilers/gcc/4.2-apple64/default.nix index f5496cb5ef7b..b2444ebb9bff 100644 --- a/pkgs/development/compilers/gcc/4.2-apple64/default.nix +++ b/pkgs/development/compilers/gcc/4.2-apple64/default.nix @@ -45,5 +45,5 @@ stdenv.mkDerivation rec { buildInputs = stdenv.lib.optionals langF77 [ gmp mpfr bison flex ]; - meta.broken = true; + #meta.broken = true; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7f4e2700768..7a87d20ed986 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -231,6 +231,8 @@ let else defaultStdenv; + stdenvApple = stdenvAdapters.overrideGCC allStdenvs.stdenvNative gccApple; + forceNativeDrv = drv : if crossSystem == null then drv else (drv // { crossDrv = drv.nativeDrv; }); @@ -2578,10 +2580,8 @@ let }; clangUnwrapped = llvm: pkg: callPackage pkg { - stdenv = if stdenv.isDarwin - then stdenvAdapters.overrideGCC stdenv gccApple - else stdenv; - llvm = llvm; + stdenv = if stdenv.isDarwin then stdenvApple else stdenv; + inherit llvm; }; clangSelf = clangWrapSelf llvmPackagesSelf.clang; @@ -3095,9 +3095,7 @@ let llvm_33 = llvm_v ../development/compilers/llvm/3.3/llvm.nix; llvm_v = path: callPackage path { - stdenv = if stdenv.isDarwin - then stdenvAdapters.overrideGCC stdenv gccApple - else stdenv; + stdenv = if stdenv.isDarwin then stdenvApple else stdenv; }; llvmPackages = if !stdenv.isDarwin then llvmPackages_34 else llvmPackages_34 // {