about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/colorcet/default.nix4
-rw-r--r--pkgs/development/python-modules/pytest-mpl/default.nix37
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/colorcet/default.nix b/pkgs/development/python-modules/colorcet/default.nix
index 83095a6a5626..6a7328aaf73c 100644
--- a/pkgs/development/python-modules/colorcet/default.nix
+++ b/pkgs/development/python-modules/colorcet/default.nix
@@ -31,6 +31,10 @@ buildPythonPackage rec {
   ];
 
   checkPhase = ''
+    export HOME=$(mktemp -d)
+    mkdir -p $HOME/.config/matplotlib
+    echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
+
     pytest colorcet
   '';
 
diff --git a/pkgs/development/python-modules/pytest-mpl/default.nix b/pkgs/development/python-modules/pytest-mpl/default.nix
new file mode 100644
index 000000000000..c3bd4c59f049
--- /dev/null
+++ b/pkgs/development/python-modules/pytest-mpl/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytest
+, matplotlib
+, nose
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-mpl";
+  version = "0.10";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "7006e63bf1ca9c50bea3d189c0f862751a16ce40bb373197b218f57af5b837c0";
+  };
+
+  propagatedBuildInputs = [
+    matplotlib
+    nose
+  ];
+
+  checkInputs = [
+    pytest
+  ];
+
+  checkPhase = ''
+    pytest
+  '';
+
+  meta = with 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 ];
+  };
+}