Unverified Commit a5424d37 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python312Packages.ollama: cleanup, allow networking in darwin sandbox (#400824)

parents 06979b75 76f3fb0d
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -7,18 +7,21 @@
  gitMinimal,
  ripgrep,
  writableTmpDirAsHomeHook,

  versionCheckHook,
  nix-update-script,
}:

python3Packages.buildPythonApplication rec {
  pname = "seagoat";
  version = "0.54.6";
  version = "0.54.9";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "kantord";
    repo = "SeaGOAT";
    tag = "v${version}";
    hash = "sha256-KEFA1DUfsJpeNkWui/WKazImGCSwTFlPD8qsGFJNtr0=";
    hash = "sha256-BfZbYQ6ylMj8cn7q2AavU570/ci83ffdDbeB+F/wZlk=";
  };

  build-system = [ python3Packages.poetry-core ];
@@ -26,6 +29,7 @@ python3Packages.buildPythonApplication rec {
  pythonRelaxDeps = [
    "chromadb"
    "psutil"
    "setuptools"
  ];

  dependencies = with python3Packages; [
@@ -59,8 +63,10 @@ python3Packages.buildPythonApplication rec {
    ++ [
      gitMinimal
      ripgrep
      versionCheckHook
      writableTmpDirAsHomeHook
    ];
  versionCheckProgramArg = "--version";

  disabledTests = import ./failing_tests.nix;

@@ -80,6 +86,10 @@ python3Packages.buildPythonApplication rec {
      --prefix PATH : "${ripgrep}/bin"
  '';

  passthru = {
    updateScript = nix-update-script { };
  };

  meta = {
    description = "Local-first semantic code search engine";
    homepage = "https://kantord.github.io/SeaGOAT/";
+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 ];
  };
}