1{ lib 2, buildPythonPackage 3, fetchPypi 4, flit-core 5, pythonOlder 6, typing-extensions 7, unittestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "PyPDF2"; 12 version = "3.0.1"; 13 14 format = "pyproject"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-p0QI9pumJx9xuTUu9O0D3FOjGqQE0ptdMfU7/s/uFEA="; 19 }; 20 21 nativeBuildInputs = [ 22 flit-core 23 ]; 24 25 propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ 26 typing-extensions 27 ]; 28 29 nativeCheckInputs = [ unittestCheckHook ]; 30 31 pythonImportsCheck = [ 32 "PyPDF2" 33 ]; 34 35 meta = with lib; { 36 description = "A Pure-Python library built as a PDF toolkit"; 37 homepage = "https://pypdf2.readthedocs.io/"; 38 changelog = "https://github.com/py-pdf/PyPDF2/raw/${version}/CHANGELOG.md"; 39 license = licenses.bsd3; 40 maintainers = with maintainers; [ desiderius vrthra ]; 41 }; 42 43}