2025-02-22 16:02:13 +00:00
|
|
|
{ self, ... }:
|
2024-12-16 13:42:46 +01:00
|
|
|
{
|
|
|
|
perSystem =
|
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-16 14:24:06 +01:00
|
|
|
let
|
|
|
|
package = pkgs.writers.writePython3Bin "list-plugins" {
|
2024-12-16 13:42:46 +01:00
|
|
|
# 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-17 07:55:36 +01:00
|
|
|
|
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
|
|
|
|
'';
|
2024-12-16 13:42:46 +01:00
|
|
|
|
|
|
|
devshells.default.commands = [
|
|
|
|
{
|
|
|
|
name = "list-plugins";
|
2024-12-17 07:55:36 +01:00
|
|
|
command = ''${lib.getExe package} "$@"'';
|
2024-12-16 13:42:46 +01:00
|
|
|
help = "List plugins and get implementation infos";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|