2019-08-08 00:54:19 +01:00
|
|
|
{ stdenv
|
2019-07-14 22:31:28 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, matplotlib
|
|
|
|
, nose
|
2019-12-22 20:01:23 +00:00
|
|
|
, pillow
|
2019-07-14 22:31:28 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
2019-12-19 19:31:20 +00:00
|
|
|
version = "0.11";
|
2019-07-14 22:31:28 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-19 19:31:20 +00:00
|
|
|
sha256 = "26c5a47a8fdbc04652f18b65c587da642c6cc0354680ee44b16c161d9800a2ce";
|
2019-07-14 22:31:28 +01:00
|
|
|
};
|
|
|
|
|
2019-08-08 00:54:19 +01:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2019-07-14 22:31:28 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
nose
|
2019-12-22 20:01:23 +00:00
|
|
|
pillow
|
2019-07-14 22:31:28 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-07-16 13:00:08 +01:00
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.config/matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
|
2019-09-07 12:53:22 +01:00
|
|
|
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
|
2019-07-16 13:00:08 +01:00
|
|
|
|
2019-07-14 22:31:28 +01:00
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
2019-08-08 00:54:19 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-07-16 13:00:08 +01:00
|
|
|
description = "Pytest plugin to help with testing figures output from Matplotlib";
|
2019-07-14 22:31:28 +01:00
|
|
|
homepage = https://github.com/matplotlib/pytest-mpl;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|