Skip to content

Commit fbeb1e0

Browse files
authored
Fix issue with materialize and sandboxed builds (#399)
1 parent 775c8cf commit fbeb1e0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/materialize.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

8692
in

0 commit comments

Comments
 (0)