haskell-generic-builder: pass "--with-gcc=$CC" on Darwin to help Cabal find Clang

Suggested in https://github.com/NixOS/nixpkgs/pull/5746.
This commit is contained in:
Peter Simons 2015-01-13 21:34:23 +01:00
parent 07966befee
commit 67312f83ad

View file

@ -117,6 +117,8 @@ stdenv.mkDerivation ({
${optionalString (versionOlder "7.8" ghc.version && !isLibrary) ''
configureFlags+=" --ghc-option=-j$NIX_BUILD_CORES"
setupCompileFlags="-j$NIX_BUILD_CORES"
''}${optionalString stdenv.isDarwin ''
configureFlags+=" --with-gcc=$CC" # Cabal won't find clang without help.
''}
packageConfDir="$TMP/package.conf.d"