From 040b43ea96628c0b97a7305fa77c9549a34cb13a Mon Sep 17 00:00:00 2001 From: ryota2357 Date: Mon, 1 Dec 2025 13:31:23 +0900 Subject: [PATCH 1/5] feat: update nixpkgs input --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 96134d0..82dbd4c 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1761236834, - "narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=", + "lastModified": 1764527385, + "narHash": "sha256-nA5ywiGKl76atrbdZ5Aucd8SjF/v8ew9b9QsC+MKL14=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1", + "rev": "23258e03aaa49b3a68597e3e50eb0cbce7e42e9d", "type": "github" }, "original": { From 1f9d524f7fbddea16577791b954633541ca7bafe Mon Sep 17 00:00:00 2001 From: ryota2357 Date: Mon, 1 Dec 2025 13:32:28 +0900 Subject: [PATCH 2/5] feat!: remove typstfmt error: 'typstfmt' has been removed due to lack of upstream maintenance, consider using 'typstyle' instead. ref: https://github.com/NixOS/nixpkgs/pull/455686 --- README.md | 3 +-- examples/formatter-typstfmt.toml | 6 ------ programs/typstfmt.nix | 14 -------------- 3 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 examples/formatter-typstfmt.toml delete mode 100644 programs/typstfmt.nix diff --git a/README.md b/README.md index df58025..52183a1 100644 --- a/README.md +++ b/README.md @@ -222,7 +222,7 @@ functions. -`treefmt-nix` currently supports 120 formatters: +`treefmt-nix` currently supports 119 formatters: * [actionlint](programs/actionlint.nix) * [aiken](programs/aiken.nix) @@ -336,7 +336,6 @@ functions. * [texfmt](programs/texfmt.nix) * [toml-sort](programs/toml-sort.nix) * [typos](programs/typos.nix) -* [typstfmt](programs/typstfmt.nix) * [typstyle](programs/typstyle.nix) * [xmllint](programs/xmllint.nix) * [yamlfmt](programs/yamlfmt.nix) diff --git a/examples/formatter-typstfmt.toml b/examples/formatter-typstfmt.toml deleted file mode 100644 index 0185585..0000000 --- a/examples/formatter-typstfmt.toml +++ /dev/null @@ -1,6 +0,0 @@ -# Example generated by ../examples.sh -[formatter.typstfmt] -command = "typstfmt" -excludes = [] -includes = ["*.typ", "*.typst"] -options = [] diff --git a/programs/typstfmt.nix b/programs/typstfmt.nix deleted file mode 100644 index 5286644..0000000 --- a/programs/typstfmt.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ mkFormatterModule, ... }: -{ - meta.maintainers = [ ]; - - imports = [ - (mkFormatterModule { - name = "typstfmt"; - includes = [ - "*.typ" - "*.typst" - ]; - }) - ]; -} From 3487f6d170cebaa1bf3c8bce90559431e83a051e Mon Sep 17 00:00:00 2001 From: ryota2357 Date: Mon, 1 Dec 2025 13:35:03 +0900 Subject: [PATCH 3/5] feat(actionlint): enable support on darwin --- examples/formatter-actionlint.toml | 6 ++++++ programs/actionlint.nix | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 examples/formatter-actionlint.toml diff --git a/examples/formatter-actionlint.toml b/examples/formatter-actionlint.toml new file mode 100644 index 0000000..d921981 --- /dev/null +++ b/examples/formatter-actionlint.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.actionlint] +command = "actionlint" +excludes = [] +includes = [".github/workflows/*.yml", ".github/workflows/*.yaml"] +options = [] diff --git a/programs/actionlint.nix b/programs/actionlint.nix index bf558de..156371e 100644 --- a/programs/actionlint.nix +++ b/programs/actionlint.nix @@ -1,7 +1,6 @@ -{ lib, mkFormatterModule, ... }: +{ mkFormatterModule, ... }: { meta.maintainers = [ "katexochen" ]; - meta.brokenPlatforms = lib.platforms.darwin; imports = [ (mkFormatterModule { From 062fdb16f7861b4e94e9aad7203db3e72f8c967f Mon Sep 17 00:00:00 2001 From: ryota2357 Date: Mon, 1 Dec 2025 13:35:12 +0900 Subject: [PATCH 4/5] feat(zig): enable support on darwin --- examples/formatter-zig.toml | 6 ++++++ programs/zig.nix | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 examples/formatter-zig.toml diff --git a/examples/formatter-zig.toml b/examples/formatter-zig.toml new file mode 100644 index 0000000..54985de --- /dev/null +++ b/examples/formatter-zig.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.zig] +command = "zig" +excludes = [] +includes = ["*.zig", "*.zon"] +options = ["fmt"] diff --git a/programs/zig.nix b/programs/zig.nix index d582eeb..b147462 100644 --- a/programs/zig.nix +++ b/programs/zig.nix @@ -1,8 +1,6 @@ -{ lib, mkFormatterModule, ... }: +{ mkFormatterModule, ... }: { meta.maintainers = [ ]; - # Broken on macOS - meta.brokenPlatforms = lib.platforms.darwin; imports = [ (mkFormatterModule { From 93ed7519ea5551dc530298b43db38c0a82a0d836 Mon Sep 17 00:00:00 2001 From: ryota2357 Date: Mon, 1 Dec 2025 13:35:54 +0900 Subject: [PATCH 5/5] refactor: rename 'hostPlatform' to 'stdenv.hostPlatform' --- treefmt.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/treefmt.nix b/treefmt.nix index f4270c3..6aede47 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -4,10 +4,10 @@ settings.global.excludes = [ "*.toml" ]; programs.deadnix.enable = true; - programs.deno.enable = pkgs.hostPlatform.system != "riscv64-linux"; + programs.deno.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; programs.mdsh.enable = true; programs.nixfmt.enable = true; - programs.shellcheck.enable = pkgs.hostPlatform.system != "riscv64-linux"; - programs.shfmt.enable = pkgs.hostPlatform.system != "riscv64-linux"; + programs.shellcheck.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; + programs.shfmt.enable = pkgs.stdenv.hostPlatform.system != "riscv64-linux"; programs.yamlfmt.enable = true; }