1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, pytestCheckHook 6, setuptools 7, setuptools-scm 8, wheel 9}: 10 11buildPythonPackage rec { 12 pname = "ansi2html"; 13 version = "1.8.0"; 14 format = "pyproject"; 15 16 src = fetchPypi { 17 inherit pname version; 18 hash = "sha256-OLgqKYSCofomE/D5yb6z23Ko+DLurFjrLke/Ms039tU="; 19 }; 20 21 patches = [ 22 (fetchpatch { 23 name = "update-build-requirements.patch"; 24 url = "https://github.com/pycontribs/ansi2html/commit/be9c47dd39e500b2e34e95efde90d0a3b44daaee.patch"; 25 hash = "sha256-nvOclsgysg+4sK694ppls0BLfq5MCJJQW3V/Ru30D/k="; 26 }) 27 ]; 28 29 nativeBuildInputs = [ 30 setuptools 31 setuptools-scm 32 wheel 33 ]; 34 35 preCheck = "export PATH=$PATH:$out/bin"; 36 37 nativeCheckInputs = [ 38 pytestCheckHook 39 ]; 40 41 pythonImportsCheck = [ "ansi2html" ]; 42 43 meta = with lib; { 44 description = "Convert text with ANSI color codes to HTML"; 45 homepage = "https://github.com/ralphbean/ansi2html"; 46 license = licenses.lgpl3Plus; 47 maintainers = with maintainers; [ davidtwco ]; 48 }; 49}