nixpkgs/pkgs/development/python-modules/colorcet/default.nix

50 lines
959 B
Nix
Raw Normal View History

{ stdenv
2019-07-14 21:31:04 +00:00
, buildPythonPackage
, fetchPypi
, param
, pyct
, nbsmoke
, flake8
, pytest
, pytest-mpl
}:
buildPythonPackage rec {
pname = "colorcet";
version = "2.0.2";
2019-07-14 21:31:04 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "1vkx00im4s6zhr2m1j9r0a5vmhkl488b4xpzxb1pidbl19wi6j2i";
2019-07-14 21:31:04 +00:00
};
propagatedBuildInputs = [
param
pyct
];
checkInputs = [
nbsmoke
pytest
flake8
pytest-mpl
];
checkPhase = ''
2019-07-14 21:31:28 +00:00
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
2019-07-14 21:31:28 +00:00
2019-12-22 23:47:24 +00:00
# requires other backends to be available
pytest colorcet -k 'not matplotlib_default_colormap_plot'
2019-07-14 21:31:04 +00:00
'';
meta = with stdenv.lib; {
2019-07-14 21:31:04 +00:00
description = "Collection of perceptually uniform colormaps";
homepage = "https://colorcet.pyviz.org";
2019-07-14 21:31:04 +00:00
license = licenses.cc-by-40;
maintainers = [ maintainers.costrouc ];
};
}