blob: d4ad7f36dc4bad9c0b76b5c73941352c1c2f99eb (
plain) (
blame)
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
|
{ stdenv, fetchFromGitHub, makeBinaryWrapper, unstableGitUpdater, odin, lib }:
stdenv.mkDerivation {
pname = "ols";
version = "0-unstable-2024-05-06";
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "5c646656e988ddcdaee09f1bea666dc00ea2ea4d";
hash = "sha256-W8D+szu4+mDYwDLWvGRL3ICZ9Dr93pFweEO2+0awHfo=";
};
passthru.updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
};
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
odin
];
postPatch = ''
patchShebangs build.sh
'';
buildPhase = ''
runHook preBuild
./build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ols -t $out/bin/
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
runHook postInstall
'';
meta = with lib; {
inherit (odin.meta) platforms;
description = "Language server for the Odin programming language";
mainProgram = "ols";
homepage = "https://github.com/DanielGavin/ols";
license = licenses.mit;
maintainers = with maintainers; [ astavie znaniye ];
};
}
|