mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
Merge pull request #297421 from fabaff/ollama
python311Packages.ollama: init at 0.1.7
This commit is contained in:
commit
83b32addf2
64
pkgs/development/python-modules/ollama/default.nix
Normal file
64
pkgs/development/python-modules/ollama/default.nix
Normal 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 ];
|
||||
};
|
||||
}
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user