1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

Merge pull request #215057 from figsoda/luals

lua-language-server: rename from sumneko-lua-language-server, 3.6.7 -> 3.6.10, add figsoda as a maintainer
This commit is contained in:
Weijia Wang 2023-02-07 06:42:15 +01:00 committed by GitHub
commit 90f2c68e51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 27 deletions

View file

@ -1,6 +1,6 @@
{ lib
, vscode-utils
, sumneko-lua-language-server
, lua-language-server
}:
vscode-utils.buildVscodeMarketplaceExtension {
@ -14,7 +14,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
patches = [ ./remove-chmod.patch ];
postInstall = ''
ln -sf ${sumneko-lua-language-server}/bin/lua-language-server \
ln -sf ${lua-language-server}/bin/lua-language-server \
$out/$installPrefix/server/bin/lua-language-server
'';

View file

@ -1,16 +1,14 @@
{ lib, stdenv, fetchFromGitHub, ninja, makeWrapper, CoreFoundation, Foundation }:
let
target = if stdenv.isDarwin then "macOS" else "Linux";
in
stdenv.mkDerivation rec {
pname = "sumneko-lua-language-server";
version = "3.6.7";
pname = "lua-language-server";
version = "3.6.10";
src = fetchFromGitHub {
owner = "sumneko";
owner = "luals";
repo = "lua-language-server";
rev = version;
sha256 = "sha256-x7/yO1rJ+VBG4EFpISYblRECLW2lsLz5wcqLR14UV/g=";
sha256 = "sha256-QnkWEf1Uv+CZwEyv1b3WMPvaOZEn+mKH5w3CPyw02CQ=";
fetchSubmodules = true;
};
@ -24,12 +22,13 @@ stdenv.mkDerivation rec {
Foundation
];
preBuild = ''
cd 3rd/luamake
''
+ lib.optionalString stdenv.isDarwin ''
# Needed for the test
export HOME=/var/empty
postPatch = ''
# filewatch tests are failing on darwin
# this feature is not used in lua-language-server
sed -i /filewatch/d 3rd/bee.lua/test/test.lua
pushd 3rd/luamake
'' + lib.optionalString stdenv.isDarwin ''
# This package uses the program clang for C and C++ files. The language
# is selected via the command line argument -std, but this do not work
# in combination with the nixpkgs clang wrapper. Therefor we have to
@ -44,11 +43,11 @@ stdenv.mkDerivation rec {
'';
ninjaFlags = [
"-fcompile/ninja/${lib.toLower target}.ninja"
"-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja"
];
postBuild = ''
cd ../..
popd
./3rd/luamake/luamake rebuild
'';
@ -66,18 +65,20 @@ stdenv.mkDerivation rec {
makeWrapper "$out"/share/lua-language-server/bin/lua-language-server \
$out/bin/lua-language-server \
--add-flags "-E $out/share/lua-language-server/main.lua \
--logpath=\''${XDG_CACHE_HOME:-\$HOME/.cache}/sumneko_lua/log \
--metapath=\''${XDG_CACHE_HOME:-\$HOME/.cache}/sumneko_lua/meta"
--logpath=\''${XDG_CACHE_HOME:-\$HOME/.cache}/lua-language-server/log \
--metapath=\''${XDG_CACHE_HOME:-\$HOME/.cache}/lua-language-server/meta"
runHook postInstall
'';
# some tests require local networking
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "Lua Language Server coded by Lua";
homepage = "https://github.com/sumneko/lua-language-server";
description = "A language server that offers Lua language support";
homepage = "https://github.com/luals/lua-language-server";
license = licenses.mit;
maintainers = with maintainers; [ sei40kr ];
maintainers = with maintainers; [ figsoda sei40kr ];
platforms = platforms.linux ++ platforms.darwin;
mainProgram = "lua-language-server";
};
}

View file

@ -1471,6 +1471,7 @@ mapAliases ({
subversion_1_10 = throw "subversion_1_10 has been removed as it has reached its end of life"; # Added 2022-04-26
subversion19 = throw "subversion19 has been removed as it has reached its end of life"; # Added 2021-03-31
sudolikeaboss = throw "sudolikeaboss is no longer maintained by upstream"; # Added 2022-04-16
sumneko-lua-language-server = lua-language-server; # Added 2023-02-07
sundials_3 = throw "sundials_3 was removed in 2020-02. outdated and no longer needed";
surf-webkit2 = throw "'surf-webkit2' has been renamed to/replaced by 'surf'"; # Converted to throw 2022-02-22
swec = throw "swec has been removed; broken and abandoned upstream"; # Added 2021-10-14

View file

@ -16977,6 +16977,10 @@ with pkgs;
kotlin-language-server = callPackage ../development/tools/language-servers/kotlin-language-server { };
lua-language-server = darwin.apple_sdk_11_0.callPackage ../development/tools/language-servers/lua-language-server {
inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Foundation;
};
metals = callPackage ../development/tools/language-servers/metals { };
millet = callPackage ../development/tools/language-servers/millet { };
@ -16985,10 +16989,6 @@ with pkgs;
rnix-lsp = callPackage ../development/tools/language-servers/rnix-lsp { };
sumneko-lua-language-server = darwin.apple_sdk_11_0.callPackage ../development/tools/language-servers/sumneko-lua-language-server {
inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation Foundation;
};
svls = callPackage ../development/tools/language-servers/svls { };
vala-language-server = callPackage ../development/tools/language-servers/vala-language-server { };