mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
dev/list-plugins: make it a proper package
This commit is contained in:
parent
0fb43cbfb6
commit
bc3b99c4d9
4 changed files with 34 additions and 8 deletions
|
@ -1,7 +1,10 @@
|
||||||
{ lib, inputs, ... }:
|
{ lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ ./devshell.nix ]
|
[
|
||||||
|
./devshell.nix
|
||||||
|
./list-plugins
|
||||||
|
]
|
||||||
++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule
|
++ lib.optional (inputs.git-hooks ? flakeModule) inputs.git-hooks.flakeModule
|
||||||
++ lib.optional (inputs.treefmt-nix ? flakeModule) inputs.treefmt-nix.flakeModule;
|
++ lib.optional (inputs.treefmt-nix ? flakeModule) inputs.treefmt-nix.flakeModule;
|
||||||
|
|
||||||
|
|
|
@ -106,11 +106,6 @@
|
||||||
(cd "$doc_derivation"/share/doc && ${pkgs.lib.getExe pkgs.python3} ${./server.py})
|
(cd "$doc_derivation"/share/doc && ${pkgs.lib.getExe pkgs.python3} ${./server.py})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "list-plugins";
|
|
||||||
command = ''${pkgs.python3.interpreter} ${./list-plugins.py} "$@"'';
|
|
||||||
help = "List plugins and get implementation infos";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "locate-lsp-packages";
|
name = "locate-lsp-packages";
|
||||||
command = ''${pkgs.python3.interpreter} ${./locate-lsp-packages.py}'';
|
command = ''${pkgs.python3.interpreter} ${./locate-lsp-packages.py}'';
|
||||||
|
|
30
flake-modules/dev/list-plugins/default.nix
Normal file
30
flake-modules/dev/list-plugins/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs',
|
||||||
|
system,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
packages.list-plugins = 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);
|
||||||
|
|
||||||
|
devshells.default.commands = [
|
||||||
|
{
|
||||||
|
name = "list-plugins";
|
||||||
|
command = ''${lib.getExe config.packages.list-plugins} "$@"'';
|
||||||
|
help = "List plugins and get implementation infos";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,3 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import re
|
import re
|
||||||
from argparse import ArgumentParser, RawTextHelpFormatter
|
from argparse import ArgumentParser, RawTextHelpFormatter
|
Loading…
Add table
Add a link
Reference in a new issue