Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.6 kB · 92 lines
Nix
at litex
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
# build-system, flit-core
# docs, sphinxHook, sphinx-rtd-theme, myst-parser
# propagates, typing-extensions
# optionals, pycryptodome, pillow
# tests, pytestCheckHook}:
buildPythonPackage rec { pname = "pypdf"; version = "3.5.2"; format = "pyproject";
src = fetchFromGitHub { owner = "py-pdf"; repo = "pypdf"; rev = "refs/tags/${version}"; # fetch sample files used in tests fetchSubmodules = true; hash = "sha256-f+M4sfUzDy8hxHUiWG9hyu0EYvnjNA46OtHzBSJdID0="; };
outputs = [ "out" "doc" ];
nativeBuildInputs = [ flit-core
# docs sphinxHook sphinx-rtd-theme myst-parser ];
postPatch = '' substituteInPlace pyproject.toml \ --replace "--disable-socket" "" '';
propagatedBuildInputs = lib.optionals (pythonOlder "3.10") [ typing-extensions ];
passthru.optional-dependencies = rec { full = crypto ++ image; crypto = [ pycryptodome ]; image = [ pillow ]; };
pythonImportsCheck = [ "pypdf" ];
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.full;
pytestFlagsArray = [ # don't access the network "-m" "'not enable_socket'" ];
meta = with lib; { description = "A pure-python PDF library capable of splitting, merging, cropping, and transforming the pages of PDF files"; homepage = "https://github.com/py-pdf/pypdf"; changelog = "https://github.com/py-pdf/pypdf/blob/${src.rev}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ hexa ]; };}