about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-mpl/default.nix
blob: 78d5243cf641727ce495719e9137408d0cb5a7d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ stdenv
, buildPythonPackage
, fetchPypi
, pytest
, matplotlib
, nose
, pillow
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "pytest-mpl";
  version = "0.12";

  src = fetchPypi {
    inherit pname version;
    sha256 = "4a223909e5148c99bd18891848c7871457729322c752c9c470bd8dd6bdf9f940";
  };

  buildInputs = [
    pytest
  ];

  propagatedBuildInputs = [
    matplotlib
    nose
    pillow
  ];

  checkInputs = [
    pytestCheckHook
  ];

  # Broken since b6e98f18950c2b5dbdc725c1181df2ad1be19fee
  disabledTests = [
    "test_hash_fails"
    "test_hash_missing"
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
    mkdir -p $HOME/.config/matplotlib
    echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
    ln -s $HOME/.config/matplotlib $HOME/.matplotlib
  '';

  meta = with stdenv.lib; {
    description = "Pytest plugin to help with testing figures output from Matplotlib";
    homepage = "https://github.com/matplotlib/pytest-mpl";
    license = licenses.bsd3;
    maintainers = [ maintainers.costrouc ];
  };
}