2024-05-15 15:35:15 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeBinaryWrapper, unstableGitUpdater, odin, lib }:
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ols";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0-unstable-2024-05-06";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DanielGavin";
|
|
|
|
repo = "ols";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "5c646656e988ddcdaee09f1bea666dc00ea2ea4d";
|
|
|
|
hash = "sha256-W8D+szu4+mDYwDLWvGRL3ICZ9Dr93pFweEO2+0awHfo=";
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
hardcodeZeroVersion = true;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
odin
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
install -Dm755 ols -t $out/bin/
|
2023-07-15 17:15:38 +00:00
|
|
|
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
inherit (odin.meta) platforms;
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "Language server for the Odin programming language";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ols";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/DanielGavin/ols";
|
|
|
|
license = licenses.mit;
|
2023-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ astavie znaniye ];
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|