Merge pull request #297421 from fabaff/ollama

python311Packages.ollama: init at 0.1.7
This commit is contained in:
Fabian Affolter 2024-03-20 13:18:45 +01:00 committed by GitHub
commit 83b32addf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,64 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, httpx
, pillow
, poetry-core
, pytest-asyncio
, pytest-httpserver
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
}:
buildPythonPackage rec {
pname = "ollama";
version = "0.1.7";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "ollama";
repo = "ollama-python";
rev = "refs/tags/v${version}";
hash = "sha256-xNH9kAjSdVXrCI7zkyR7tYxJ/NG8/08ykkDZQJI8Za4=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "0.0.0" "${version}"
'';
pythonRelaxDeps = [
"httpx"
];
nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = [
httpx
];
nativeCheckInputs = [
pillow
pytest-asyncio
pytest-httpserver
pytestCheckHook
];
pythonImportsCheck = [
"ollama"
];
meta = with lib; {
description = "Ollama Python library";
homepage = "https://github.com/ollama/ollama-python";
changelog = "https://github.com/ollama/ollama-python/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -8847,6 +8847,8 @@ self: super: with self; {
oletools = callPackage ../development/python-modules/oletools { };
ollama = callPackage ../development/python-modules/ollama { };
omegaconf = callPackage ../development/python-modules/omegaconf { };
omemo-dr = callPackage ../development/python-modules/omemo-dr { };