Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 boto3, 11 langchain-core, 12 numpy, 13 pydantic, 14 15 # tests 16 langchain-tests, 17 pytest-asyncio, 18 pytest-cov-stub, 19 pytestCheckHook, 20 21 # passthru 22 gitUpdater, 23}: 24 25buildPythonPackage rec { 26 pname = "langchain-aws"; 27 version = "0.2.29"; 28 pyproject = true; 29 30 src = fetchFromGitHub { 31 owner = "langchain-ai"; 32 repo = "langchain-aws"; 33 tag = "langchain-aws==${version}"; 34 hash = "sha256-WV/z8hEOPtM3o7/4ZqZSw1cGI2d0NFAz1KajF1i/vQI="; 35 }; 36 37 postPatch = '' 38 substituteInPlace pyproject.toml \ 39 --replace-fail "--snapshot-warn-unused" "" 40 ''; 41 42 sourceRoot = "${src.name}/libs/aws"; 43 44 build-system = [ poetry-core ]; 45 46 dependencies = [ 47 boto3 48 langchain-core 49 numpy 50 pydantic 51 ]; 52 53 pythonRelaxDeps = [ 54 # Boto @ 1.35 has outstripped the version requirement 55 "boto3" 56 # Each component release requests the exact latest core. 57 # That prevents us from updating individual components. 58 "langchain-core" 59 ]; 60 61 nativeCheckInputs = [ 62 langchain-tests 63 pytest-asyncio 64 pytest-cov-stub 65 pytestCheckHook 66 ]; 67 68 enabledTestPaths = [ "tests/unit_tests" ]; 69 70 pythonImportsCheck = [ "langchain_aws" ]; 71 72 passthru.updateScript = gitUpdater { 73 rev-prefix = "langchain-aws=="; 74 }; 75 76 meta = { 77 changelog = "https://github.com/langchain-ai/langchain-aws/releases/tag/${src.tag}"; 78 description = "Build LangChain application on AWS"; 79 homepage = "https://github.com/langchain-ai/langchain-aws/"; 80 license = lib.licenses.mit; 81 maintainers = with lib.maintainers; [ 82 drupol 83 natsukium 84 sarahec 85 ]; 86 }; 87}