2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchpatch
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
|
|
|
, wheel
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansi2html";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.8.0";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-OLgqKYSCofomE/D5yb6z23Ko+DLurFjrLke/Ms039tU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-build-requirements.patch";
|
|
|
|
url = "https://github.com/pycontribs/ansi2html/commit/be9c47dd39e500b2e34e95efde90d0a3b44daaee.patch";
|
|
|
|
hash = "sha256-nvOclsgysg+4sK694ppls0BLfq5MCJJQW3V/Ru30D/k=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-07 07:45:13 +00:00
|
|
|
preCheck = "export PATH=$PATH:$out/bin";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-12-07 07:45:13 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "ansi2html" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Convert text with ANSI color codes to HTML";
|
|
|
|
homepage = "https://github.com/ralphbean/ansi2html";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
maintainers = with maintainers; [ davidtwco ];
|
|
|
|
};
|
|
|
|
}
|