1{ lib 2, substituteAll 3, buildPythonPackage 4, fetchFromGitHub 5, pytestCheckHook 6, exdown 7, numpy 8, gnuplot 9}: 10 11buildPythonPackage rec { 12 pname = "termplotlib"; 13 version = "0.3.9"; 14 15 src = fetchFromGitHub { 16 owner = "nschloe"; 17 repo = pname; 18 rev = "v${version}"; 19 sha256 = "1qfrv2w7vb2bbjvd5lqfq57c23iqkry0pwmif1ha3asmz330rja1"; 20 }; 21 22 format = "pyproject"; 23 checkInputs = [ 24 pytestCheckHook 25 exdown 26 ]; 27 pythonImportsCheck = [ "termplotlib" ]; 28 29 propagatedBuildInputs = [ numpy ]; 30 31 patches = [ 32 (substituteAll { 33 src = ./gnuplot-subprocess.patch; 34 gnuplot = "${gnuplot.out}/bin/gnuplot"; 35 }) 36 ]; 37 38 # The current gnuplot version renders slightly different test 39 # graphs, with emphasis on slightly. The plots are still correct. 40 # Tests pass on gnuplot 5.4.1, but fail on 5.4.2. 41 disabledTests = [ 42 "test_plot" 43 "test_nolabel" 44 ]; 45 46 meta = with lib; { 47 description = "matplotlib for your terminal"; 48 homepage = "https://github.com/nschloe/termplotlib"; 49 license = with licenses; [ gpl3Plus ]; 50 maintainers = with maintainers; [ thoughtpolice ]; 51 }; 52}