1{ 2 lib, 3 pkgs, 4 buildPythonPackage, 5 fetchFromGitHub, 6 jupyterlab, 7 nbexec, 8 pandas, 9 pandas-stubs, 10 pdfminer-six, 11 pillow, 12 pypdfium2, 13 pytest-cov, 14 pytest-parallel, 15 pytestCheckHook, 16 types-pillow, 17}: 18 19buildPythonPackage rec { 20 pname = "pdfplumber"; 21 version = "0.11.5"; 22 format = "setuptools"; 23 24 src = fetchFromGitHub { 25 owner = "jsvine"; 26 repo = "pdfplumber"; 27 tag = "v${version}"; 28 hash = "sha256-oe6lZyQKXASzG7Ho6o7mlXY+BOgVBaACebxbYD+1+x0="; 29 }; 30 31 dependencies = [ 32 pdfminer-six 33 pillow 34 pypdfium2 35 ]; 36 37 preCheck = '' 38 export HOME=$(mktemp -d) 39 # test_issue_1089 assumes the soft limit on open files is "low", otherwise it never completes 40 # reported at: https://github.com/jsvine/pdfplumber/issues/1263 41 ulimit -n 1024 42 ''; 43 44 nativeCheckInputs = [ 45 pkgs.ghostscript 46 jupyterlab 47 nbexec 48 pandas 49 pandas-stubs 50 pytest-cov 51 pytest-parallel 52 pytestCheckHook 53 types-pillow 54 ]; 55 56 pythonImportsCheck = [ "pdfplumber" ]; 57 58 meta = { 59 description = "Plumb a PDF for detailed information about each char, rectangle, line, et cetera and easily extract text and tables"; 60 mainProgram = "pdfplumber"; 61 homepage = "https://github.com/jsvine/pdfplumber"; 62 changelog = "https://github.com/jsvine/pdfplumber/releases/tag/v${version}"; 63 license = lib.licenses.mit; 64 maintainers = with lib.maintainers; [ happysalada ]; 65 }; 66}