mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
python312Packages.ollama: cleanup, allow networking in darwin sandbox (#400824)
This commit is contained in:
commit
a5424d37bb
2 changed files with 25 additions and 10 deletions
|
@ -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/";
|
||||
|
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue