-
-
Notifications
You must be signed in to change notification settings - Fork 142
/
flake.nix
69 lines (64 loc) · 1.68 KB
/
flake.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
63
64
65
66
67
68
69
# I have no idea what I'm writing.
{
description = "rest.nvim: A fast Neovim http client written in Lua";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
neorocks.url = "github:nvim-neorocks/neorocks";
flake-utils.url = "github:numtide/flake-utils";
cats-doc.url = "github:mrcjkb/vimcats";
};
outputs = inputs @ {
self,
nixpkgs,
neorocks,
flake-utils,
...
}: let
test-overlay = import ./nix/test-overlay.nix {
inherit self inputs;
};
in
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
neorocks.overlays.default
test-overlay
];
};
devShell = pkgs.mkShell {
name = "rest.nvim devShell";
shellHook = ''
export LUA_PATH="$(luarocks path --lr-path --lua-version 5.1 --local)"
export LUA_CPATH="$(luarocks path --lr-cpath --lua-version 5.1 --local)"
'';
buildInputs = [
pkgs.sumneko-lua-language-server
pkgs.stylua
pkgs.docgen
(pkgs.lua5_1.withPackages (ps: with ps; [luarocks luacheck]))
];
};
in
{
packages = {
default = self.packages.${system}.luarocks-51;
luarocks-51 = pkgs.lua51Packages.luarocks;
inherit
(pkgs)
docgen
;
};
devShells = {
default = devShell;
inherit devShell;
};
checks = {
neorocks-test = pkgs.neorocksTest {
src = self;
name = "rest.nvim";
};
};
});
}