on iko/ghcjs-patch-master help sign in
Fix issue with materialize and sandboxed builds (#399)

commitfbeb1e09aa05f8c8125b9df74112fcb446b4f3d2 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateWed 4 Mar 2020, 17:06 (7 years ago) parent775c8cf
1 file changed+7−1
lib/materialize.nix+7−1
lib/materialize.nix+7−1
@@ -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