generated from mrcjkb/nix-flake-github-ci-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathci-overlay.nix
executable file
·62 lines (57 loc) · 1.28 KB
/
ci-overlay.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Add flake.nix test inputs as arguments here
{
self,
plugin-name,
}: final: prev:
with final.lib;
with final.stdenv; let
nvim-nightly = final.neovim-nightly;
mkNeorocksTest = {
name,
nvim ? final.neovim-unwrapped,
extraPkgs ? [],
}: let
nvim-wrapped = final.pkgs.wrapNeovim nvim {
configure = {
packages.myVimPackage = {
start = [
# Add plugin dependencies that aren't on LuaRocks here
];
};
};
};
in
final.pkgs.neorocksTest {
inherit name;
pname = plugin-name;
src = self;
neovim = nvim-wrapped;
# luaPackages = ps: with ps; [];
# extraPackages = [];
preCheck = ''
export HOME=$(realpath .)
'';
buildPhase = ''
mkdir -p $out
cp -r tests $out
'';
};
docgen = final.writeShellApplication {
name = "docgen";
runtimeInputs = with final; [
lemmy-help
];
text = ''
mkdir -p doc
# TODO: Update this!
lemmy-help lua/rocks/{init,commands,config/init}.lua > doc/nvim-plugin.txt
'';
};
in {
nvim-stable-tests = mkNeorocksTest {name = "neovim-stable-tests";};
nvim-nightly-tests = mkNeorocksTest {
name = "neovim-nightly-tests";
nvim = nvim-nightly;
};
inherit docgen;
}