diff --git a/pkgs/development/python-modules/pdftotext/default.nix b/pkgs/development/python-modules/pdftotext/default.nix index dd22bc5be65b..2ba18dd92e4e 100644 --- a/pkgs/development/python-modules/pdftotext/default.nix +++ b/pkgs/development/python-modules/pdftotext/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, poppler }: +{ lib, stdenv, buildPythonPackage, fetchPypi, poppler }: buildPythonPackage rec { pname = "pdftotext"; @@ -9,6 +9,11 @@ buildPythonPackage rec { sha256 = "a067c121654917ecbe07fbd71c807c34bbdb1ea029e269ddd11925ee7e191d3f"; }; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace setup.py \ + --replace '= brew_poppler_include()' '= "${lib.getDev poppler}/include", "${lib.getLib poppler}/lib"' + ''; + buildInputs = [ poppler ]; meta = with lib; {