Work around buildEnv sometimes deciding to make bin a symlink
This commit is contained in:
parent
ad632cc9c8
commit
e67bb36821
@ -40,6 +40,13 @@ stdenv.lib.addPassthru (buildEnv {
|
|||||||
postBuild = ''
|
postBuild = ''
|
||||||
. ${makeWrapper}/nix-support/setup-hook
|
. ${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
|
for prg in ghc ghci ghc-${ghc.version} ghci-${ghc.version}; do
|
||||||
rm -f $out/bin/$prg
|
rm -f $out/bin/$prg
|
||||||
makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
|
makeWrapper ${ghc}/bin/$prg $out/bin/$prg \
|
||||||
|
Loading…
Reference in New Issue
Block a user