summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/default.nix')
-rw-r--r--pkgs/development/python-modules/termplotlib/default.nix26
1 files changed, 21 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/termplotlib/default.nix b/pkgs/development/python-modules/termplotlib/default.nix
index 06432b673afd..fde1080491e0 100644
--- a/pkgs/development/python-modules/termplotlib/default.nix
+++ b/pkgs/development/python-modules/termplotlib/default.nix
@@ -1,4 +1,5 @@
{ lib
+, substituteAll
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
@@ -19,13 +20,28 @@ buildPythonPackage rec {
};
format = "pyproject";
- checkInputs = [ pytestCheckHook numpy exdown gnuplot ];
+ checkInputs = [
+ pytestCheckHook
+ exdown
+ ];
pythonImportsCheck = [ "termplotlib" ];
- # there seems to be a newline in the very front of the output
- # which causes the test to fail, since it apparently doesn't
- # strip whitespace. might be a gnuplot choice? sigh...
- disabledTests = [ "test_plot_lim" ];
+ propagatedBuildInputs = [ numpy ];
+
+ patches = [
+ (substituteAll {
+ src = ./gnuplot-subprocess.patch;
+ gnuplot = "${gnuplot.out}/bin/gnuplot";
+ })
+ ];
+
+ # The current gnuplot version renders slightly different test
+ # graphs, with emphasis on slightly. The plots are still correct.
+ # Tests pass on gnuplot 5.4.1, but fail on 5.4.2.
+ disabledTests = [
+ "test_plot"
+ "test_nolabel"
+ ];
meta = with lib; {
description = "matplotlib for your terminal";