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