556d6f0562
GitOrigin-RevId: e4ef597edfd8a0ba5f12362932fc9b1dd01a0aef
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, ninja, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sumneko-lua-language-server";
|
|
version = "2.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sumneko";
|
|
repo = "lua-language-server";
|
|
rev = version;
|
|
sha256 = "sha256-PYlHjKMnqnhAJAvmHbH6Bb+qOyNzDH+ewOkXkj2u4CU=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
ninja
|
|
makeWrapper
|
|
];
|
|
|
|
preBuild = ''
|
|
cd 3rd/luamake
|
|
'';
|
|
|
|
ninjaFlags = [
|
|
"-fcompile/ninja/linux.ninja"
|
|
];
|
|
|
|
postBuild = ''
|
|
cd ../..
|
|
./3rd/luamake/luamake rebuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dt "$out"/share/lua-language-server/bin/Linux bin/Linux/lua-language-server
|
|
install -m644 -t "$out"/share/lua-language-server/bin/Linux bin/Linux/*.*
|
|
install -m644 -t "$out"/share/lua-language-server {debugger,main}.lua
|
|
cp -r locale meta script "$out"/share/lua-language-server
|
|
|
|
makeWrapper "$out"/share/lua-language-server/bin/Linux/lua-language-server \
|
|
$out/bin/lua-language-server \
|
|
--add-flags "-E $out/share/lua-language-server/main.lua \
|
|
--logpath='~/.cache/sumneko_lua/log' \
|
|
--metapath='~/.cache/sumneko_lua/meta'"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with 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;
|
|
mainProgram = "lua-language-server";
|
|
};
|
|
}
|