Skip to content

Commit b82a06c

Browse files
hamishmackangerman
authored andcommitted
Fix callCabalProjectToNix when using nix sandboxes (#154)
* Fix callCabalProjectToNix when using nix sandboxes I am not sure why this works on hydra, but on default install of nix on ubuntu it fails to rename the plan-and-src $out because it is made read only by rsync. * Add comment regarding the nix sanbox issue
1 parent 53b3649 commit b82a06c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/cabalProjectToNix.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@ in
7979
# todo: should we clean `src` to drop any .git, .nix, ... other irelevant files?
8080
rsync -a "${src}/" "$out/"
8181
rsync -a ${plan}/ $out/
82+
# Rsync will have made $out read only and that can cause problems when
83+
# nix sandboxing is enabled (since it can prevent nix from moving the directory
84+
# out of the chroot sandbox).
85+
chmod +w $out
8286
''

0 commit comments

Comments
 (0)