1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, lxml
5, beautifulsoup4
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "html-sanitizer";
11 version = "1.9.1";
12
13 src = fetchFromGitHub {
14 owner = "matthiask";
15 repo = pname;
16 rev = version;
17 sha256 = "0nnv34924r0yn01rwlk749j5ijy7yxyj302s1i57yjrkqr3zlvas";
18 };
19
20 propagatedBuildInputs = [
21 lxml
22 beautifulsoup4
23 ];
24
25 checkInputs = [
26 pytestCheckHook
27 ];
28
29 pytestFlagsArray = [ "html_sanitizer/tests.py" ];
30
31 pythonImportsCheck = [ "html_sanitizer" ];
32
33 meta = with lib; {
34 description = "Allowlist-based and very opinionated HTML sanitizer";
35 homepage = "https://github.com/matthiask/html-sanitizer";
36 license = with licenses; [ bsd3 ];
37 maintainers = with maintainers; [ fab ];
38 };
39}