tried to reduce but it's not worth it and related issues being open for years gives me no confidence they will fix this. it also does not work in bun, but i've opened https://github.com/oven-sh/bun/issues/22018
14 lines
296 B
Nix
14 lines
296 B
Nix
{ pkgs, ... }:
|
|
pkgs.writeShellApplication {
|
|
name = "autofmt";
|
|
runtimeInputs = with pkgs; [
|
|
# include only a couple of formatters by default
|
|
deno
|
|
nixfmt-rfc-style
|
|
dprint
|
|
rustfmt
|
|
zig
|
|
clang-tools
|
|
];
|
|
text = ''exec ${pkgs.nodejs}/bin/node ${./autofmt.js} "$@"'';
|
|
}
|