@@ -1,28 +1,24 @@
1−{ lib, buildPythonPackage, fetchFromGitHub, pdfminer, chardet, pytest }:
1+{ lib, buildPythonPackage, fetchFromGitHub, pdfminer, chardet, pytestCheckHook }:
22
33buildPythonPackage rec {
44 pname = "pdfx";
5− version = "1.3.1";
5+ version = "1.4.1";
66
77 src = fetchFromGitHub {
88 owner = "metachris";
99 repo = "pdfx";
1010 rev = "v${version}";
11− sha256 = "1183k4h5qdf8y0imbir9ja3yzzsvdmqgbv3bi6dnkgr1wy2xfr0v";
11+ sha256 = "sha256-POpP6XwcqwvImrtIiDjpnHoNE0MKapuPjxojo+ocBK0=";
1212 };
1313
14− # Remove after https://github.com/metachris/pdfx/pull/28
15− prePatch = ''
16− sed -i -e "s|pdfminer2|pdfminer.six|" setup.py
14+ postPatch = ''
15+ substituteInPlace requirements.txt \
16+ --replace "chardet==4.0.0" "chardet"
1717 '';
1818
1919 propagatedBuildInputs = [ pdfminer chardet ];
2020
21− checkInputs = [ pytest ];
22−
23− checkPhase = ''
24− py.test
25− '';
21+ checkInputs = [ pytestCheckHook ];
2622
2723 meta = with lib; {
2824 inherit (src.meta) homepage;