1{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, cryptography, chardet, nose, sortedcontainers }:
2
3buildPythonPackage rec {
4 pname = "pdfminer_six";
5 version = "20201018";
6
7 disabled = !isPy3k;
8
9 src = fetchFromGitHub {
10 owner = "pdfminer";
11 repo = "pdfminer.six";
12 rev = version;
13 sha256 = "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr";
14 };
15
16 propagatedBuildInputs = [ chardet cryptography sortedcontainers ];
17
18 postInstall = ''
19 for file in $out/bin/*.py; do
20 ln $file ''${file//.py/}
21 done
22 '';
23
24 checkInputs = [ nose ];
25 checkPhase = ''
26 nosetests
27 '';
28
29 meta = with lib; {
30 description = "PDF parser and analyzer";
31 homepage = "https://github.com/pdfminer/pdfminer.six";
32 license = licenses.mit;
33 maintainers = with maintainers; [ psyanticy marsam ];
34 };
35}