From fdd622d9c2a9eb4aa4b5012a25f2cb317fbafc56 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Wed, 24 Feb 2021 14:07:44 -0600 Subject: [PATCH] python3Packages.termplotlib: init at 0.3.4 Signed-off-by: Austin Seipp --- .../python-modules/termplotlib/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/termplotlib/default.nix diff --git a/pkgs/development/python-modules/termplotlib/default.nix b/pkgs/development/python-modules/termplotlib/default.nix new file mode 100644 index 000000000000..adccc99ac2fe --- /dev/null +++ b/pkgs/development/python-modules/termplotlib/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, exdown +, numpy +, gnuplot +}: + +buildPythonPackage rec { + pname = "termplotlib"; + version = "0.3.4"; + + src = fetchFromGitHub { + owner = "nschloe"; + repo = pname; + rev = "v${version}"; + sha256 = "17d2727bz6kqhxczixx6nxzz4hzyi2cssylzazjimk07syvycd6n"; + }; + + format = "pyproject"; + checkInputs = [ pytestCheckHook numpy exdown gnuplot ]; + 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" ]; + + meta = with lib; { + description = "matplotlib for your terminal"; + homepage = "https://github.com/nschloe/termplotlib"; + license = with licenses; [ gpl3Plus ]; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e9c24fd9dba3..54ed3f916769 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7790,6 +7790,8 @@ in { terminaltables = callPackage ../development/python-modules/terminaltables { }; + termplotlib = callPackage ../development/python-modules/termplotlib { }; + termstyle = callPackage ../development/python-modules/termstyle { }; teslajsonpy = callPackage ../development/python-modules/teslajsonpy { };