blob: b17a109e656f7dd694752692eac2024c962fad47 (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{
lib,
beamPackages,
fetchFromGitHub,
elixir,
nix-update-script,
versionCheckHook,
}:
beamPackages.mixRelease rec {
pname = "lexical";
version = "0.7.3";
src = fetchFromGitHub {
owner = "lexical-lsp";
repo = "lexical";
tag = "v${version}";
hash = "sha256-p8XSJBX1igwC+ssEJGD8wb/ZYaEgLGozlY8N6spo3cA=";
};
mixFodDeps = beamPackages.fetchMixDeps {
inherit pname version src;
hash = "sha256-g6BZGJ33oBDXmjbb/kBfPhart4En/iDlt4yQJYeuBzw=";
};
installPhase = ''
runHook preInstall
mix do compile --no-deps-check, package --path "$out"
runHook postInstall
'';
postInstall = ''
substituteInPlace "$out/bin/start_lexical.sh" \
--replace-fail 'elixir_command=' 'elixir_command="${elixir}/bin/"'
mv "$out/bin" "$out/libexec"
makeWrapper "$out/libexec/start_lexical.sh" "$out/bin/lexical" \
--set RELEASE_COOKIE lexical
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
__darwinAllowLocalNetworking = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Next-generation elixir language server";
homepage = "https://github.com/lexical-lsp/lexical";
changelog = "https://github.com/lexical-lsp/lexical/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "lexical";
platforms = beamPackages.erlang.meta.platforms;
};
}
|