Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 nix-update-script, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 azure-identity, 12 langchain-core, 13 langchain-openai, 14 15 # tests 16 freezegun, 17 lark, 18 pandas, 19 pytest-asyncio, 20 pytest-mock, 21 pytest-socket, 22 pytestCheckHook, 23 requests-mock, 24 responses, 25 syrupy, 26 toml, 27}: 28 29buildPythonPackage rec { 30 pname = "langchain-azure-dynamic-sessions"; 31 version = "0.2.0"; 32 pyproject = true; 33 34 src = fetchFromGitHub { 35 owner = "langchain-ai"; 36 repo = "langchain"; 37 tag = "langchain-azure-dynamic-sessions==${version}"; 38 hash = "sha256-ACR+JzKcnYXROGOQe6DlZeqcYd40KlesgXSUOybOT20="; 39 }; 40 41 sourceRoot = "${src.name}/libs/partners/azure-dynamic-sessions"; 42 43 build-system = [ poetry-core ]; 44 45 pythonRelaxDeps = [ 46 # Each component release requests the exact latest core. 47 # That prevents us from updating individul components. 48 "langchain-core" 49 ]; 50 51 dependencies = [ 52 azure-identity 53 langchain-core 54 langchain-openai 55 ]; 56 57 nativeCheckInputs = [ 58 freezegun 59 lark 60 pandas 61 pytest-asyncio 62 pytest-mock 63 pytest-socket 64 pytestCheckHook 65 requests-mock 66 responses 67 syrupy 68 toml 69 ]; 70 71 pytestFlagsArray = [ "tests/unit_tests" ]; 72 73 pythonImportsCheck = [ "langchain_azure_dynamic_sessions" ]; 74 75 passthru.updateScript = nix-update-script { 76 extraArgs = [ 77 "--version-regex" 78 "^langchain-azure-dynamic-sessions==([0-9.]+)$" 79 ]; 80 }; 81 82 meta = { 83 description = "Integration package connecting Azure Container Apps dynamic sessions and LangChain"; 84 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/azure-dynamic-sessions"; 85 changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-azure-dynamic-sessions==${version}"; 86 license = lib.licenses.mit; 87 maintainers = with lib.maintainers; [ 88 natsukium 89 sarahec 90 ]; 91 }; 92}