Files
nixpkgs/pkgs/by-name/lu/luau-lsp/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.7 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
versionCheckHook,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "luau-lsp";
version = "1.54.0";
src = fetchFromGitHub {
owner = "JohnnyMorganz";
repo = "luau-lsp";
tag = finalAttrs.version;
hash = "sha256-18r/NScWfSwAvFT46zdJsNYXoEW8FF34XyZajAaGb28=";
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"
];
};
})