croc: 10.1.1 -> 10.1.3 (#364662)
[NixPkgs.git] / pkgs / development / python-modules / ollama / default.nix
blobc0b556a9408240d3de0eddcf0df127b438a6168f
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   httpx,
6   pillow,
7   poetry-core,
8   pytest-asyncio,
9   pytest-httpserver,
10   pytestCheckHook,
11   pythonOlder,
14 buildPythonPackage rec {
15   pname = "ollama";
16   version = "0.3.3";
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-27OJwPvHBxCdaiHk8EQ2s1OeBzgsrzp1MjgKHNgvz+A=";
26   };
28   postPatch = ''
29     substituteInPlace pyproject.toml \
30       --replace-fail "0.0.0" "${version}"
31   '';
33   pythonRelaxDeps = [ "httpx" ];
35   build-system = [ poetry-core ];
37   dependencies = [ httpx ];
39   nativeCheckInputs = [
40     pillow
41     pytest-asyncio
42     pytest-httpserver
43     pytestCheckHook
44   ];
46   pythonImportsCheck = [ "ollama" ];
48   meta = with lib; {
49     description = "Ollama Python library";
50     homepage = "https://github.com/ollama/ollama-python";
51     changelog = "https://github.com/ollama/ollama-python/releases/tag/v${version}";
52     license = licenses.mit;
53     maintainers = with maintainers; [ fab ];
54   };