Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
3.2 kB · 169 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170{ lib, stdenv, bcrypt, build, buildPythonPackage, cargo, chroma-hnswlib, darwin, fastapi, fetchFromGitHub, grpcio, httpx, hypothesis, importlib-resources, kubernetes, mmh3, numpy, onnxruntime, openssl, opentelemetry-api, opentelemetry-exporter-otlp-proto-grpc, opentelemetry-instrumentation-fastapi, opentelemetry-sdk, orjson, overrides, pkg-config, posthog, protobuf, pulsar-client, pydantic, pypika, pytest-asyncio, pytestCheckHook, pythonOlder, pyyaml, requests, rustc, rustPlatform, setuptools, setuptools-scm, tenacity, tokenizers, tqdm, typer, typing-extensions, uvicorn, zstd,}:
buildPythonPackage rec { pname = "chromadb"; version = "0.5.3"; pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub { owner = "chroma-core"; repo = "chroma"; rev = "refs/tags/${version}"; hash = "sha256-czDL2b+Jj7mrYZCTfnaZArkOHBaWyTV0BTE2wvykHps="; };
cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; hash = "sha256-eTVT1yowuDsajjceWojdUdX466FKneUt1i5QipBFdp4="; };
pythonRelaxDeps = [ "chroma-hnswlib" "orjson" ];
nativeBuildInputs = [ cargo pkg-config protobuf rustc rustPlatform.cargoSetupHook setuptools setuptools-scm ];
buildInputs = [ openssl zstd ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ];
propagatedBuildInputs = [ bcrypt build chroma-hnswlib fastapi grpcio httpx importlib-resources kubernetes mmh3 numpy onnxruntime opentelemetry-api opentelemetry-exporter-otlp-proto-grpc opentelemetry-instrumentation-fastapi opentelemetry-sdk orjson overrides posthog pulsar-client pydantic pypika pyyaml requests tenacity tokenizers tqdm typer typing-extensions uvicorn ];
nativeCheckInputs = [ hypothesis pytest-asyncio pytestCheckHook ];
pythonImportsCheck = [ "chromadb" ];
env = { ZSTD_SYS_USE_PKG_CONFIG = true; };
pytestFlagsArray = [ "-x" ];
preCheck = '' (($(ulimit -n) < 1024)) && ulimit -n 1024 export HOME=$(mktemp -d) '';
disabledTests = [ # flaky / timing sensitive "test_fastapi_server_token_authn_allows_when_it_should_allow" ];
disabledTestPaths = [ # Tests require network access "chromadb/test/auth/test_simple_rbac_authz.py" "chromadb/test/db/test_system.py" "chromadb/test/ef/test_default_ef.py" "chromadb/test/property/" "chromadb/test/property/test_cross_version_persist.py" "chromadb/test/stress/" "chromadb/test/test_api.py" ];
__darwinAllowLocalNetworking = true;
meta = with lib; { description = "AI-native open-source embedding database"; homepage = "https://github.com/chroma-core/chroma"; changelog = "https://github.com/chroma-core/chroma/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ fab ]; mainProgram = "chroma"; broken = stdenv.isLinux && stdenv.isAarch64; };}