1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 9 # dependencies 10 langchain-core, 11 langchain-community, 12 13 # testing 14 langchain-tests, 15 pytestCheckHook, 16 17 # passthru 18 gitUpdater, 19}: 20 21buildPythonPackage rec { 22 pname = "langchain-experimental"; 23 version = "0.3.4"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "langchain-ai"; 28 repo = "langchain-experimental"; 29 tag = "libs/experimental/v${version}"; 30 hash = "sha256-KgGfJfxHOfpwVVo/OcbOjiO5pbxoDE1MiyKqUwsqfIg="; 31 }; 32 33 sourceRoot = "${src.name}/libs/experimental"; 34 35 patches = [ 36 # Remove it when https://github.com/langchain-ai/langchain-experimental/pull/58 is merged and released 37 ./001-avoid-check-fullpath.patch 38 ]; 39 40 build-system = [ 41 poetry-core 42 ]; 43 44 pythonRelaxDeps = [ 45 # Each component release requests the exact latest core. 46 # That prevents us from updating individual components. 47 "langchain-core" 48 "langchain-community" 49 ]; 50 51 dependencies = [ 52 langchain-core 53 langchain-community 54 ]; 55 56 nativeCheckInputs = [ 57 langchain-tests 58 pytestCheckHook 59 ]; 60 61 pytestFlagsArray = [ "tests/unit_tests" ]; 62 63 pythonImportsCheck = [ "langchain_experimental" ]; 64 65 passthru.updateScript = gitUpdater { 66 rev-prefix = "libs/experimental/v"; 67 }; 68 69 meta = { 70 changelog = "https://github.com/langchain-ai/langchain-experimental/releases/tag/${src.tag}"; 71 description = "Package add experimental features on LangChain"; 72 homepage = "https://github.com/langchain-ai/langchain-experimental/tree/main/libs/experimental"; 73 license = lib.licenses.mit; 74 maintainers = with lib.maintainers; [ mrdev023 ]; 75 }; 76}