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

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

52 lines
1.0 KiB
Nix
Raw Normal View History

2023-06-27 16:47:34 +03:00
{ stdenv, fetchFromGitHub, makeBinaryWrapper, odin, lib }:
stdenv.mkDerivation {
pname = "ols";
version = "0-unstable-2024-02-09";
2023-06-27 16:47:34 +03:00
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "3eb1e0e60a66a4fc7347fb77837ff45ccbe1cabb";
hash = "sha256-qPcSZjvlBmFf3M98GrwIu8SGO2VbgdqBKzyFpGSEtrI=";
2023-06-27 16:47:34 +03: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 16:47:34 +03:00
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
runHook postInstall
'';
meta = with lib; {
inherit (odin.meta) platforms;
2023-06-27 16:47:34 +03:00
description = "Language server for the Odin programming language";
mainProgram = "ols";
2023-06-27 16:47:34 +03:00
homepage = "https://github.com/DanielGavin/ols";
license = licenses.mit;
2023-11-09 00:08:45 +03:00
maintainers = with maintainers; [ astavie znaniye ];
2023-06-27 16:47:34 +03:00
};
}