blob: 0458d58854307c57576060b56bafef28236779e0 (
plain)
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
|
{ stdenv
, clang-tools
, bmake
, pkg-config
, tree-sitter
, tree-sitter-grammars
, bear
, lib
, doxygen
, valgrind
, linkFarm
, fetchFromGitHub
}:
stdenv.mkDerivation {
name = "dged";
src = ./.;
doCheck = true;
nativeBuildInputs = [
bmake
pkg-config
clang-tools
bear
doxygen
valgrind
];
buildPhase = ''
bmake build
CFLAGS=-O2 bmake dged
bmake docs
'';
TREESITTER_GRAMMARS = with tree-sitter-grammars;
linkFarm "tree-sitter-grammars" {
"bash" = tree-sitter-bash;
"c" = tree-sitter-c;
"rust" = tree-sitter-rust;
"nix" = tree-sitter-nix;
"python" = tree-sitter-python;
"make" = tree-sitter-make;
"qmljs" = tree-sitter.buildGrammar {
language = "qmljs";
version = "0.1.2";
src = fetchFromGitHub {
owner = "yuja";
repo = "tree-sitter-qmljs";
rev = "master";
hash = "sha256-q20gLVLs0LpqRpgo/qNRDfExbWXhICWZjM1ux4+AT6M=";
};
};
"gitcommit" = tree-sitter.buildGrammar {
language = "gitcommit";
version = "0.3.3";
src = fetchFromGitHub {
owner = "gbprod";
repo = "tree-sitter-gitcommit";
rev = "v0.3.3";
hash = "sha256-L3v+dQZhwC+kBOHf3YVbZjuCU+idbUDByEdUBmeGAlo=";
};
};
};
installPhase = ''
bmake install
'';
buildInputs = [
tree-sitter
];
}
|