linuxPackages_latest.broadcom_sta: add patch to compile on Kernel 6.12 (#359484)
[NixPkgs.git] / pkgs / development / python-modules / html-sanitizer / default.nix
blob5a3ff0947db8350b2fa53babc71c5ca47fb83d62
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   hatchling,
6   lxml,
7   lxml-html-clean,
8   beautifulsoup4,
9   pytestCheckHook,
10   pythonOlder,
13 buildPythonPackage rec {
14   pname = "html-sanitizer";
15   version = "2.4.4";
16   pyproject = true;
18   disabled = pythonOlder "3.7";
20   src = fetchFromGitHub {
21     owner = "matthiask";
22     repo = "html-sanitizer";
23     rev = "refs/tags/${version}";
24     hash = "sha256-6OWFLsuefeDzQ1uHnLmboKDgrbY/xJCwqsSQlDaJlRs=";
25   };
27   nativeBuildInputs = [ hatchling ];
29   propagatedBuildInputs = [
30     lxml
31     lxml-html-clean
32     beautifulsoup4
33   ];
35   nativeCheckInputs = [ pytestCheckHook ];
37   pytestFlagsArray = [ "html_sanitizer/tests.py" ];
39   disabledTests = [
40     # Tests are sensitive to output
41     "test_billion_laughs"
42     "test_10_broken_html"
43   ];
45   pythonImportsCheck = [ "html_sanitizer" ];
47   meta = with lib; {
48     description = "Allowlist-based and very opinionated HTML sanitizer";
49     homepage = "https://github.com/matthiask/html-sanitizer";
50     changelog = "https://github.com/matthiask/html-sanitizer/blob/${version}/CHANGELOG.rst";
51     license = with licenses; [ bsd3 ];
52     maintainers = with maintainers; [ fab ];
53   };