29 buildPythonPackage rec {
34 disabled = pythonOlder "3.8";
36 src = fetchFromGitHub {
39 rev = "refs/tags/${version}";
40 # fetch sample files used in tests
41 fetchSubmodules = true;
42 hash = "sha256-ziJTYl7MQUCE8US0yeiq6BPDVbBsxWhti0NyiDnKtfE=";
51 substituteInPlace pyproject.toml \
52 --replace-fail "--disable-socket" ""
55 build-system = [ flit-core ];
63 dependencies = lib.optionals (pythonOlder "3.11") [ typing-extensions ];
65 optional-dependencies = rec {
66 full = crypto ++ image;
67 crypto = [ cryptography ];
71 pythonImportsCheck = [ "pypdf" ];
74 (fpdf2.overridePythonAttrs { doCheck = false; }) # avoid reference loop
77 ] ++ optional-dependencies.full;
80 # don't access the network
86 description = "Pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files";
87 homepage = "https://github.com/py-pdf/pypdf";
88 changelog = "https://github.com/py-pdf/pypdf/blob/${src.rev}/CHANGELOG.md";
89 license = licenses.bsd3;
90 maintainers = with maintainers; [ javaes ];