diff options
Diffstat (limited to 'pkgs/development/python-modules/langchain-community/default.nix')
-rw-r--r-- | pkgs/development/python-modules/langchain-community/default.nix | 56 |
1 files changed, 45 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/langchain-community/default.nix b/pkgs/development/python-modules/langchain-community/default.nix index af29f6068b045..7346d6fbbf326 100644 --- a/pkgs/development/python-modules/langchain-community/default.nix +++ b/pkgs/development/python-modules/langchain-community/default.nix @@ -1,40 +1,55 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, poetry-core, pythonOlder, aiohttp, dataclasses-json, + duckdb-engine, + langchain, langchain-core, langsmith, + lark, numpy, + pandas, + pytest-asyncio, + pytest-mock, + pytestCheckHook, pyyaml, requests, + requests-mock, + responses, sqlalchemy, + syrupy, tenacity, + toml, typer, }: buildPythonPackage rec { pname = "langchain-community"; - version = "0.0.36"; + version = "0.2.4"; pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - pname = "langchain_community"; - inherit version; - hash = "sha256-l76dAM8RnJYeA+0ibgTmcPUbXUL1sF/8NRhZj6bSDHQ="; + src = fetchFromGitHub { + owner = "langchain-ai"; + repo = "langchain"; + rev = "langchain-community==${version}"; + hash = "sha256-rqlYaSfDZIQHCndsnydeR1oeVZNIOH6NAgXeOSdBF5A="; }; + sourceRoot = "${src.name}/libs/community"; + build-system = [ poetry-core ]; dependencies = [ aiohttp dataclasses-json langchain-core + langchain langsmith numpy pyyaml @@ -49,13 +64,32 @@ buildPythonPackage rec { pythonImportsCheck = [ "langchain_community" ]; - # PyPI source does not have tests - doCheck = false; + nativeCheckInputs = [ + duckdb-engine + lark + pandas + pytest-asyncio + pytest-mock + pytestCheckHook + requests-mock + responses + syrupy + toml + ]; + + pytestFlagsArray = [ "tests/unit_tests" ]; + + passthru = { + updateScript = langchain-core.updateScript; + }; + + __darwinAllowLocalNetworking = true; - meta = with lib; { + meta = { description = "Community contributed LangChain integrations"; homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/community"; - license = licenses.mit; - maintainers = with maintainers; [ natsukium ]; + changelog = "https://github.com/langchain-ai/langchain/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ natsukium ]; }; } |