1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 llm, 11 openai, 12 13 # tests 14 pytestCheckHook, 15 writableTmpDirAsHomeHook, 16 python-dotenv, 17 pillow, 18 llm-perplexity, 19}: 20buildPythonPackage rec { 21 pname = "llm-perplexity"; 22 version = "2025.6.0"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "hex"; 27 repo = "llm-perplexity"; 28 tag = version; 29 hash = "sha256-LTf2TY5bjSb7ARXrhWj1ctGuMpnq2Kl/kv/hrgX/m/M="; 30 }; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 llm 36 openai 37 ]; 38 39 nativeCheckInputs = [ 40 pytestCheckHook 41 writableTmpDirAsHomeHook 42 python-dotenv 43 pillow 44 ]; 45 46 pythonImportsCheck = [ "llm_perplexity" ]; 47 48 passthru.tests = llm.mkPluginTest llm-perplexity; 49 50 meta = { 51 description = "LLM access to pplx-api"; 52 homepage = "https://github.com/hex/llm-perplexity"; 53 changelog = "https://github.com/hex/llm-perplexity/releases/tag/${version}"; 54 license = lib.licenses.asl20; 55 maintainers = with lib.maintainers; [ jed-richards ]; 56 }; 57}