haskellPackages.llvm-hs: fix build on darwin
This commit is contained in:
parent
750a3ba2ce
commit
22890f7b13
@ -297,10 +297,22 @@ self: super: builtins.intersectAttrs super {
|
|||||||
);
|
);
|
||||||
|
|
||||||
llvm-hs =
|
llvm-hs =
|
||||||
let dontCheckDarwin = if pkgs.stdenv.isDarwin
|
let llvmHsWithLlvm8 = super.llvm-hs.override { llvm-config = pkgs.llvm_8; };
|
||||||
then dontCheck
|
in
|
||||||
else pkgs.lib.id;
|
if pkgs.stdenv.isDarwin
|
||||||
in dontCheckDarwin (super.llvm-hs.override { llvm-config = pkgs.llvm_8; });
|
then
|
||||||
|
overrideCabal llvmHsWithLlvm8 (oldAttrs: {
|
||||||
|
# One test fails on darwin.
|
||||||
|
doCheck = false;
|
||||||
|
# llvm-hs's Setup.hs file tries to add the lib/ directory from LLVM8 to
|
||||||
|
# the DYLD_LIBRARY_PATH environment variable. This messes up clang
|
||||||
|
# when called from GHC, probably because clang is version 7, but we are
|
||||||
|
# using LLVM8.
|
||||||
|
preCompileBuildDriver = oldAttrs.preCompileBuildDriver or "" + ''
|
||||||
|
substituteInPlace Setup.hs --replace "addToLdLibraryPath libDir" "pure ()"
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
else llvmHsWithLlvm8;
|
||||||
|
|
||||||
# Needs help finding LLVM.
|
# Needs help finding LLVM.
|
||||||
spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm;
|
spaceprobe = addBuildTool super.spaceprobe self.llvmPackages.llvm;
|
||||||
|
Loading…
Reference in New Issue
Block a user