about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-02-13 12:33:29 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-02-13 12:33:29 +0100
commit7257dedd7cf28634e08fc0458ed34a183065b70e (patch)
tree53d0274ecfd0474666bceec021ce059e428a4b47 /pkgs/development/compilers/ghc
parent7c3588d8ddc35909ca56394c3a5464d6e1551fe0 (diff)
parent563b491ce89bafaa928beba19a37f6381bfc60d0 (diff)
downloadnixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.gz
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.bz2
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.lz
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.xz
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.zst
nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/8.6.3.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/8.6.3.nix b/pkgs/development/compilers/ghc/8.6.3.nix
index 4e1f0dd9fc72..c57e4d96ae2e 100644
--- a/pkgs/development/compilers/ghc/8.6.3.nix
+++ b/pkgs/development/compilers/ghc/8.6.3.nix
@@ -6,6 +6,9 @@
 
 , libiconv ? null, ncurses
 
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
 , useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform)
 , # LLVM is conceptually a run-time-only depedendency, but for
   # non-x86, we need LLVM to bootstrap later stages, so it becomes a
@@ -65,6 +68,7 @@ let
 
   # Splicer will pull out correct variations
   libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
+    ++ [libffi]
     ++ stdenv.lib.optional (!enableIntegerSimple) gmp
     ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
 
@@ -149,6 +153,7 @@ stdenv.mkDerivation (rec {
   configureFlags = [
     "--datadir=$doc/share/doc/ghc"
     "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${libffi}/include" "--with-ffi-libraries=${libffi}/lib"
   ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && !enableIntegerSimple) [
     "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
   ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [