From bf12977ecb316a33cbc5480a37204d1af606424f Mon Sep 17 00:00:00 2001 From: jokatzke Date: Tue, 15 Oct 2024 14:00:05 +0200 Subject: [PATCH] python3Packages.pdf2image: fix providing of `poppler_utils` Due to a change in the upstream code, the previous substitution of `poppler_path` stopped working (quietly). With this fix, it works again and will fail with an error, should another, similar change occur. (cherry picked from commit d794015a06848629beb9e85dbe0ab15dcbe55cce) --- pkgs/development/python-modules/pdf2image/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pdf2image/default.nix b/pkgs/development/python-modules/pdf2image/default.nix index d7983145cd34..b7f3f6e197f3 100644 --- a/pkgs/development/python-modules/pdf2image/default.nix +++ b/pkgs/development/python-modules/pdf2image/default.nix @@ -20,8 +20,10 @@ buildPythonPackage rec { }; postPatch = '' - # Only replace first match in file - sed -i '0,/poppler_path=None/s||poppler_path="${poppler_utils}/bin"|' pdf2image/pdf2image.py + # replace all default values of paths to poppler_utils + substituteInPlace pdf2image/pdf2image.py \ + --replace-fail 'poppler_path: Union[str, PurePath] = None' \ + 'poppler_path: Union[str, PurePath] = "${poppler_utils}/bin"' ''; propagatedBuildInputs = [ pillow ];