1{ 2 lib, 3 beautifulsoup4, 4 buildPythonPackage, 5 chardet, 6 fetchFromGitHub, 7 lxml, 8 pkg-config, 9 pkgs, 10 pytestCheckHook, 11 pythonOlder, 12}: 13 14buildPythonPackage rec { 15 pname = "html5-parser"; 16 version = "0.4.12"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "kovidgoyal"; 23 repo = "html5-parser"; 24 tag = "v${version}"; 25 hash = "sha256-0Qn+To/d3+HMx+KhhgJBEHVYPOfIeBnngBraY7r4uSs="; 26 }; 27 28 nativeBuildInputs = [ pkg-config ]; 29 30 buildInputs = [ pkgs.libxml2 ]; 31 32 propagatedBuildInputs = [ 33 chardet 34 lxml 35 ]; 36 37 nativeCheckInputs = [ 38 beautifulsoup4 39 pytestCheckHook 40 ]; 41 42 pythonImportsCheck = [ "html5_parser" ]; 43 44 enabledTestPaths = [ "test/*.py" ]; 45 46 meta = with lib; { 47 description = "Fast C based HTML 5 parsing for python"; 48 homepage = "https://html5-parser.readthedocs.io"; 49 license = licenses.asl20; 50 maintainers = [ ]; 51 }; 52}