treefmt need not be in shell PATH

This commit is contained in:
Sridhar Ratnakumar 2022-12-19 08:58:06 -05:00
parent ec7db3ca04
commit fb9634b22b
2 changed files with 5 additions and 10 deletions

View file

@ -21,7 +21,7 @@ For details, see: https://srid.ca/haskell-template/start
- Run `nix flake update` to update all flake inputs.
- Run `nix --option sandbox false build .#check -L` to run the flake checks.
- Run `treefmt` in nix shell to autoformat the project. This uses [treefmt](https://github.com/numtide/treefmt), which uses `./treefmt.toml` (where fourmolu and nixpkgs-fmt are specified).
- Run `, fmt` in nix shell to autoformat the project. This uses [treefmt](https://github.com/numtide/treefmt), which uses `./treefmt.toml` (where fourmolu and nixpkgs-fmt are specified).
- Run `, docs` to start Hoogle with packages in your cabal file.
- Run the application without installing: `nix run github:srid/haskell-template` (or `nix run .` from checkout)
- Common workflows

View file

@ -22,10 +22,7 @@
packages = {
haskell-template.root = ./.;
};
buildTools = hp: {
inherit (pkgs)
treefmt;
} // config.treefmt.formatters;
buildTools = hp: { } // config.treefmt.formatters;
# overrides = self: super: {}
hlsCheck.enable = true;
hlintCheck.enable = true;
@ -54,9 +51,9 @@
category = "Dev Tools";
};
fmt = {
description = "Auto-format the source tree";
command = "treefmt";
category = "Dev Tools";
description = "Format the source tree";
command = "${lib.getExe pkgs.treefmt}";
category = "Dev Tools ";
};
run = {
description = "Run the project with ghcid auto-recompile";
@ -72,5 +69,3 @@
};
};
}