1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, pytest
5, matplotlib
6, nose
7, pillow
8}:
9
10buildPythonPackage rec {
11 pname = "pytest-mpl";
12 version = "0.11";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "26c5a47a8fdbc04652f18b65c587da642c6cc0354680ee44b16c161d9800a2ce";
17 };
18
19 buildInputs = [ pytest ];
20
21 propagatedBuildInputs = [
22 matplotlib
23 nose
24 pillow
25 ];
26
27 checkInputs = [
28 pytest
29 ];
30
31 checkPhase = ''
32 export HOME=$(mktemp -d)
33 mkdir -p $HOME/.config/matplotlib
34 echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
35 ln -s $HOME/.config/matplotlib $HOME/.matplotlib
36
37 pytest
38 '';
39
40 meta = with stdenv.lib; {
41 description = "Pytest plugin to help with testing figures output from Matplotlib";
42 homepage = "https://github.com/matplotlib/pytest-mpl";
43 license = licenses.bsd3;
44 maintainers = [ maintainers.costrouc ];
45 };
46}