Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 49 lines 959 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, param 5, pyct 6, nbsmoke 7, flake8 8, pytest 9, pytest-mpl 10}: 11 12buildPythonPackage rec { 13 pname = "colorcet"; 14 version = "2.0.2"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "1vkx00im4s6zhr2m1j9r0a5vmhkl488b4xpzxb1pidbl19wi6j2i"; 19 }; 20 21 propagatedBuildInputs = [ 22 param 23 pyct 24 ]; 25 26 checkInputs = [ 27 nbsmoke 28 pytest 29 flake8 30 pytest-mpl 31 ]; 32 33 checkPhase = '' 34 export HOME=$(mktemp -d) 35 mkdir -p $HOME/.config/matplotlib 36 echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc 37 ln -s $HOME/.config/matplotlib $HOME/.matplotlib 38 39 # requires other backends to be available 40 pytest colorcet -k 'not matplotlib_default_colormap_plot' 41 ''; 42 43 meta = with stdenv.lib; { 44 description = "Collection of perceptually uniform colormaps"; 45 homepage = "https://colorcet.pyviz.org"; 46 license = licenses.cc-by-40; 47 maintainers = [ maintainers.costrouc ]; 48 }; 49}