2020-04-01 02:20:00 -07:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k, pycryptodome, chardet, nose, sortedcontainers, fetchpatch }:
|
2018-05-28 17:15:40 -07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pdfminer_six";
|
2020-04-01 02:20:00 -07:00
|
|
|
version = "20200402";
|
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2018-05-28 17:15:40 -07:00
|
|
|
|
2019-12-15 01:20:00 -08:00
|
|
|
# No tests in PyPi Tarball
|
2018-05-28 17:15:40 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pdfminer";
|
|
|
|
repo = "pdfminer.six";
|
2019-09-08 16:38:31 -07:00
|
|
|
rev = version;
|
2020-04-01 02:20:00 -07:00
|
|
|
sha256 = "1wl64r3ifpwi7mm5pcxc0ji7w380nxcq3zrv66n95lglm4zqkf26";
|
2018-05-28 17:15:40 -07:00
|
|
|
};
|
|
|
|
|
2020-04-01 02:20:00 -07:00
|
|
|
patches = [
|
|
|
|
# Add shebang line to scripts. See: https://github.com/pdfminer/pdfminer.six/pull/408
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/pdfminer/pdfminer.six/commit/0c2f44b6de064d9a3cea99bde5b8e9c6a525a69c.patch";
|
|
|
|
sha256 = "1vml66grnvg4g26mya24kiyxsz809d4mr7wz8qmawjbn4ss65y21";
|
|
|
|
excludes = [ "CHANGELOG.md" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ chardet pycryptodome sortedcontainers ];
|
2019-03-12 18:55:52 -07:00
|
|
|
|
2019-12-15 01:20:00 -08:00
|
|
|
checkInputs = [ nose ];
|
2018-05-28 17:15:40 -07:00
|
|
|
checkPhase = ''
|
2019-12-15 01:20:00 -08:00
|
|
|
nosetests
|
2018-05-28 17:15:40 -07:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:20:00 -07:00
|
|
|
description = "PDF parser and analyzer";
|
|
|
|
homepage = "https://github.com/pdfminer/pdfminer.six";
|
2018-05-28 17:15:40 -07:00
|
|
|
license = licenses.mit;
|
2019-12-15 01:21:00 -08:00
|
|
|
maintainers = with maintainers; [ psyanticy marsam ];
|
2018-05-28 17:15:40 -07:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|