1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 setuptools,
6 setuptools-scm,
7 param,
8 pyct,
9 pytest-mpl,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "colorcet";
15 version = "3.1.0";
16 pyproject = true;
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-KSGzzYGiKIqvLWPbwM48JtzYgujDicxQXWiGv3qppOs=";
21 };
22
23 build-system = [
24 setuptools
25 setuptools-scm
26 ];
27
28 dependencies = [
29 param
30 pyct
31 ];
32
33 nativeCheckInputs = [
34 pytest-mpl
35 pytestCheckHook
36 ];
37
38 preCheck = ''
39 export HOME=$(mktemp -d)
40 mkdir -p $HOME/.config/matplotlib
41 echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
42 ln -s $HOME/.config/matplotlib $HOME/.matplotlib
43 '';
44
45 disabledTests = [ "matplotlib_default_colormap_plot" ];
46
47 pythonImportsCheck = [ "colorcet" ];
48
49 meta = with lib; {
50 description = "Collection of perceptually uniform colormaps";
51 mainProgram = "colorcet";
52 homepage = "https://colorcet.pyviz.org";
53 license = licenses.cc-by-40;
54 maintainers = [ ];
55 };
56}