about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-06-20 17:57:35 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-06-20 18:40:53 -0400
commitfd7a6ea0aff44e90b999958c58cc3acc8579ae72 (patch)
treef815aa5f6e594e8eb4c7adf4bd7436fa0c5972a4 /pkgs/development/haskell-modules
parent17621f63eb1c257e84490a825c1e9a212e0826af (diff)
downloadnixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar.gz
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar.bz2
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar.lz
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar.xz
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.tar.zst
nixlib-fd7a6ea0aff44e90b999958c58cc3acc8579ae72.zip
haskell: make generic builder follow compiler’s shared config
enableShared in generic-builder.nix should default to what the GHC
compiler was compiled with. Add a passthru to all of the GHC compilers
to hold the value of enableShared. If enableShared is not set in the
GHC we just use false as the default value for enableSharedLibraries.

Note: I may have missed some compilers. Only GHC & GHCJS are covered
by this commit but this shouldn’t break evaluation of anything else.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 52128d3fc5d1..3dd023f34302 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -30,7 +30,7 @@ in
 , profilingDetail ? "all-functions"
 # TODO enable shared libs for cross-compiling
 , enableSharedExecutables ? false
-, enableSharedLibraries ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
+, enableSharedLibraries ? (ghc.enableShared or false)
 , enableDeadCodeElimination ? (!stdenv.isDarwin)  # TODO: use -dead_strip for darwin
 , enableStaticLibraries ? !hostPlatform.isWindows
 , enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"