summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2013-03-11 12:25:53 +0100
committerPeter Simons <simons@cryp.to>2013-03-11 12:25:53 +0100
commitffd11da9d925fe7bd3184807d515456b53e2f158 (patch)
tree1b217bbb3f31939218ba862851d647cc7b485d95 /pkgs/build-support
parente1f633bdaed8c48bc881f6370067ad8104d972d7 (diff)
downloadnixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar.gz
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar.bz2
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar.lz
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar.xz
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.tar.zst
nixlib-ffd11da9d925fe7bd3184807d515456b53e2f158.zip
pkgs/build-support/cabal: enable 'doCheck' only on GHC versions 7.x or later
Older GHC's come with a version of Cabal that doesn't even understand the
--{enable,disable}-tests command line arguments.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/cabal/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix
index 38f2c4c61152..c1b8d6d5fea6 100644
--- a/pkgs/build-support/cabal/default.nix
+++ b/pkgs/build-support/cabal/default.nix
@@ -92,13 +92,12 @@
 
             # pass the '--enable-tests' flag to cabal in the configure stage
             # and run any regression test suites the package might have
-            doCheck = true;
+            doCheck = stdenv.lib.versionOlder "7" ghc.ghcVersion;
 
             extraConfigureFlags = [
               (stdenv.lib.enableFeature enableLibraryProfiling "library-profiling")
               (stdenv.lib.enableFeature self.enableSplitObjs "split-objs")
-              (stdenv.lib.enableFeature self.doCheck "tests")
-            ];
+            ] ++ stdenv.lib.optional (stdenv.lib.versionOlder "7" ghc.ghcVersion) (stdenv.lib.enableFeature self.doCheck "tests");
 
             # compiles Setup and configures
             configurePhase = ''