From 751694df63b34946e1a79d379eac8c35ba40eed1 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Fri, 16 Sep 2022 15:13:19 +0300 Subject: 2022-09-16 --- flake.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 5fd0fb5..68f66d2 100644 --- a/flake.nix +++ b/flake.nix @@ -259,8 +259,14 @@ inherit (self.checks.${system}.preCommit) shellHook; }; - # Very opinionated but works fast and doesn't get in a way like nixfmt. - formatter = pkgs.alejandra; + # This interface is very primitive... + formatter = pkgs.writeShellApplication { + name = "fmt"; + runtimeInputs = with pkgs; [alejandra]; + text = '' + alejandra --quiet "$@" + ''; + }; checks.preCommit = pre-commit-hooks.lib.${system}.run { src = ./.; -- cgit v1.2.3