From ffd11da9d925fe7bd3184807d515456b53e2f158 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 11 Mar 2013 12:25:53 +0100 Subject: [PATCH] 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. --- pkgs/build-support/cabal/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index 38f2c4c6115..c1b8d6d5fea 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 = ''