@@ -67,6 +67,8 @@ let
6767 '')
6868 + ''
6969 cp -r ${unchecked} $out
70+ # Make sure output files can be removed from the sandbox
71+ chmod -R +w $out
7072 ''
7173 );
7274
@@ -80,7 +82,11 @@ let
8082 calculateUseAll =
8183 # Skip right to expectedPath if it already exists
8284 if materialized != null && builtins.pathExists materialized
83− then runCommand name hashArgs "cp -r ${materialized} $out"
85+ then runCommand name hashArgs ''
86+ cp -r ${materialized} $out
87+ # Make sure output files can be removed from the sandbox
88+ chmod -R +w $out
89+ ''
8490 else calculateUseHash;
8591
8692in