1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 pdm-backend, 8 9 # dependencies 10 langchain-core, 11 groq, 12 13 # tests 14 langchain-tests, 15 pytestCheckHook, 16 17 # passthru 18 gitUpdater, 19}: 20 21buildPythonPackage rec { 22 pname = "langchain-groq"; 23 version = "0.3.8"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "langchain-ai"; 28 repo = "langchain"; 29 tag = "langchain-groq==${version}"; 30 hash = "sha256-mlkNKzVX4VUQ9+/rB0fD4HfwjbCA9Yp4DJkMT+ExJ1c="; 31 }; 32 33 sourceRoot = "${src.name}/libs/partners/groq"; 34 35 build-system = [ pdm-backend ]; 36 37 pythonRelaxDeps = [ 38 # Each component release requests the exact latest core. 39 # That prevents us from updating individual components. 40 "langchain-core" 41 ]; 42 43 dependencies = [ 44 langchain-core 45 groq 46 ]; 47 48 nativeCheckInputs = [ 49 langchain-tests 50 pytestCheckHook 51 ]; 52 53 enabledTestPaths = [ "tests/unit_tests" ]; 54 55 pythonImportsCheck = [ "langchain_groq" ]; 56 57 passthru = { 58 # python updater script sets the wrong tag 59 skipBulkUpdate = true; 60 updateScript = gitUpdater { 61 rev-prefix = "langchain-groq=="; 62 }; 63 }; 64 65 meta = { 66 changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.tag}"; 67 description = "Integration package connecting Groq and LangChain"; 68 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/groq"; 69 license = lib.licenses.mit; 70 maintainers = with lib.maintainers; [ 71 sarahec 72 ]; 73 }; 74}