From 1b31d43bdca9e5aefcc703518ca2e866a45d337d Mon Sep 17 00:00:00 2001 From: genga Date: Sun, 10 Nov 2024 22:42:33 +0300 Subject: [PATCH] twig-language-server: init at 0.5.1 twig-language-server: update twig-language-server: add license twig-language-server: update installPhase twig-language-server: update repo --- .../tw/twig-language-server/package.nix | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/tw/twig-language-server/package.nix diff --git a/pkgs/by-name/tw/twig-language-server/package.nix b/pkgs/by-name/tw/twig-language-server/package.nix new file mode 100644 index 000000000000..6be0f51ad55c --- /dev/null +++ b/pkgs/by-name/tw/twig-language-server/package.nix @@ -0,0 +1,39 @@ +{ + lib, + fetchFromGitHub, + buildNpmPackage, + nodejs, +}: + +buildNpmPackage rec { + pname = "twig-language-server"; + version = "0.5.1"; + + src = fetchFromGitHub { + owner = "kaermorchen"; + repo = "twig-language-server"; + rev = "refs/tags/v${version}"; + hash = "sha256-bW0siZudzqk/4XgVH6nNCOrpJ6WHTCZoHJC+aXnE5mM="; + }; + + npmDepsHash = "sha256-zbMjfdIXQf6oz6em0vkyvroijCb2MUioZjvZjkbuKc8="; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,lib} + cp -R node_modules packages $out/lib + makeWrapper ${lib.getExe nodejs} $out/bin/twig-language-server \ + --inherit-argv0 \ + --prefix NODE_PATH : $out/lib/node_modules \ + --add-flags $out/lib/packages/language-server/out/index.js + runHook postInstall + ''; + meta = { + description = "Language server for Twig templates"; + homepage = "https://github.com/kaermorchen/twig-language-server"; + changelog = "https://github.com/kaermorchen/twig-language-server/releases/tag/v${version}"; + license = lib.licenses.mpl20; + maintainers = with lib.maintainers; [ genga898 ]; + mainProgram = "twig-language-server"; + }; +}