Merge pull request #108093 from mjlbach/init_sumneko_lua

This commit is contained in:
Sandro 2021-01-11 02:19:52 +01:00 committed by GitHub
commit e9bebb34e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,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;
};
}

View File

@ -28842,6 +28842,8 @@ in
sqsh = callPackage ../development/tools/sqsh { }; sqsh = callPackage ../development/tools/sqsh { };
sumneko-lua-language-server = callPackage ../development/tools/sumneko-lua-language-server { };
go-swag = callPackage ../development/tools/go-swag { }; go-swag = callPackage ../development/tools/go-swag { };
go-swagger = callPackage ../development/tools/go-swagger { }; go-swagger = callPackage ../development/tools/go-swagger { };