Skip to content

Commit

Permalink
haskell/with-packages-wrapper.nix: remove /bin symlink if it exists
Browse files Browse the repository at this point in the history
The wrapper need a writable directory to work, so remove the symlink
to a read-only one if it occurs.
  • Loading branch information
matthewbauer committed Jan 6, 2020
1 parent e915608 commit 93aabab
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkgs/development/haskell-modules/with-packages-wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 93aabab

Please sign in to comment.