cabal.mkDerivation: Use defaultMain if no Setup.{l,}hs exists.
This mirrors the default behaviour of cabal-install for the Simple build type
This commit is contained in:
parent
42c31e08df
commit
dc285e6895
|
@ -182,6 +182,12 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
|
||||||
for i in Setup.hs Setup.lhs; do
|
for i in Setup.hs Setup.lhs; do
|
||||||
test -f $i && ghc --make $i
|
test -f $i && ghc --make $i
|
||||||
done
|
done
|
||||||
|
if [ ! -f Setup ]; then
|
||||||
|
ghc --make ${builtins.toFile "Setup.hs" ''
|
||||||
|
import Distribution.Simple
|
||||||
|
main = defaultMain
|
||||||
|
''} -o Setup -odir $TMPDIR
|
||||||
|
fi
|
||||||
|
|
||||||
for p in $extraBuildInputs $propagatedNativeBuildInputs; do
|
for p in $extraBuildInputs $propagatedNativeBuildInputs; do
|
||||||
if [ -d "$p/lib/ghc-${ghc.ghc.version}/package.conf.d" ]; then
|
if [ -d "$p/lib/ghc-${ghc.ghc.version}/package.conf.d" ]; then
|
||||||
|
|
Loading…
Reference in New Issue