2021-02-13 14:23:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, pytestCheckHook
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "html2text";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2024.2.26";
|
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Alir3z4";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "html2text";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
sha256 = "sha256-1CLkTFR+/XQ428WjMF7wliyAG6CB+n8JSsLDdLHPO7I=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "html2text" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/Alir3z4/html2text/blob/${src.rev}/ChangeLog.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Turn HTML into equivalent Markdown-structured text";
|
|
|
|
homepage = "https://github.com/Alir3z4/html2text/";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl3Only;
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "html2text";
|
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|