dev/list-plugins: add flake check

This commit is contained in:
Gaetan Lepage 2024-12-16 14:24:06 +01:00
parent 12db5eaf8a
commit ad87ec831b

View file

@ -1,6 +1,8 @@
{ self, ... }:
{
perSystem =
{
self',
config,
lib,
inputs',
@ -8,8 +10,8 @@
pkgs,
...
}:
{
packages.list-plugins = pkgs.writers.writePython3Bin "list-plugins" {
let
package = pkgs.writers.writePython3Bin "list-plugins" {
# Disable flake8 checks that are incompatible with the ruff ones
flakeIgnore = [
# line too long
@ -18,6 +20,17 @@
"W503"
];
} (builtins.readFile ./list-plugins.py);
in
{
packages.list-plugins = package;
checks.list-plugins-test =
pkgs.runCommand "list-plugins-test"
{
nativeBuildInputs = [ package ];
}
''
list-plugins --root-path ${self} > $out
'';
devshells.default.commands = [
{