From 3b9e637936647e94d0c277061cbfd37c235e47e4 Mon Sep 17 00:00:00 2001 From: Anninzy <143312793+Anninzy@users.noreply.github.com> Date: Fri, 4 Apr 2025 01:02:13 +0000 Subject: [PATCH 1/3] maintainers: add anninzy --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 53ec3bcfebd4..c4af4d68136d 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1689,6 +1689,11 @@ githubId = 81317317; name = "Anna Aurora"; }; + anninzy = { + github = "anninzy"; + githubId = 143312793; + name = "Annin"; + }; anoa = { matrix = "@andrewm:amorgan.xyz"; email = "andrew@amorgan.xyz"; From 3ac12307ee2210ae3af7fcfbe2c5a3e438703ae0 Mon Sep 17 00:00:00 2001 From: Anninzy <143312793+Anninzy@users.noreply.github.com> Date: Fri, 4 Apr 2025 00:33:25 +0000 Subject: [PATCH 2/3] luau-lsp: init at 1.45.0 --- pkgs/by-name/lu/luau-lsp/package.nix | 70 ++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 pkgs/by-name/lu/luau-lsp/package.nix diff --git a/pkgs/by-name/lu/luau-lsp/package.nix b/pkgs/by-name/lu/luau-lsp/package.nix new file mode 100644 index 000000000000..535357f6d2b6 --- /dev/null +++ b/pkgs/by-name/lu/luau-lsp/package.nix @@ -0,0 +1,70 @@ +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + versionCheckHook, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "luau-lsp"; + version = "1.45.0"; + + src = fetchFromGitHub { + owner = "JohnnyMorganz"; + repo = "luau-lsp"; + tag = finalAttrs.version; + hash = "sha256-OJAjTy0vTRb43TTiPeXafWq4kjIpnDXoTprVzbMnaWQ="; + fetchSubmodules = true; + }; + + NIX_CFLAGS_COMPILE = "-Wno-error"; + + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ + (lib.cmakeFeature "CMAKE_OSX_ARCHITECTURES" stdenv.hostPlatform.darwinArch) + ]; + + nativeBuildInputs = [ cmake ]; + + buildPhase = '' + runHook preBuild + + cmake --build . --target Luau.LanguageServer.CLI --config Release + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + install -D luau-lsp $out/bin/luau-lsp + + runHook postInstall + ''; + + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Language Server Implementation for Luau"; + homepage = "https://github.com/JohnnyMorganz/luau-lsp"; + downloadPage = "https://github.com/JohnnyMorganz/luau-lsp/releases/tag/${finalAttrs.version}"; + changelog = "https://github.com/JohnnyMorganz/luau-lsp/blob/${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + anninzy + HeitorAugustoLN + ]; + mainProgram = "luau-lsp"; + platforms = lib.platforms.all; + badPlatforms = [ + # Could not find a package configuration file provided by "Protobuf" + # It is unclear why this is only happening on x86_64-darwin + "x86_64-darwin" + ]; + }; +}) From 5f15206805586bf3346b0f606f3106470655951e Mon Sep 17 00:00:00 2001 From: Anninzy <143312793+Anninzy@users.noreply.github.com> Date: Tue, 6 May 2025 21:37:29 +0100 Subject: [PATCH 3/3] vimPlugins.luau-lsp-nvim: add luau-lsp to runtimeDeps --- pkgs/applications/editors/vim/plugins/overrides.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 2a4cc0736da4..eed2ed3c52c8 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -118,6 +118,8 @@ # typst-preview dependencies tinymist, websocat, + # luau-lsp-nvim dependencies + luau-lsp, }: self: super: let @@ -1690,9 +1692,7 @@ in luau-lsp-nvim = super.luau-lsp-nvim.overrideAttrs { dependencies = [ self.plenary-nvim ]; - - # TODO: add luau-lsp to nixpkgs (#395892) - # runtimeDeps = [ luau-lsp ]; + runtimeDeps = [ luau-lsp ]; }; magma-nvim = super.magma-nvim.overrideAttrs {