From c0efa356fc7920db6995d2e8b2e1ffd94ab465af Mon Sep 17 00:00:00 2001 From: Mathijs Kwik Date: Mon, 11 Jun 2012 18:58:28 +0000 Subject: [PATCH] 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 --- pkgs/development/compilers/uhc/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/uhc/default.nix b/pkgs/development/compilers/uhc/default.nix index 8aa27674677..2c812e8842b 100644 --- a/pkgs/development/compilers/uhc/default.nix +++ b/pkgs/development/compilers/uhc/default.nix @@ -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 = {