nixpkgs/pkgs/development/tools/ols/default.nix

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

56 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, makeBinaryWrapper, unstableGitUpdater, odin, lib }:
2023-06-27 13:47:34 +00:00
stdenv.mkDerivation {
pname = "ols";
version = "0-unstable-2024-04-28";
2023-06-27 13:47:34 +00:00
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
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
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; {
inherit (odin.meta) platforms;
2023-06-27 13:47:34 +00:00
description = "Language server for the Odin programming language";
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
};
}