diff --git a/pkgs/development/python-modules/pypdf/default.nix b/pkgs/development/python-modules/pypdf/default.nix index b9176cc76dbe..0996d6f702fd 100644 --- a/pkgs/development/python-modules/pypdf/default.nix +++ b/pkgs/development/python-modules/pypdf/default.nix @@ -28,16 +28,18 @@ buildPythonPackage rec { pname = "pypdf"; - version = "5.0.0"; + version = "5.0.1"; pyproject = true; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "py-pdf"; repo = "pypdf"; rev = "refs/tags/${version}"; # fetch sample files used in tests fetchSubmodules = true; - hash = "sha256-omnNC1mzph59aqrXqLCuCk0LgzfJv/JhbQRrAgRhAIg="; + hash = "sha256-7ANx55OPqwY0dCtyTfCA1OybZi1vAX509RRMlAhYlcQ="; }; outputs = [ @@ -45,29 +47,20 @@ buildPythonPackage rec { "doc" ]; - nativeBuildInputs = [ - flit-core - - # docs - sphinxHook - sphinx-rtd-theme - myst-parser - ]; - - patches = [ - (fetchpatch2 { - # Mark test_increment_writer as enable_socket (https://github.com/py-pdf/pypdf/pull/2867) - url = "https://github.com/py-pdf/pypdf/commit/d974d5c755a7b65f3b9c68c5742afdbc0c1693f6.patch"; - hash = "sha256-4xiCAStP615IktTUgk31JbIxkxx8d6PQdu8Nfmhc1jo="; - }) - ]; - postPatch = '' substituteInPlace pyproject.toml \ --replace-fail "--disable-socket" "" ''; - propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ typing-extensions ]; + build-system = [ flit-core ]; + + nativeBuildInputs = [ + sphinxHook + sphinx-rtd-theme + myst-parser + ]; + + dependencies = lib.optionals (pythonOlder "3.11") [ typing-extensions ]; optional-dependencies = rec { full = crypto ++ image;