nix-community.nixvim/flake/dev/list-plugins/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
909 B
Nix
Raw Normal View History

{ self, ... }:
{
perSystem =
{
lib,
pkgs,
...
}:
2024-12-16 14:24:06 +01:00
let
package = pkgs.writers.writePython3Bin "list-plugins" {
# Disable flake8 checks that are incompatible with the ruff ones
flakeIgnore = [
# line too long
"E501"
# line break before binary operator
"W503"
];
} (builtins.readFile ./list-plugins.py);
2024-12-16 14:24:06 +01:00
in
{
packages.list-plugins = package;
2024-12-16 14:24:06 +01:00
checks.list-plugins-test =
pkgs.runCommand "list-plugins-test"
{
nativeBuildInputs = [ package ];
}
''
list-plugins --root-path ${self} > $out
'';
devshells.default.commands = [
{
name = "list-plugins";
command = ''${lib.getExe package} "$@"'';
help = "List plugins and get implementation infos";
}
];
};
}