mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
f566f6744d
ols: nightly-05-18 -> nightly-07-09 ols should be updated simultaneously as it is updated in tandem with the odin compiler
52 lines
1003 B
Nix
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;
|
|
};
|
|
}
|