diff options
author | Peter Simons <simons@cryp.to> | 2013-12-24 17:49:48 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2013-12-29 12:26:05 +0100 |
commit | 7d577eb8227be980330bf220bc58217e898398d8 (patch) | |
tree | 0653abf090c38918c39a268d3681149b7d98b2ad /pkgs/build-support | |
parent | 074fee59c53b93af9e6f7c1265dd81919bdcd72e (diff) |
build-support/cabal: recognize the "this package indirectly depends on
multiple versions of the same package" warning from Cabal and abort the build if it occurs.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/cabal/default.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/build-support/cabal/default.nix b/pkgs/build-support/cabal/default.nix index d99faf41f88d3..b98fef27ecb42 100644 --- a/pkgs/build-support/cabal/default.nix +++ b/pkgs/build-support/cabal/default.nix @@ -1,6 +1,7 @@ # generic builder for Cabal packages { stdenv, fetchurl, lib, pkgconfig, ghc, Cabal, jailbreakCabal, glibcLocales +, gnugrep, coreutils , enableLibraryProfiling ? false , enableSharedLibraries ? false , enableSharedExecutables ? false @@ -188,7 +189,13 @@ assert !enableStaticLibraries -> versionOlder "7.7" ghc.version; done echo "configure flags: $extraConfigureFlags $configureFlags" - ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' --libsubdir='$pkgid' $extraConfigureFlags $configureFlags + ./Setup configure --verbose --prefix="$out" --libdir='$prefix/lib/$compiler' \ + --libsubdir='$pkgid' $extraConfigureFlags $configureFlags 2>&1 \ + | ${coreutils}/bin/tee "$NIX_BUILD_TOP/cabal-configure.log" + if ${gnugrep}/bin/egrep -q '^Warning:.*depends on multiple versions' "$NIX_BUILD_TOP/cabal-configure.log"; then + echo >&2 "*** abort because of serious configure-time warning from Cabal" + exit 1 + fi eval "$postConfigure" ''; |