git-hooks.nix
git-hooks.nix copied to clipboard
`dart-analyze`: fails when dependencies from pubspec.yaml need to be used
I'm currently working on a project of mine which makes use of ansix, which was added to the pubspec.yaml file. Running the dart analyze works, but enabling dart-analyze and running nix flake check fails.
Here are the checks:
{
inputs,
pkgs,
...
}: {
pre-commit-check = inputs.git-hooks-nix.lib.${pkgs.system}.run {
src = ../.;
hooks = {
# nix
alejandra.enable = true;
deadnix.enable = true;
nil.enable = true;
statix.enable = true;
# dart
dart-analyze.enable = true;
dart-format.enable = true;
# markdown
markdownlint = {
enable = true;
settings.configuration = {
line-length.tables = false;
no-inline-html = false;
};
};
};
};
}