about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2013-12-16 21:21:31 +0100
committerPeter Simons <simons@cryp.to>2013-12-29 12:26:05 +0100
commit6209bb85565dcb2a87b67bc7cde82f41d5c4f860 (patch)
tree84200cd96d73f0c42716fce800846ee9a5d82bc3 /pkgs/build-support
parent63c60638fcc148a3f1d786216c434da723aeef3d (diff)
downloadnixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar.gz
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar.bz2
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar.lz
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar.xz
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.tar.zst
nixlib-6209bb85565dcb2a87b67bc7cde82f41d5c4f860.zip
pkgs/build-support/cabal: add 'buildTarget' attribute to allow passing flags to "./Setup build"
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cabal/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix
index 2898b14a12f8..bf956f6e553e 100644
--- a/pkgs/build-support/cabal/default.nix
+++ b/pkgs/build-support/cabal/default.nix
@@ -108,6 +108,9 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
             # build-depends Cabal field
             buildDepends = [];
 
+            # target(s) passed to the cabal build phase as an argument
+            buildTarget = "";
+
             # build-depends Cabal fields stated in test-suite stanzas
             testDepends = [];
 
@@ -208,7 +211,7 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version;
             buildPhase = ''
               eval "$preBuild"
 
-              ./Setup build
+              ./Setup build ${self.buildTarget}
 
               export GHC_PACKAGE_PATH=$(${ghc.GHCPackages})
               test -n "$noHaddock" || ./Setup haddock