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