2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
langchain-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "langchain-text-splitters";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.2.1";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "langchain-ai";
|
|
|
|
repo = "langchain";
|
|
|
|
rev = "refs/tags/langchain-text-splitters==${version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-5le+P+7iGjrTetnTHiJilqtc7G7kJbZnEsUgFyF2aQ8=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
sourceRoot = "${src.name}/libs/text-splitters";
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = [ langchain-core ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "langchain_text_splitters" ];
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests/unit_tests" ];
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit (langchain-core) updateScript;
|
|
|
|
};
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
meta = {
|
2024-04-21 15:54:59 +00:00
|
|
|
description = "Build context-aware reasoning applications";
|
|
|
|
homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/text-splitters";
|
2024-06-05 15:53:02 +00:00
|
|
|
changelog = "https://github.com/langchain-ai/langchain/releases/tag/${src.rev}";
|
2024-06-20 14:57:18 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ fab ];
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
}
|