diff options
author | Dave Laing <dave.laing.80@gmail.com> | 2016-05-13 09:26:31 +1000 |
---|---|---|
committer | Dave Laing <dave.laing.80@gmail.com> | 2016-05-13 09:41:15 +1000 |
commit | 0540a837893f1e32676fe2a9b093216b44f5dc24 (patch) | |
tree | bac3c5812bf5b6f7626001948bd5b186d4a811fb /pkgs/development/haskell-modules/configuration-common.nix | |
parent | f67b8f8e64a0887d14be7e2e8e469c7c3c66800d (diff) | |
download | nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar.gz nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar.bz2 nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar.lz nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar.xz nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.tar.zst nixpkgs-0540a837893f1e32676fe2a9b093216b44f5dc24.zip |
llvm-general: Adds Darwin compatibilty
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r-- | pkgs/development/haskell-modules/configuration-common.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 5f1335ca72f..ca96d057574 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -615,8 +615,20 @@ self: super: { # Uses OpenGL in testing caramia = dontCheck super.caramia; + llvm-general-darwin = overrideCabal (super.llvm-general.override { llvm-config = pkgs.llvm_35; }) (drv: { + preConfigure = '' + sed -i llvm-general.cabal \ + -e 's,extra-libraries: stdc++,extra-libraries: c++,' + ''; + configureFlags = (drv.configureFlags or []) ++ ["--extra-include-dirs=${pkgs.libcxx}/include/c++/v1"]; + librarySystemDepends = [ pkgs.libcxx ] ++ drv.librarySystemDepends or []; + }); + # Supports only 3.5 for now, https://github.com/bscarlet/llvm-general/issues/142 - llvm-general = super.llvm-general.override { llvm-config = pkgs.llvm_35; }; + llvm-general = + if pkgs.stdenv.isDarwin + then self.llvm-general-darwin + else super.llvm-general.override { llvm-config = pkgs.llvm_35; }; # Needs help finding LLVM. spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm; |