bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
59 lines
1.1 KiB
Nix
59 lines
1.1 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
makeBinaryWrapper,
|
|
odin,
|
|
stdenv,
|
|
unstableGitUpdater,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "ols";
|
|
version = "0-unstable-2024-06-13";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "DanielGavin";
|
|
repo = "ols";
|
|
rev = "09f865e685f8ebddaf994e51baeabed795e7f849";
|
|
hash = "sha256-JdKmXMyRZCf6UYo5sKmiIaeZNgnbUm5ALP39tf6z36w=";
|
|
};
|
|
|
|
postPatch = ''
|
|
patchShebangs build.sh
|
|
'';
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
buildInputs = [ odin ];
|
|
|
|
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
|
|
'';
|
|
|
|
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
|
|
|
|
meta = {
|
|
inherit (odin.meta) platforms;
|
|
description = "Language server for the Odin programming language";
|
|
homepage = "https://github.com/DanielGavin/ols";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [
|
|
astavie
|
|
znaniye
|
|
];
|
|
mainProgram = "ols";
|
|
};
|
|
}
|