From dc384e77423b805e6b3ad6665efb5d3d9e7493f6 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Wed, 12 Nov 2025 10:40:07 -0500 Subject: [PATCH] Respect default umask in distribution archive When copying files from the nix store to the intermediate directory, ignore the source file permissions. These are coming from the nix store, so they will not be writable. Without this change, this will result in unexpected `Permission denied` when manipulating extracted files. Fixes: #2022 --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index f944407e5..029a945c5 100644 --- a/flake.nix +++ b/flake.nix @@ -406,6 +406,7 @@ # Copy exes to intermediate dir cp \ --no-clobber \ + --no-preserve=mode \ --remove-destination \ --verbose \ ${lib.concatMapStringsSep " " (exe: "${exe}/bin/*") exes} \ @@ -414,6 +415,7 @@ # Copy magrations to intermediate dir cp \ --no-clobber \ + --no-preserve=mode \ --remove-destination \ --verbose \ --recursive \