uhc: fixed building on ghc 7.2.1+

by removing the check for the 'binary' package, which is built-in from
that version onward. This is a workaround for the problem where ghc's
built-in libraries (like containers, array, binary) don't show up in
"ghc-pkg list" output.

svn path=/nixpkgs/trunk/; revision=34471
This commit is contained in:
Mathijs Kwik 2012-06-11 18:58:28 +00:00
parent 51ec873c8d
commit c0efa356fc
1 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,11 @@
, uuagc, mtl, network, binary, llvm, fgl, syb
}:
stdenv.mkDerivation {
# this check won't be needed anymore after ghc-wrapper is fixed
# to show ghc-builtin packages in "ghc-pkg list" output.
let binaryIsBuiltIn = builtins.compareVersions "7.2.1" ghc.ghcVersion != 1;
in stdenv.mkDerivation {
name = "uhc-svn-git20120502";
src = fetchgit {
@ -30,6 +34,8 @@ stdenv.mkDerivation {
sed -i "s|-fglasgow-exts|-fglasgow-exts -package-conf=$p|g" mk/shared.mk.in
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in
'' + stdenv.lib.optionalString binaryIsBuiltIn ''
sed -i "s|ghcLibBinary=no|ghcLibBinaryExists=yes|" configure
'';
meta = {