diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-01-06 18:25:50 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-01-06 18:25:50 -0500 |
commit | 93aabab7605c21f5962df2dffa7fee9ac17ba848 (patch) | |
tree | acbf35087ea426a1c2bdea54abff21aaa91be19b /pkgs/development/haskell-modules | |
parent | e9156086187b09970e5cdb5178450c73ae59ecd6 (diff) | |
download | nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar.gz nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar.bz2 nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar.lz nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar.xz nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.tar.zst nixpkgs-93aabab7605c21f5962df2dffa7fee9ac17ba848.zip |
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.
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index eb8fad4af1b..404fd0d9440 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -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 |