-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
89 lines (73 loc) · 1.85 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
78
79
80
81
82
83
84
85
86
87
88
89
{
description = "VsCoq 2, a language server for Coq based on LSP";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
coq-8_18 = {
type = "github";
owner = "coq";
repo = "coq";
ref = "V8.18+rc1";
};
coq-8_18.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, coq-8_18 }:
flake-utils.lib.eachDefaultSystem (system:
let coq = coq-8_18.defaultPackage.${system}; in
rec {
packages.default = self.packages.${system}.vscoq-language-server;
packages.vscoq-language-server =
# Notice the reference to nixpkgs here.
with import nixpkgs { inherit system; };
ocamlPackages.buildDunePackage {
duneVersion = "3";
pname = "vscoq-language-server";
version = "1.9.3";
src = ./language-server;
buildInputs = [
coq
bash
hostname
python3
time
dune_3
] ++ (with ocamlPackages; [
lablgtk3-sourceview3
glib
gnome.adwaita-icon-theme
wrapGAppsHook
ocaml
yojson
zarith
findlib
ppx_inline_test
ppx_assert
ppx_sexp_conv
ppx_deriving
ppx_import
sexplib
ppx_yojson_conv
lsp
sel
]);
};
packages.vscoq-client =
with import nixpkgs { inherit system; };
stdenv.mkDerivation rec {
name = "vscoq-client";
src = ./client;
buildInputs = [
nodejs
yarn
];
};
devShells.default =
with import nixpkgs { inherit system; };
mkShell {
buildInputs =
self.packages.${system}.vscoq-language-server.buildInputs
++ (with ocamlPackages; [
ocaml-lsp
]);
};
});
}