From 6aa06a6699ce4bf6bf61605bdb44b2c4908a046f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 23 Mar 2012 03:01:58 +0000 Subject: [PATCH] ghc-packages: Darwin's native readlink doesn't support -f svn path=/nixpkgs/trunk/; revision=33366 --- pkgs/development/compilers/ghc/wrapper.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/wrapper.nix b/pkgs/development/compilers/ghc/wrapper.nix index b04cd18fb46..be27f98925e 100644 --- a/pkgs/development/compilers/ghc/wrapper.nix +++ b/pkgs/development/compilers/ghc/wrapper.nix @@ -1,4 +1,4 @@ -{stdenv, ghc, makeWrapper}: +{stdenv, ghc, makeWrapper, coreutils}: stdenv.mkDerivation { name = "ghc-${ghc.version}-wrapper"; @@ -31,7 +31,7 @@ stdenv.mkDerivation { case "\$arg" in -package-conf) ;; *) - CANONICALIZED="\$(readlink -f "\$arg")" + CANONICALIZED="\$(${stdenv.lib.optionalString stdenv.isDarwin "${coreutils}/bin/"}}readlink -f "\$arg")" GHC_PACKAGES_HASH["\$CANONICALIZED"]= ;; esac done