mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
haskell.compiler.ghc822Binary: propagate llvm dependency
Fixes the following error when attempting to build packages using this compiler: <no location info>: error: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM 3.9 <no location info>: error: ghc: could not execute: opt
This commit is contained in:
parent
3285f0f2ff
commit
31f557c88f
1 changed files with 4 additions and 1 deletions
|
@ -1,12 +1,15 @@
|
|||
{ stdenv, substituteAll
|
||||
, fetchurl, perl, gcc, llvm
|
||||
, ncurses5, gmp, glibc, libiconv
|
||||
, llvmPackages
|
||||
}:
|
||||
|
||||
# Prebuilt only does native
|
||||
assert stdenv.targetPlatform == stdenv.hostPlatform;
|
||||
|
||||
let
|
||||
useLLVM = !stdenv.targetPlatform.isx86;
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath ([
|
||||
ncurses5 gmp
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
|
||||
|
@ -53,7 +56,7 @@ stdenv.mkDerivation rec {
|
|||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = stdenv.lib.optionals (stdenv.targetPlatform.isAarch32 || stdenv.targetPlatform.isAarch64) [ llvm ];
|
||||
propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
|
||||
# Cannot patchelf beforehand due to relative RPATHs that anticipate
|
||||
# the final install location/
|
||||
|
|
Loading…
Reference in a new issue