blob: 05281f1bb83c202aea80c33cce565ae4449736cf (
plain) (
blame)
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
|
{ stdenv, fetchFromGitHub, ninja, makeWrapper }:
stdenv.mkDerivation rec {
pname = "sumneko-lua-language-server";
version = "1.11.2";
src = fetchFromGitHub {
owner = "sumneko";
repo = "lua-language-server";
rev = version;
sha256 = "1cnzwfqmzlzi6797l37arhhx2l6wsvs3jjgxdxwdbgq3rfz1ncr8";
fetchSubmodules = true;
};
nativeBuildInputs = [
ninja
makeWrapper
];
preBuild = ''
cd 3rd/luamake
'';
ninjaFlags = [
"-f ninja/linux.ninja"
];
postBuild = ''
cd ../..
./3rd/luamake/luamake rebuild
'';
installPhase = ''
mkdir -p $out/bin $out/extras
cp -r ./{locale,meta,script,*.lua} $out/extras/
cp ./bin/Linux/{bee.so,lpeglabel.so} $out/extras
cp ./bin/Linux/lua-language-server $out/extras/.lua-language-server-unwrapped
makeWrapper $out/extras/.lua-language-server-unwrapped \
$out/bin/lua-language-server \
--add-flags "-E $out/extras/main.lua \
--logpath='~/.cache/sumneko_lua/log' \
--metapath='~/.cache/sumneko_lua/meta'"
'';
meta = with stdenv.lib; {
description = "Lua Language Server coded by Lua ";
homepage = "https://github.com/sumneko/lua-language-server";
license = licenses.mit;
maintainers = with maintainers; [ mjlbach ];
platforms = platforms.linux;
};
}
|