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 c35350a212
This commit is contained in:
Shea Levy 2017-04-05 21:10:04 -04:00
parent d95fb5f2ac
commit 5e984362f6

View File

@ -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;