forked from mirrors/nixpkgs
haskell/with-packages-wrapper.nix: remove /bin symlink if it exists
The wrapper need a writable directory to work, so remove the symlink to a read-only one if it occurs.
This commit is contained in:
parent
e915608618
commit
93aabab760
|
@ -61,6 +61,15 @@ buildEnv {
|
|||
postBuild = ''
|
||||
. ${makeWrapper}/nix-support/setup-hook
|
||||
|
||||
# We make changes to ghc binaries in $out/bin. buildEnv gives a
|
||||
# symlink if only one of the paths has the subdirectory. If so,
|
||||
# we need to remove it for our new wrappers.
|
||||
|
||||
if [ -L "$out/bin" ]; then
|
||||
rm -f "$out/bin"
|
||||
mkdir -p "$out/bin"
|
||||
fi
|
||||
|
||||
# wrap compiler executables with correct env variables
|
||||
|
||||
for prg in ${ghcCommand} ${ghcCommand}i ${ghcCommand}-${ghc.version} ${ghcCommand}i-${ghc.version}; do
|
||||
|
|
Loading…
Reference in a new issue