Add defaultSetupHs to ghcjs, and fix it in regular cabal
This commit is contained in:
parent
c1c4c85800
commit
e4ff3fd348
@ -187,7 +187,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
|
||||
for i in Setup.hs Setup.lhs ${defaultSetupHs}; do
|
||||
test -f $i && break
|
||||
done
|
||||
ghc --make -o Setup -odir $TMPDIR $i
|
||||
ghc --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
|
||||
|
||||
for p in $extraBuildInputs $propagatedNativeBuildInputs; do
|
||||
if [ -d "$p/lib/ghc-${ghc.ghc.version}/package.conf.d" ]; then
|
||||
|
@ -18,6 +18,11 @@ let
|
||||
optionals = stdenv.lib.optionals;
|
||||
optionalString = stdenv.lib.optionalString;
|
||||
filter = stdenv.lib.filter;
|
||||
|
||||
defaultSetupHs = builtins.toFile "Setup.hs" ''
|
||||
import Distribution.Simple
|
||||
main = defaultMain
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
@ -168,9 +173,10 @@ in
|
||||
|
||||
PATH=$PATH:${ghc.ghc.ghc}/bin
|
||||
|
||||
for i in Setup.hs Setup.lhs; do
|
||||
test -f $i && ghc --make $i
|
||||
for i in Setup.hs Setup.lhs ${defaultSetupHs}; do
|
||||
test -f $i && break
|
||||
done
|
||||
ghc --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
|
||||
|
||||
for p in $extraBuildInputs $propagatedBuildInputs $propagatedNativeBuildInputs; do
|
||||
PkgDir="$p/lib/ghcjs-${ghc.ghc.version}_ghc-${ghc.ghc.ghc.version}/package.conf.d"
|
||||
|
Loading…
x
Reference in New Issue
Block a user