nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 versionCheckHook,
6 nix-update-script,
7}:
8rustPlatform.buildRustPackage (finalAttrs: {
9 pname = "emmylua_ls";
10 version = "0.19.0";
11
12 src = fetchFromGitHub {
13 owner = "EmmyLuaLs";
14 repo = "emmylua-analyzer-rust";
15 tag = finalAttrs.version;
16 hash = "sha256-bdvJInMuWJq7MZa+4wrKBn0myLTHCayhDAhB8Stjp6A=";
17 };
18
19 buildAndTestSubdir = "crates/emmylua_ls";
20
21 cargoHash = "sha256-bF6bdTbcHDecj+wVoNsaKBzsz96d3vo6cqp5MjSbT4E=";
22
23 nativeInstallCheckInputs = [
24 versionCheckHook
25 ];
26 versionCheckProgram = "${placeholder "out"}/bin/emmylua_ls";
27 doInstallCheck = true;
28
29 passthru = {
30 updateScript = nix-update-script { };
31 };
32
33 meta = {
34 description = "EmmyLua Language Server";
35 homepage = "https://github.com/EmmyLuaLs/emmylua-analyzer-rust";
36 changelog = "https://github.com/EmmyLuaLs/emmylua-analyzer-rust/blob/${finalAttrs.src.tag}/CHANGELOG.md";
37 license = lib.licenses.mit;
38 maintainers = with lib.maintainers; [
39 mrcjkb
40 ];
41 platforms = lib.platforms.all;
42 mainProgram = "emmylua_ls";
43 };
44})