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