From 45e07196d21138e46634dcea06080a299dbfa026 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 17 Jan 2026 14:12:21 +0000 Subject: [PATCH] openllm: 0.6.10 -> 0.6.30 Diff: https://github.com/bentoml/openllm/compare/v0.6.10...v0.6.30 Changelog: https://github.com/bentoml/OpenLLM/releases/tag/v0.6.30 --- pkgs/by-name/op/openllm/package.nix | 66 ++++++++++++++--------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/pkgs/by-name/op/openllm/package.nix b/pkgs/by-name/op/openllm/package.nix index 77b48158457d..d197e40c8dd3 100644 --- a/pkgs/by-name/op/openllm/package.nix +++ b/pkgs/by-name/op/openllm/package.nix @@ -1,49 +1,40 @@ { lib, + stdenv, fetchFromGitHub, - python3, + python3Packages, + versionCheckHook, + writableTmpDirAsHomeHook, }: -let - python = python3.override { - self = python; - packageOverrides = _: super: { - cattrs = super.cattrs.overridePythonAttrs (oldAttrs: rec { - version = "23.1.2"; - build-system = [ super.poetry-core ]; - src = oldAttrs.src.override { - tag = "v${version}"; - hash = "sha256-YO4Clbo5fmXbysxwwM2qCHJwO5KwDC05VctRVFruJcw="; - }; - }); - }; - }; -in - -python.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication (finalAttrs: { pname = "openllm"; - version = "0.6.10"; + version = "0.6.30"; pyproject = true; src = fetchFromGitHub { owner = "bentoml"; repo = "openllm"; - tag = "v${version}"; - hash = "sha256-4KIpe6KjbBDDUj0IjzSccxjgZyBoaUVIQJYk1+W01Vo="; + tag = "v${finalAttrs.version}"; + hash = "sha256-uFisSbWF7Gec7Fthts45kvFnA4aGkzYppt4t8o12Fak="; }; - pythonRemoveDeps = [ - "pathlib" - "pip-requirements-parser" - ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "hatchling==1.27.0" "hatchling" \ + --replace-fail "hatch-vcs==0.4.0" "hatch-vcs" + ''; - pythonRelaxDeps = [ "openai" ]; - - build-system = with python.pkgs; [ + build-system = with python3Packages; [ hatch-vcs hatchling ]; - dependencies = with python.pkgs; [ + pythonRelaxDeps = [ + "bentoml" + "openai" + ]; + + dependencies = with python3Packages; [ accelerate bentoml dulwich @@ -57,15 +48,22 @@ python.pkgs.buildPythonApplication rec { uv ]; - # no tests - doCheck = false; - pythonImportsCheck = [ "openllm" ]; + # No python tests + nativeCheckInputs = [ + versionCheckHook + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # PermissionError: [Errno 1] Operation not permitted: '/var/empty/.openllm' + writableTmpDirAsHomeHook + ]; + versionCheckKeepEnvironment = lib.optionals stdenv.hostPlatform.isDarwin [ "HOME" ]; + meta = { description = "Run any open-source LLMs, such as Llama 3.1, Gemma, as OpenAI compatible API endpoint in the cloud"; homepage = "https://github.com/bentoml/OpenLLM"; - changelog = "https://github.com/bentoml/OpenLLM/releases/tag/v${version}"; + changelog = "https://github.com/bentoml/OpenLLM/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ happysalada @@ -73,4 +71,4 @@ python.pkgs.buildPythonApplication rec { ]; mainProgram = "openllm"; }; -} +})