mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
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
|
||||
test -f $i && ghc --make $i
|
||||
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
|
||||
if [ -d "$p/lib/ghc-${ghc.ghc.version}/package.conf.d" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user