diff options
author | Shea Levy <shea@shealevy.com> | 2014-08-13 22:38:32 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-08-16 00:13:14 -0500 |
commit | dc285e6895e97355f769fdd6341b3e9c0cce2cf9 (patch) | |
tree | 955a2390d85357e811980893a1c639cea5f93f13 /pkgs/build-support | |
parent | 42c31e08df76515776396a04b5cd5e5961298441 (diff) | |
download | nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar.gz nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar.bz2 nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar.lz nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar.xz nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.tar.zst nixpkgs-dc285e6895e97355f769fdd6341b3e9c0cce2cf9.zip |
cabal.mkDerivation: Use defaultMain if no Setup.{l,}hs exists.
This mirrors the default behaviour of cabal-install for the Simple build type
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cabal/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index 69423004d65..7147b287fae 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -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 |