Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.1 kB view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, isPyPy 5, flask 6, pyquery 7, pytest 8, pytestrunner 9, cairosvg 10, tinycss 11, cssselect 12, lxml 13}: 14 15buildPythonPackage rec { 16 pname = "pygal"; 17 version = "2.4.0"; 18 19 doCheck = !isPyPy; # one check fails with pypy 20 21 src = fetchPypi { 22 inherit pname version; 23 sha256 = "9204f05380b02a8a32f9bf99d310b51aa2a932cba5b369f7a4dc3705f0a4ce83"; 24 }; 25 26 buildInputs = [ 27 flask 28 pyquery 29 30 # Should be a check input, but upstream lists it under "setup_requires". 31 # https://github.com/Kozea/pygal/issues/430 32 pytestrunner 33 ]; 34 35 checkInputs = [ 36 pytest 37 ]; 38 39 preCheck = '' 40 # necessary on darwin to pass the testsuite 41 export LANG=en_US.UTF-8 42 ''; 43 44 postPatch = '' 45 substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]" 46 ''; 47 48 propagatedBuildInputs = [ cairosvg tinycss cssselect ] 49 ++ stdenv.lib.optionals (!isPyPy) [ lxml ]; 50 51 meta = with stdenv.lib; { 52 description = "Sexy and simple python charting"; 53 homepage = "http://www.pygal.org"; 54 license = licenses.lgpl3; 55 maintainers = with maintainers; [ sjourdois ]; 56 }; 57 58}