Hi,
in https://flake-file.oeiuwq.com/guides/hooks/, examples hooks use exec option. It doesn't exists. It's now program.
The examples should be:
{ lib, pkgs, ... }: {
flake-file.write-hooks = [
{
index = 10;
program = pkgs: pkgs.writeShellApplication {
name = "flake-update";
text = "${lib.meta.getExe pkgs.nix} flake update";
};
}
];
}
And:
{ pkgs, ... }: {
flake-file.check-hooks = [
{
index = 10;
program = pkgs: pkgs.writeShellApplication {
name = "my-linter-check";
text = "${lib.meta.getExe pkgs.my-linter} --check .";
};
}
];
}
For beginners sake, It would be nice to use real linter examples:
{ lib, pkgs, ... }: {
flake-file.check-hooks = [
{
index = 10;
program =
pkgs:
pkgs.writeShellApplication {
name = "nil-diagnostics";
text = ''
shopt -s globstar
flake_path="''${1}"
${lib.meta.getExe pkgs.nil} diagnostics --deny-warnings "''${flake_path}/"**/*.nix
'';
};
}
{
index = 20;
program = pkgs: pkgs.writeShellApplication {
name = "statix-check";
text = "${lib.meta.getExe pkgs.statix} check";
};
}
];
}
Thank you for your work.
Hi,
in https://flake-file.oeiuwq.com/guides/hooks/, examples hooks use
execoption. It doesn't exists. It's nowprogram.The examples should be:
And:
For beginners sake, It would be nice to use real linter examples:
Thank you for your work.