Skip to content

Commit f67a6b1

Browse files
committed
flake/dev/diff-plugins: make a package output
Allow running from the flake lock.
1 parent ceb52ae commit f67a6b1

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

flake/dev/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{
33
imports = [
44
./devshell.nix
5+
./diff-plugins
56
./list-plugins
67
./package-tests.nix
78
./template-tests.nix

flake/dev/devshell.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@
115115
command = ''${./new-plugin.py} "$@"'';
116116
help = "Create a new plugin";
117117
}
118-
{
119-
name = "diff-plugins";
120-
command = ''${./diff-plugins.py} "$@"'';
121-
help = "Compare available plugins with another nixvim commit";
122-
}
123118
];
124119
};
125120
};

flake/dev/diff-plugins/default.nix

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
perSystem =
3+
{
4+
lib,
5+
pkgs,
6+
...
7+
}:
8+
let
9+
package = pkgs.writers.writePython3Bin "diff-plugins" {
10+
# Disable flake8 checks that are incompatible with the ruff ones
11+
flakeIgnore = [
12+
# Thinks shebang is a block comment
13+
"E265"
14+
# line too long
15+
"E501"
16+
];
17+
} (builtins.readFile ./diff-plugins.py);
18+
in
19+
{
20+
packages.diff-plugins = package;
21+
22+
devshells.default.commands = [
23+
{
24+
name = "diff-plugins";
25+
command = ''${lib.getExe package} "$@"'';
26+
help = "Compare available plugins with another nixvim commit";
27+
}
28+
];
29+
};
30+
}
File renamed without changes.

0 commit comments

Comments
 (0)