Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 chardet, 5 fetchPypi, 6 freetype, 7 pillow, 8 setuptools, 9 glibcLocales, 10 python, 11 isPyPy, 12}: 13 14let 15 ft = freetype.overrideAttrs (oldArgs: { 16 dontDisableStatic = true; 17 }); 18in 19buildPythonPackage rec { 20 pname = "reportlab"; 21 version = "4.2.2"; 22 pyproject = true; 23 24 # See https://bitbucket.org/pypy/compatibility/wiki/reportlab%20toolkit 25 disabled = isPyPy; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-dl7svdaEkcVpR+KcOLi2m4NO5du90vt0CfCOvevwRCg="; 30 }; 31 32 postPatch = '' 33 # Remove all the test files that require access to the internet to pass. 34 rm tests/test_lib_utils.py 35 rm tests/test_platypus_general.py 36 rm tests/test_platypus_images.py 37 38 # Remove the tests that require Vera fonts installed 39 rm tests/test_graphics_render.py 40 rm tests/test_graphics_charts.py 41 ''; 42 43 nativeBuildInputs = [ setuptools ]; 44 45 buildInputs = [ ft ]; 46 47 propagatedBuildInputs = [ 48 chardet 49 pillow 50 ]; 51 52 nativeCheckInputs = [ glibcLocales ]; 53 54 checkPhase = '' 55 runHook preCheck 56 pushd tests 57 LC_ALL="en_US.UTF-8" ${python.interpreter} runAll.py 58 popd 59 runHook postCheck 60 ''; 61 62 meta = with lib; { 63 description = "Open Source Python library for generating PDFs and graphics"; 64 homepage = "https://www.reportlab.com/"; 65 license = licenses.bsd3; 66 maintainers = [ ]; 67 }; 68}