1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 termcolor, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "sparklines"; 12 version = "0.7.0"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "deeplook"; 17 repo = "sparklines"; 18 tag = "v${version}"; 19 sha256 = "sha256-jiMrxZMWN+moap0bDH+uy66gF4XdGst9HJpnboJrQm4="; 20 }; 21 22 propagatedBuildInputs = [ 23 hatchling 24 termcolor 25 ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 pythonImportsCheck = [ "sparklines" ]; 30 31 postPatch = '' 32 export TMPDIR=$PWD/tmp 33 mkdir -p $TMPDIR 34 substituteInPlace tests/test_sparkline.py \ 35 --replace-fail "/tmp/" "$TMPDIR/" 36 ''; 37 38 meta = with lib; { 39 description = "This Python package implements Edward Tufte's concept of sparklines, but limited to text only"; 40 mainProgram = "sparklines"; 41 homepage = "https://github.com/deeplook/sparklines"; 42 maintainers = with maintainers; [ 43 rhoriguchi 44 ]; 45 license = licenses.mit; 46 }; 47}