diff options
author | Andrew Childs <lorne@cons.org.nz> | 2020-02-17 23:10:33 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2020-03-21 21:27:23 +0900 |
commit | 31f557c88feb8e6547805727e193881e35f4c495 (patch) | |
tree | b044999b4fa23e650b6dc2ab1478420b8aa48958 /pkgs/development/compilers | |
parent | 3285f0f2ff36aea7d5e87520a3e9ef66c44f87b8 (diff) | |
download | nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar.gz nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar.bz2 nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar.lz nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar.xz nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.tar.zst nixpkgs-31f557c88feb8e6547805727e193881e35f4c495.zip |
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
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2-binary.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/8.2.2-binary.nix b/pkgs/development/compilers/ghc/8.2.2-binary.nix index 1f24b9a1ff2..9f546bcb541 100644 --- a/pkgs/development/compilers/ghc/8.2.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.2.2-binary.nix @@ -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/ |