mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
36 lines
737 B
Nix
36 lines
737 B
Nix
{
|
|
self,
|
|
lib,
|
|
inputs,
|
|
...
|
|
}: {
|
|
perSystem = {
|
|
config,
|
|
self',
|
|
inputs',
|
|
pkgs,
|
|
...
|
|
}: {
|
|
checks = {
|
|
pre-commit-check = inputs.pre-commit-hooks.lib.${pkgs.system}.run {
|
|
src = ../../.;
|
|
hooks = {
|
|
treefmt = {
|
|
enable = true;
|
|
name = "treefmt";
|
|
pass_filenames = false;
|
|
entry = toString (pkgs.writeScript "treefmt" ''
|
|
#!${pkgs.bash}/bin/bash
|
|
export PATH="$PATH:${lib.makeBinPath [
|
|
pkgs.alejandra
|
|
pkgs.python3.pkgs.black
|
|
]}"
|
|
${pkgs.treefmt}/bin/treefmt --clear-cache --fail-on-change
|
|
'');
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|