Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
2.3 kB · 111 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112{ lib, buildPythonPackage, fetchFromGitHub, poetry-core, pythonOlder, aiohttp, dataclasses-json, langchain, langchain-core, langsmith, httpx, 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.2.7"; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { owner = "langchain-ai"; repo = "langchain"; rev = "refs/tags/langchain-community==${version}"; hash = "sha256-r0YSJkYPcwjHyw1xST5Zrgg9USjN9GOsvhV97imSFCQ="; };
sourceRoot = "${src.name}/libs/community";
preConfigure = '' ln -s ${src}/libs/standard-tests/langchain_standard_tests ./langchain_standard_tests
substituteInPlace pyproject.toml \ --replace-fail "path = \"../standard-tests\"" "path = \"./langchain_standard_tests\"" '';
build-system = [ poetry-core ];
dependencies = [ aiohttp dataclasses-json langchain-core langchain langsmith numpy pyyaml requests sqlalchemy tenacity ];
optional-dependencies = { cli = [ typer ]; };
pythonImportsCheck = [ "langchain_community" ];
nativeCheckInputs = [ httpx lark pandas pytest-asyncio pytest-mock pytestCheckHook requests-mock responses syrupy toml ];
pytestFlagsArray = [ "tests/unit_tests" ];
passthru = { updateScript = langchain-core.updateScript; };
__darwinAllowLocalNetworking = true;
disabledTests = [ # Test require network access "test_ovhcloud_embed_documents" # duckdb-engine needs python-wasmer which is not yet available in Python 3.12 # See https://github.com/NixOS/nixpkgs/pull/326337 and https://github.com/wasmerio/wasmer-python/issues/778 "test_table_info" "test_sql_database_run" ];
meta = { changelog = "https://github.com/langchain-ai/langchain/releases/tag/langchain-community==${version}"; description = "Community contributed LangChain integrations"; homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/community"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium ]; };}