mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
haskell: extend generic builder to recognize mis-configured Cabal 2.x builds
Cabal 1.x says: | Warning: This package indirectly depends on multiple versions of the same | package. This is highly likely to cause a compile failure. But in version 2.x, that warning is split into two lines differently: | Warning: | This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure. This commit modifies the call to "egrep" to recognize both versions by virtue of the "-z" flag, which essentially interprets the whole configure-time output as one long line.
This commit is contained in:
parent
a05d950812
commit
016aa581a7
@ -276,7 +276,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
echo configureFlags: $configureFlags
|
||||
${setupCommand} configure $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
|
||||
if ${gnugrep}/bin/egrep -q -z '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
|
||||
|
Loading…
Reference in New Issue
Block a user