2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
|
|
|
, matplotlib
|
|
|
|
, nose
|
|
|
|
, pillow
|
2020-12-09 12:39:15 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-mpl";
|
2020-12-07 07:45:13 +00:00
|
|
|
version = "0.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-12-07 07:45:13 +00:00
|
|
|
sha256 = "4a223909e5148c99bd18891848c7871457729322c752c9c470bd8dd6bdf9f940";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
matplotlib
|
|
|
|
nose
|
|
|
|
pillow
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2020-12-09 12:39:15 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-12-09 12:39:15 +00:00
|
|
|
# Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
|
|
|
|
disabledTests = [
|
|
|
|
"test_hash_fails"
|
|
|
|
"test_hash_missing"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Pytest plugin to help with testing figures output from Matplotlib";
|
|
|
|
homepage = "https://github.com/matplotlib/pytest-mpl";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|