diff options
Diffstat (limited to 'pkgs/development/tools/language-servers/lua-language-server/default.nix')
-rw-r--r-- | pkgs/development/tools/language-servers/lua-language-server/default.nix | 70 |
1 files changed, 43 insertions, 27 deletions
diff --git a/pkgs/development/tools/language-servers/lua-language-server/default.nix b/pkgs/development/tools/language-servers/lua-language-server/default.nix index f20ed09ac6967..8bdcd20cdb53b 100644 --- a/pkgs/development/tools/language-servers/lua-language-server/default.nix +++ b/pkgs/development/tools/language-servers/lua-language-server/default.nix @@ -1,14 +1,24 @@ -{ lib, stdenv, fetchFromGitHub, ninja, makeWrapper, CoreFoundation, Foundation, ditto }: +{ + lib, + stdenv, + fetchFromGitHub, + ninja, + makeWrapper, + CoreFoundation, + Foundation, + ditto, + nix-update-script, +}: stdenv.mkDerivation (finalAttrs: { pname = "lua-language-server"; - version = "3.8.3"; + version = "3.9.3"; src = fetchFromGitHub { owner = "luals"; repo = "lua-language-server"; rev = finalAttrs.version; - hash = "sha256-Zl57KmsAuyMWbcKnU19m7ljox/LqWsa6gXbjaWiznfg="; + hash = "sha256-o3NRiJF9Cl420TYOZXC3JplKW5MYo/6nc0XPdukaly4="; fetchSubmodules = true; }; @@ -23,29 +33,29 @@ stdenv.mkDerivation (finalAttrs: { ditto ]; - 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 - # find all c++ compiler statements and replace $cc (which expands to - # clang) with clang++. - sed -i compile/ninja/macos.ninja \ - -e '/c++/s,$cc,clang++,' \ - -e '/test.lua/s,= .*,= true,' \ - -e '/ldl/s,$cc,clang++,' - sed -i scripts/compiler/gcc.lua \ - -e '/cxx_/s,$cc,clang++,' - ''; + 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 - ninjaFlags = [ - "-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja" - ]; + 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 + # find all c++ compiler statements and replace $cc (which expands to + # clang) with clang++. + sed -i compile/ninja/macos.ninja \ + -e '/c++/s,$cc,clang++,' \ + -e '/test.lua/s,= .*,= true,' \ + -e '/ldl/s,$cc,clang++,' + sed -i scripts/compiler/gcc.lua \ + -e '/cxx_/s,$cc,clang++,' + ''; + + ninjaFlags = [ "-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja" ]; postBuild = '' popd @@ -75,12 +85,18 @@ stdenv.mkDerivation (finalAttrs: { # some tests require local networking __darwinAllowLocalNetworking = true; + passthru.updateScript = nix-update-script { }; + meta = with lib; { - description = "A language server that offers Lua language support"; + description = "Language server that offers Lua language support"; homepage = "https://github.com/luals/lua-language-server"; changelog = "https://github.com/LuaLS/lua-language-server/blob/${finalAttrs.version}/changelog.md"; license = licenses.mit; - maintainers = with maintainers; [ figsoda gepbird sei40kr ]; + maintainers = with maintainers; [ + figsoda + gepbird + sei40kr + ]; mainProgram = "lua-language-server"; platforms = platforms.linux ++ platforms.darwin; }; |