diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2015-01-09 21:38:10 +0300 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2015-01-09 21:40:06 +0300 |
commit | e67bb36821d41eb7cbeedab2fd9ff7a04873ee59 (patch) | |
tree | 53999a997eaf13d657b6aa2ce4714c763cf6e939 /pkgs/development/haskell-modules/with-packages-wrapper.nix | |
parent | ad632cc9c8cfb491594e18e716af697759cc615f (diff) |
Work around buildEnv sometimes deciding to make bin a symlink
Diffstat (limited to 'pkgs/development/haskell-modules/with-packages-wrapper.nix')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index ad88703edd5ce..dbe6871d38b85 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -40,6 +40,13 @@ stdenv.lib.addPassthru (buildEnv { postBuild = '' . ${makeWrapper}/nix-support/setup-hook + if test -L "$out/bin"; then + binTarget="$(readlink -f "$out/bin")" + rm "$out/bin" + cp -r "$binTarget" "$out/bin" + chmod u+w "$out/bin" + fi + for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do rm -f $out/bin/$prg makeWrapper ${ghc}/bin/$prg $out/bin/$prg \ |