1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 pymupdf, 7 llm, 8 llm-pdf-to-images, 9 pytestCheckHook, 10 pytest-asyncio, 11 writableTmpDirAsHomeHook, 12}: 13 14buildPythonPackage rec { 15 pname = "llm-pdf-to-images"; 16 version = "0.1"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "simonw"; 21 repo = "llm-pdf-to-images"; 22 tag = version; 23 hash = "sha256-UWtCPdKrGE93NNjCroct5fPhq1pWIkngXXtRb+BHm8k="; 24 }; 25 26 build-system = [ setuptools ]; 27 28 dependencies = [ 29 llm 30 pymupdf 31 ]; 32 33 nativeCheckInputs = [ 34 pytestCheckHook 35 writableTmpDirAsHomeHook 36 ]; 37 38 pythonImportsCheck = [ "llm_pdf_to_images" ]; 39 40 passthru.tests = llm.mkPluginTest llm-pdf-to-images; 41 42 meta = { 43 description = "LLM fragment plugin to load a PDF as a sequence of images"; 44 homepage = "https://github.com/simonw/llm-pdf-to-images"; 45 changelog = "https://github.com/simonw/llm-pdf-to-images/releases/tag/${version}/CHANGELOG.md"; 46 license = lib.licenses.asl20; 47 maintainers = with lib.maintainers; [ philiptaron ]; 48 }; 49}