nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 82 lines 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 hatchling, 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 = "1.1.1"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "langchain-ai"; 28 repo = "langchain"; 29 tag = "langchain-groq==${version}"; 30 hash = "sha256-WpIP41eALPoWuYjm2ygEH7TwClKYwAG0uEd1ZbbqMTY="; 31 }; 32 33 sourceRoot = "${src.name}/libs/partners/groq"; 34 35 build-system = [ hatchling ]; 36 37 pythonRelaxDeps = [ 38 # Each component release requests the exact latest core. 39 # That prevents us from updating individual components. 40 "langchain-core" 41 # Requires groq api < 1.0.0, but 1.0.0 is backwards compatible 42 "groq" 43 ]; 44 45 dependencies = [ 46 langchain-core 47 groq 48 ]; 49 50 nativeCheckInputs = [ 51 langchain-tests 52 pytestCheckHook 53 ]; 54 55 enabledTestPaths = [ "tests/unit_tests" ]; 56 57 disabledTests = [ 58 # These tests fail when langchain-core gets ahead of the package 59 "test_groq_serialization" 60 "test_serdes" 61 ]; 62 63 pythonImportsCheck = [ "langchain_groq" ]; 64 65 passthru = { 66 # python updater script sets the wrong tag 67 skipBulkUpdate = true; 68 updateScript = gitUpdater { 69 rev-prefix = "langchain-groq=="; 70 }; 71 }; 72 73 meta = { 74 changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.tag}"; 75 description = "Integration package connecting Groq and LangChain"; 76 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/groq"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ 79 sarahec 80 ]; 81 }; 82}