Commit 3fdb3183 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python312Packages.ollama: cleanup, allow networking in darwin sandbox

parent 23ad94e0
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -2,14 +2,19 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  httpx,
  pillow,

  # build-system
  poetry-core,

  # dependencies
  httpx,
  pydantic,

  # tests
  pillow,
  pytest-asyncio,
  pytest-httpserver,
  pytestCheckHook,
  pythonOlder,
}:

buildPythonPackage rec {
@@ -17,8 +22,6 @@ buildPythonPackage rec {
  version = "0.4.8";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "ollama";
    repo = "ollama-python";
@@ -47,13 +50,15 @@ buildPythonPackage rec {
    pytestCheckHook
  ];

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [ "ollama" ];

  meta = with lib; {
  meta = {
    description = "Ollama Python library";
    homepage = "https://github.com/ollama/ollama-python";
    changelog = "https://github.com/ollama/ollama-python/releases/tag/${src.tag}";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}