-
-
Notifications
You must be signed in to change notification settings - Fork 145
/
Copy pathflake.nix
77 lines (74 loc) · 2.04 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
70
71
72
73
74
75
76
77
# 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-parts.url = "github:hercules-ci/flake-parts";
vimcats.url = "github:mrcjkb/vimcats";
};
outputs = inputs @ {
self,
nixpkgs,
neorocks,
flake-parts,
...
}: let
name = "rest.nvim";
plugin-overlay = import ./nix/plugin-overlay.nix {
inherit self;
};
test-overlay = import ./nix/test-overlay.nix {
inherit self inputs;
};
in
flake-parts.lib.mkFlake {inherit inputs;} {
systems = builtins.attrNames nixpkgs.legacyPackages;
perSystem = attrs @ {
system,
...
}: let
pkgs = import nixpkgs {
inherit system;
overlays = [
neorocks.overlays.default
test-overlay
plugin-overlay
];
};
in {
packages = {
default = self.packages.${system}.luarocks-51;
luarocks-51 = pkgs.lua51Packages.luarocks;
inherit
(pkgs)
docgen
sync-readme
;
};
devShells.default = 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)"
export TREE_SITTER_HTTP_PLUGIN_DIR=${pkgs.tree-sitter-http-plugin}
export REST_NVIM_PLUGIN_DIR=${pkgs.rest-nvim-dev}
'';
buildInputs = [
pkgs.sumneko-lua-language-server
pkgs.stylua
pkgs.docgen
pkgs.sync-readme
(pkgs.lua5_1.withPackages (ps: with ps; [luarocks luacheck]))
];
};
checks = {
inherit
(pkgs)
integration-stable
integration-nightly
;
};
};
};
}