{ fetchFromGitHub, lib, makeBinaryWrapper, odin, stdenv, unstableGitUpdater, }: stdenv.mkDerivation { pname = "ols"; version = "0-unstable-2024-06-18"; src = fetchFromGitHub { owner = "DanielGavin"; repo = "ols"; rev = "6209c11593a3ac175d058a1b12a884fa4d288620"; hash = "sha256-YAeYmX62+5FjHIYt2uWY4aVW6v326vNFl4vQLl585lg="; }; postPatch = '' patchShebangs build.sh ''; nativeBuildInputs = [ makeBinaryWrapper ]; buildInputs = [ odin ]; 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 ''; passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; }; meta = { inherit (odin.meta) platforms; description = "Language server for the Odin programming language"; homepage = "https://github.com/DanielGavin/ols"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ astavie znaniye ]; mainProgram = "ols"; }; }