mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 15:13:46 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
52 lines
1.0 KiB
Nix
52 lines
1.0 KiB
Nix
{ stdenv, fetchFromGitHub, makeBinaryWrapper, odin, lib }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "ols";
|
|
version = "0-unstable-2024-02-09";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "DanielGavin";
|
|
repo = "ols";
|
|
rev = "3eb1e0e60a66a4fc7347fb77837ff45ccbe1cabb";
|
|
hash = "sha256-qPcSZjvlBmFf3M98GrwIu8SGO2VbgdqBKzyFpGSEtrI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeBinaryWrapper
|
|
];
|
|
|
|
buildInputs = [
|
|
odin
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs build.sh
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
./build.sh
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 ols -t $out/bin/
|
|
wrapProgram $out/bin/ols --set-default ODIN_ROOT ${odin}/share
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
inherit (odin.meta) platforms;
|
|
description = "Language server for the Odin programming language";
|
|
mainProgram = "ols";
|
|
homepage = "https://github.com/DanielGavin/ols";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ astavie znaniye ];
|
|
};
|
|
}
|