on iko/ghcjs-patch-master help sign in
(Re)Apply workaround for single-user sandbox perm issue (#794)

Fixes the following error that occurs on single-user nix installations when compiling an otherwise trivial cabalProject/stackProject: > error: moving build output '/nix/store/d5zpqajgysbk38iqgcjwgqx44amqh9pw-ghc-boot-src' from the sandbox to the Nix store: Permission denied Tested on ghc-8.4 where there is nothing in the cache. Materialisation of ghc(-boot-src) also still works/works again. See https://github.com/input-output-hk/haskell.nix/issues/466 and the previous attempt to fix this at https://github.com/input-output-hk/haskell.nix/pull/399 (d3905d62b5c5ca7f671f5a301c4fcab433ebf68c..8561498e7d9237cc271f9ffd7bff19e3293122b0)

commit0a9d82d63db49d82c05b5f52a55a121f4c9bfe19 authorLennart Spitzner <hexagoxel@hexagoxel.de> dateThu 30 Jul 2020, 05:02 (6 years ago) parent42462b6
1 file changed+2−1
overlays/ghc-packages.nix+2−1
overlays/ghc-packages.nix+2−1
@@ -33,6 +33,7 @@ let
3333 }) files);
3434 in final.evalPackages.runCommand "${name}${ext}" {} ''
3535 cp -Lr ${links} $out
36+ chmod -R +w $out
3637 '';
3738
3839 # Combine the all the boot package nix files for a given ghc
@@ -102,7 +103,7 @@ in rec {
102103 if dir == "libraries/ghc-boot"
103104 then final.evalPackages.runCommand "ghc-boot-src" {} ''
104105 cp -Lr ${value.passthru.configured-src}/${dir} $out
105− chmod -R +w $out/GHC
106+ chmod -R +w $out
106107 cp -Lr ${value.generated}/libraries/ghc-boot/dist-install/build/GHC/* $out/GHC
107108 ''
108109 else if dir == "compiler"