{ fetchFromGitHub, lib, makeBinaryWrapper, odin, stdenv, unstableGitUpdater, }: stdenv.mkDerivation { pname = "ols"; version = "0-unstable-2024-06-13"; src = fetchFromGitHub { owner = "DanielGavin"; repo = "ols"; rev = "09f865e685f8ebddaf994e51baeabed795e7f849"; hash = "sha256-JdKmXMyRZCf6UYo5sKmiIaeZNgnbUm5ALP39tf6z36w="; }; 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"; }; }