Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / ollama / default.nix
blob8bc0639b016d3e87fae83f429a4705bb227061c4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , httpx
5 , pillow
6 , poetry-core
7 , pytest-asyncio
8 , pytest-httpserver
9 , pytestCheckHook
10 , pythonOlder
11 , pythonRelaxDepsHook
14 buildPythonPackage rec {
15   pname = "ollama";
16   version = "0.1.8";
17   pyproject = true;
19   disabled = pythonOlder "3.8";
21   src = fetchFromGitHub {
22     owner = "ollama";
23     repo = "ollama-python";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-hMNoWalUL+5FzmV5ICj7Zl6cTWzE6xGWfTf5++c36+E=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail "0.0.0" "${version}"
31   '';
33   pythonRelaxDeps = [
34     "httpx"
35   ];
37   build-system = [
38     poetry-core
39     pythonRelaxDepsHook
40   ];
42   dependencies = [
43     httpx
44   ];
46   nativeCheckInputs = [
47     pillow
48     pytest-asyncio
49     pytest-httpserver
50     pytestCheckHook
51   ];
53   pythonImportsCheck = [
54     "ollama"
55   ];
57   meta = with lib; {
58     description = "Ollama Python library";
59     homepage = "https://github.com/ollama/ollama-python";
60     changelog = "https://github.com/ollama/ollama-python/releases/tag/v${version}";
61     license = licenses.mit;
62     maintainers = with maintainers; [ fab ];
63   };