diff --git a/pkgs/development/compilers/ghc/wrapper.nix b/pkgs/development/compilers/ghc/wrapper.nix
index be27f98925e..4407f16c9e0 100644
--- a/pkgs/development/compilers/ghc/wrapper.nix
+++ b/pkgs/development/compilers/ghc/wrapper.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation {
       case "\$arg" in
         -package-conf) ;;
         *)
-          CANONICALIZED="\$(${stdenv.lib.optionalString stdenv.isDarwin "${coreutils}/bin/"}}readlink -f "\$arg")"
+          CANONICALIZED="\$(${stdenv.lib.optionalString stdenv.isDarwin "${coreutils}/bin/"}readlink -f "\$arg")"
           GHC_PACKAGES_HASH["\$CANONICALIZED"]= ;;
       esac
     done