nixpkgs/pkgs/development/tools/ols/default.nix
Astavie f566f6744d odin: dev-2023-05 -> dev-2023-07
ols: nightly-05-18 -> nightly-07-09
ols should be updated simultaneously as it is updated in tandem with the odin compiler
2023-07-10 12:59:44 +02:00

52 lines
1003 B
Nix

{ stdenv, fetchFromGitHub, makeBinaryWrapper, odin, lib }:
stdenv.mkDerivation {
pname = "ols";
version = "nightly-2023-07-09";
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "255ad5958026dc3a3116f621eaebd501b8b26a22";
hash = "sha256-XtlIZToNvmU4GhUJAxuVmKvKwnPebaxjv7jp/AgE/uM=";
};
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
odin
];
postPatch = ''
patchShebangs build.sh
'';
buildPhase = ''
runHook preBuild
./build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ols $out/bin
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
runHook postInstall
'';
meta = with lib; {
description = "Language server for the Odin programming language";
homepage = "https://github.com/DanielGavin/ols";
license = licenses.mit;
maintainers = with maintainers; [ astavie ];
platforms = odin.meta.platforms;
};
}