summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/generic-builder.nix
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-04-05 21:10:04 -0400
committerShea Levy <shea@shealevy.com>2017-04-06 03:16:00 -0400
commit5e984362f671313faa7056164394cd3522756d57 (patch)
treec59e24c946452161e62d9db47b1c20e6b42ce9a7 /pkgs/development/haskell-modules/generic-builder.nix
parentd95fb5f2ac340b8d5dda8bc36de32c88dbcc6ee3 (diff)
downloadnixlib-5e984362f671313faa7056164394cd3522756d57.tar
nixlib-5e984362f671313faa7056164394cd3522756d57.tar.gz
nixlib-5e984362f671313faa7056164394cd3522756d57.tar.bz2
nixlib-5e984362f671313faa7056164394cd3522756d57.tar.lz
nixlib-5e984362f671313faa7056164394cd3522756d57.tar.xz
nixlib-5e984362f671313faa7056164394cd3522756d57.tar.zst
nixlib-5e984362f671313faa7056164394cd3522756d57.zip
haskell generic builder: Use ghcjs's hsc2hs.
This is required when using ghcjs to compile Setup.hs, which we do since #23614.

See comments on https://github.com/ghcjs/ghcjs/commit/c35350a212f20bd4cb7486bf49044f7a1329fc93
Diffstat (limited to 'pkgs/development/haskell-modules/generic-builder.nix')
-rw-r--r--pkgs/development/haskell-modules/generic-builder.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix
index 1f5d97941ce5..d39e1bacd71d 100644
--- a/pkgs/development/haskell-modules/generic-builder.nix
+++ b/pkgs/development/haskell-modules/generic-builder.nix
@@ -125,7 +125,6 @@ let
   ] ++ optionals (enableDeadCodeElimination && (stdenv.lib.versionOlder "8.0.1" ghc.version)) [
      "--ghc-option=-split-sections"
   ] ++ optionals isGhcjs [
-    "--with-hsc2hs=${nativeGhc}/bin/hsc2hs"
     "--ghcjs"
   ] ++ optionals isCross ([
     "--configure-option=--host=${ghc.cross.config}"
@@ -150,6 +149,8 @@ let
                      buildTools ++ libraryToolDepends ++ executableToolDepends ++
                      optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++
                      optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++
+                     # ghcjs's hsc2hs calls out to the native hsc2hs
+                     optional isGhcjs nativeGhc ++
                      optionals withBenchmarkDepends (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkToolDepends);
   allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;