Skip to content

Commit 48dd482

Browse files
committed
1 parent e6bc4f7 commit 48dd482

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

pkgs/by-name/le/lexical/package.nix

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,24 @@
44
fetchFromGitHub,
55
elixir,
66
nix-update-script,
7-
testers,
8-
lexical,
7+
versionCheckHook,
98
}:
109

1110
beamPackages.mixRelease rec {
1211
pname = "lexical";
13-
version = "0.7.1";
12+
version = "0.7.2";
1413

1514
src = fetchFromGitHub {
1615
owner = "lexical-lsp";
1716
repo = "lexical";
18-
rev = "refs/tags/v${version}";
19-
hash = "sha256-YKp1IOBIt6StYpVZyTj3BMZM/+6Bp+galbFpuBKYeOM=";
17+
tag = "v${version}";
18+
hash = "sha256-mgchXc46sMN1UcgyO8uWusl2bEJr/5PqfwJ2c6j6SoI=";
2019
};
2120

2221
mixFodDeps = beamPackages.fetchMixDeps {
2322
inherit pname version src;
2423

25-
hash = "sha256-myxmQM46TELDu9wpr82qxqH4s/YR9t0gdAfGOm0Dw1k=";
24+
hash = "sha256-Ee8RbLkb7jkdK91G4TAUIlPthBP5OyeynHJGg87UvBI=";
2625
};
2726

2827
installPhase = ''
@@ -34,14 +33,24 @@ beamPackages.mixRelease rec {
3433
'';
3534

3635
postInstall = ''
37-
substituteInPlace "$out/bin/start_lexical.sh" --replace 'elixir_command=' 'elixir_command="${elixir}/bin/"'
36+
substituteInPlace "$out/bin/start_lexical.sh" \
37+
--replace-fail 'elixir_command=' 'elixir_command="${elixir}/bin/"'
38+
3839
mv "$out/bin" "$out/libexec"
39-
makeWrapper "$out/libexec/start_lexical.sh" "$out/bin/lexical" --set RELEASE_COOKIE lexical
40+
makeWrapper "$out/libexec/start_lexical.sh" "$out/bin/lexical" \
41+
--set RELEASE_COOKIE lexical
4042
'';
4143

44+
nativeInstallCheckInputs = [
45+
versionCheckHook
46+
];
47+
versionCheckProgramArg = [ "--version" ];
48+
doInstallCheck = true;
49+
50+
__darwinAllowLocalNetworking = true;
51+
4252
passthru = {
4353
updateScript = nix-update-script { };
44-
tests.version = testers.testVersion { package = lexical; };
4554
};
4655

4756
meta = {

0 commit comments

Comments
 (0)