2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
|
|
|
six,
|
|
|
|
webencodings,
|
|
|
|
mock,
|
|
|
|
pytest-expect,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "html5lib";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "b2e5b40261e20f354d198eae92afc10d750afb487ed5e50f9c4eaf07c184146f";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
patches = [
|
|
|
|
# Fix compatibility with pytest 6.
|
|
|
|
# Will be included in the next release after 1.1.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/html5lib/html5lib-python/commit/2c19b9899ab3a3e8bd0ca35e5d78544334204169.patch";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-VGCeB6o2QO/skeCZs8XLPfgEYVOSRL8cCpG7ajbZWEs=";
|
2022-01-26 04:04:25 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-26 17:43:05 +00:00
|
|
|
six
|
|
|
|
webencodings
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
# latest release not compatible with pytest 6
|
|
|
|
doCheck = false;
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-26 17:43:05 +00:00
|
|
|
mock
|
|
|
|
pytest-expect
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/html5lib/html5lib-python";
|
|
|
|
downloadPage = "https://github.com/html5lib/html5lib-python/releases";
|
|
|
|
description = "HTML parser based on WHAT-WG HTML5 specification";
|
|
|
|
longDescription = ''
|
|
|
|
html5lib is a pure-python library for parsing HTML. It is designed to
|
|
|
|
conform to the WHATWG HTML specification, as is implemented by all
|
|
|
|
major web browsers.
|
|
|
|
'';
|
|
|
|
license = lib.licenses.mit;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
domenkozar
|
|
|
|
prikhi
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|