diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index a268f34cc71a..fe5211802807 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -80,6 +80,12 @@ buildPythonPackage rec { pytestCheckHook ]; + postPatch = '' + # https://github.com/ocrmypdf/OCRmyPDF/issues/933 + substituteInPlace setup.cfg \ + --replace "pdfminer.six!=20200720,>=20191110,<=20211012" "pdfminer.six!=20200720,>=20191110,<=20220319" + ''; + pythonImportsCheck = [ "ocrmypdf" ]; diff --git a/pkgs/development/python-modules/pdfminer_six/default.nix b/pkgs/development/python-modules/pdfminer_six/default.nix index 6d2b0adcf41c..449ea4f7fd77 100644 --- a/pkgs/development/python-modules/pdfminer_six/default.nix +++ b/pkgs/development/python-modules/pdfminer_six/default.nix @@ -21,6 +21,12 @@ buildPythonPackage rec { done ''; + postPatch = '' + # Verion is not stored in repo, gets added by a GitHub action after tag is created + # https://github.com/pdfminer/pdfminer.six/pull/727 + substituteInPlace pdfminer/__init__.py --replace "__VERSION__" ${version} + ''; + checkInputs = [ pytestCheckHook ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pdfx/default.nix b/pkgs/development/python-modules/pdfx/default.nix index 3b63e67fddec..25efc4418bf9 100644 --- a/pkgs/development/python-modules/pdfx/default.nix +++ b/pkgs/development/python-modules/pdfx/default.nix @@ -13,7 +13,8 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ - --replace "chardet==4.0.0" "chardet" + --replace "chardet==4.0.0" "chardet" \ + --replace "pdfminer.six==20201018" "pdfminer.six" ''; propagatedBuildInputs = [ pdfminer chardet ]; diff --git a/pkgs/development/python-modules/scancode-toolkit/default.nix b/pkgs/development/python-modules/scancode-toolkit/default.nix index afde27967dbb..a5fdf3d547ed 100644 --- a/pkgs/development/python-modules/scancode-toolkit/default.nix +++ b/pkgs/development/python-modules/scancode-toolkit/default.nix @@ -131,6 +131,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace setup.cfg \ + --replace "pdfminer.six >= 20200101" "pdfminer.six" \ --replace "pluggy >= 0.12.0, < 1.0" "pluggy" \ --replace "pygmars >= 0.7.0" "pygmars" \ --replace "license_expression >= 21.6.14" "license_expression"