Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at r-updates 76 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 pdm-backend, 8 9 # dependencies 10 langchain-core, 11 openai, 12 13 # tests 14 langchain-tests, 15 pytest-asyncio, 16 pytest-cov-stub, 17 pytest-mock, 18 pytestCheckHook, 19 20 # passthru 21 gitUpdater, 22}: 23 24buildPythonPackage rec { 25 pname = "langchain-perplexity"; 26 version = "0.3.72"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "langchain-ai"; 31 repo = "langchain"; 32 tag = "langchain-core==${version}"; 33 hash = "sha256-Q2uGMiODUtwkPdOyuSqp8vqjlLjiXk75QjXp7rr20tc="; 34 }; 35 36 sourceRoot = "${src.name}/libs/partners/perplexity"; 37 38 build-system = [ pdm-backend ]; 39 40 dependencies = [ 41 langchain-core 42 openai 43 ]; 44 45 pythonRelaxDeps = [ 46 # Each component release requests the exact latest core. 47 # That prevents us from updating individual components. 48 "langchain-core" 49 ]; 50 51 nativeCheckInputs = [ 52 langchain-tests 53 pytest-asyncio 54 pytest-cov-stub 55 pytest-mock 56 pytestCheckHook 57 ]; 58 59 enabledTestPaths = [ "tests/unit_tests" ]; 60 61 pythonImportsCheck = [ "langchain_perplexity" ]; 62 63 passthru.updateScript = gitUpdater { 64 rev-prefix = "langchain-perplexity=="; 65 }; 66 67 meta = { 68 changelog = "https://github.com/langchain-ai/langchain-perplexity/releases/tag/${src.tag}"; 69 description = "Build LangChain applications with Perplexity"; 70 homepage = "https://github.com/langchain-ai/langchain/tree/master/libs/partners/perplexity"; 71 license = lib.licenses.mit; 72 maintainers = [ 73 lib.maintainers.sarahec 74 ]; 75 }; 76}