Files
nixpkgs/pkgs/development/python-modules/html5-parser/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

53 lines
925 B
Nix

{
lib,
beautifulsoup4,
buildPythonPackage,
chardet,
fetchFromGitHub,
lxml,
pkg-config,
pkgs,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "html5-parser";
version = "0.4.12";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "kovidgoyal";
repo = "html5-parser";
tag = "v${version}";
hash = "sha256-0Qn+To/d3+HMx+KhhgJBEHVYPOfIeBnngBraY7r4uSs=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ pkgs.libxml2 ];
propagatedBuildInputs = [
chardet
lxml
];
nativeCheckInputs = [
beautifulsoup4
pytestCheckHook
];
pythonImportsCheck = [ "html5_parser" ];
enabledTestPaths = [ "test/*.py" ];
meta = {
description = "Fast C based HTML 5 parsing for python";
homepage = "https://html5-parser.readthedocs.io";
license = lib.licenses.asl20;
maintainers = [ ];
};
}