nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 8 9 # dependencies 10 chromadb, 11 langchain-core, 12 numpy, 13 14 # tests 15 langchain-tests, 16 pytestCheckHook, 17 pytest-asyncio, 18 19 # passthru 20 gitUpdater, 21}: 22 23buildPythonPackage rec { 24 pname = "langchain-chroma"; 25 version = "1.1.0"; 26 pyproject = true; 27 28 src = fetchFromGitHub { 29 owner = "langchain-ai"; 30 repo = "langchain"; 31 tag = "langchain-chroma==${version}"; 32 hash = "sha256-WyW5QNLzbqI+kXIVCDyXLyqpShNOSk7tyBTdNoXGQZ0="; 33 }; 34 35 sourceRoot = "${src.name}/libs/partners/chroma"; 36 37 build-system = [ hatchling ]; 38 39 pythonRelaxDeps = [ 40 # Each component release requests the exact latest core. 41 # That prevents us from updating individual components. 42 "langchain-core" 43 "numpy" 44 ]; 45 46 dependencies = [ 47 chromadb 48 langchain-core 49 numpy 50 ]; 51 52 pythonImportsCheck = [ "langchain_chroma" ]; 53 54 nativeCheckInputs = [ 55 langchain-tests 56 pytest-asyncio 57 pytestCheckHook 58 ]; 59 60 passthru = { 61 # python updater script sets the wrong tag 62 skipBulkUpdate = true; 63 updateScript = gitUpdater { 64 rev-prefix = "langchain-chroma=="; 65 }; 66 }; 67 68 meta = { 69 changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.tag}"; 70 description = "Integration package connecting Chroma and LangChain"; 71 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/chroma"; 72 license = lib.licenses.mit; 73 maintainers = with lib.maintainers; [ 74 natsukium 75 sarahec 76 ]; 77 }; 78}