diff --git a/checks/formatting.nix b/checks/formatting.nix index b399c67..cdfb2bf 100644 --- a/checks/formatting.nix +++ b/checks/formatting.nix @@ -4,8 +4,11 @@ }: pkgs.runCommand "formatting-check" { } '' - ${ - pkgs.lib.getExe self.formatter.${pkgs.stdenv.hostPlatform.system} - } --no-cache --fail-on-change ${../.} + cp -r ${../.}/ src + # will be copied readonly from the /nix/store + # nixfmt sadly ignores --fail-on-change and still tries to write to the file + # ergo, we create our own writable copy + chmod -R +w src + ${pkgs.lib.getExe self.formatter.${pkgs.stdenv.hostPlatform.system}} --ci --tree-root ./src ./src touch $out ''