nixpkgs/pkgs/by-name/ol/ols/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.1 KiB
Nix
Raw Normal View History

2024-06-05 14:11:43 +01:00
{
fetchFromGitHub,
lib,
makeBinaryWrapper,
odin,
stdenv,
unstableGitUpdater,
}:
2023-06-27 14:47:34 +01:00
stdenv.mkDerivation {
pname = "ols";
version = "0-unstable-2024-06-05";
2023-06-27 14:47:34 +01:00
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "c4996b10d88aed9a0028c92ea54c42e4e9aeb39f";
hash = "sha256-PnajCKfk4XVR1FwG5ySzL/ibpwie+Xhr6MxHeXZiKmg=";
};
2023-06-27 14:47:34 +01:00
postPatch = ''
patchShebangs build.sh
'';
2024-06-05 14:11:43 +01:00
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [ odin ];
2023-06-27 14:47:34 +01:00
buildPhase = ''
runHook preBuild
./build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ols -t $out/bin/
2023-06-27 14:47:34 +01:00
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
runHook postInstall
'';
2024-06-05 14:11:43 +01:00
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
inherit (odin.meta) platforms;
2023-06-27 14:47:34 +01:00
description = "Language server for the Odin programming language";
homepage = "https://github.com/DanielGavin/ols";
2024-06-05 14:11:43 +01:00
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
astavie
znaniye
];
mainProgram = "ols";
2023-06-27 14:47:34 +01:00
};
}