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

52 lines
1011 B
Nix
Raw Normal View History

2023-06-27 13:47:34 +00:00
{ stdenv, fetchFromGitHub, makeBinaryWrapper, odin, lib }:
stdenv.mkDerivation {
pname = "ols";
version = "nightly-2023-11-04";
2023-06-27 13:47:34 +00:00
src = fetchFromGitHub {
owner = "DanielGavin";
repo = "ols";
rev = "b19c24eb17e7c16bcfb3144665fd405fd5e580f3";
hash = "sha256-c8mHVdXbn7aRKI/QBIZvBvl4sCNK49q+crQmTCjptwM=";
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
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;
2023-11-08 21:08:45 +00:00
maintainers = with maintainers; [ astavie znaniye ];
2023-06-27 13:47:34 +00:00
platforms = odin.meta.platforms;
};
}