Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, lxml 5, beautifulsoup4 6, pytestCheckHook 7}: 8 9buildPythonPackage rec { 10 pname = "html-sanitizer"; 11 version = "1.9.3"; 12 13 src = fetchFromGitHub { 14 owner = "matthiask"; 15 repo = pname; 16 rev = version; 17 hash = "sha256-1JSdi1PFM+N+UuEPfgWkOZw8S2PZ4ntadU0wnVJNnjw="; 18 }; 19 20 propagatedBuildInputs = [ 21 lxml 22 beautifulsoup4 23 ]; 24 25 nativeCheckInputs = [ 26 pytestCheckHook 27 ]; 28 29 pytestFlagsArray = [ 30 "html_sanitizer/tests.py" 31 ]; 32 33 disabledTests = [ 34 # Tests are sensitive to output 35 "test_billion_laughs" 36 "test_10_broken_html" 37 ]; 38 39 pythonImportsCheck = [ 40 "html_sanitizer" 41 ]; 42 43 meta = with lib; { 44 description = "Allowlist-based and very opinionated HTML sanitizer"; 45 homepage = "https://github.com/matthiask/html-sanitizer"; 46 license = with licenses; [ bsd3 ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}