2024-05-02 09:35:05 +00:00
|
|
|
{ stdenv, fetchFromGitHub, makeBinaryWrapper, unstableGitUpdater, odin, lib }:
|
2023-06-27 13:47:34 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "ols";
|
2024-05-02 09:35:05 +00:00
|
|
|
version = "0-unstable-2024-04-28";
|
2023-06-27 13:47:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DanielGavin";
|
|
|
|
repo = "ols";
|
2024-05-02 09:35:05 +00:00
|
|
|
rev = "49a63471d91120a23ec86f1621e99155d1be55c2";
|
|
|
|
hash = "sha256-fHCSPqeN24QbCzwMCLtvK5YnR0ExveDvXRuWL2nHt8M=";
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
hardcodeZeroVersion = true;
|
2023-06-27 13:47:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
odin
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs build.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
./build.sh
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-02-12 11:53:52 +00:00
|
|
|
install -Dm755 ols -t $out/bin/
|
2023-06-27 13:47:34 +00:00
|
|
|
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-02-12 11:53:52 +00:00
|
|
|
inherit (odin.meta) platforms;
|
2023-06-27 13:47:34 +00:00
|
|
|
description = "Language server for the Odin programming language";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "ols";
|
2023-06-27 13:47:34 +00:00
|
|
|
homepage = "https://github.com/DanielGavin/ols";
|
|
|
|
license = licenses.mit;
|
2023-11-08 21:08:45 +00:00
|
|
|
maintainers = with maintainers; [ astavie znaniye ];
|
2023-06-27 13:47:34 +00:00
|
|
|
};
|
|
|
|
}
|