summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorMathijs Kwik <mathijs@bluescreen303.nl>2012-06-11 18:58:28 +0000
committerMathijs Kwik <mathijs@bluescreen303.nl>2012-06-11 18:58:28 +0000
commitc0efa356fc7920db6995d2e8b2e1ffd94ab465af (patch)
tree1fbcee2f1b74c18536900eb1ef2159e605167aee /pkgs/development/compilers
parent51ec873c8dae8e5bbb040954cf9422c64769d36e (diff)
downloadnixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar.gz
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar.bz2
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar.lz
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar.xz
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.tar.zst
nixpkgs-c0efa356fc7920db6995d2e8b2e1ffd94ab465af.zip
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
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/uhc/default.nix8
1 files changed, 7 insertions, 1 deletions
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 = {