at 22.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytestCheckHook 5, six 6, html5lib 7, setuptools 8, packaging 9, pythonOlder 10}: 11 12buildPythonPackage rec { 13 pname = "bleach"; 14 version = "4.1.0"; 15 disabled = pythonOlder "3.6"; 16 17 src = fetchPypi { 18 inherit pname version; 19 sha256 = "sha256-CQDYs366YagC7kCsAGH4wrXe4pwZJ90dIz4HXr9acdo="; 20 }; 21 22 propagatedBuildInputs = [ 23 packaging 24 six 25 html5lib 26 setuptools 27 ]; 28 29 checkInputs = [ 30 pytestCheckHook 31 ]; 32 33 disabledTests = [ 34 # Disable network tests 35 "protocols" 36 ]; 37 38 pythonImportsCheck = [ "bleach" ]; 39 40 meta = with lib; { 41 description = "An easy, HTML5, whitelisting HTML sanitizer"; 42 longDescription = '' 43 Bleach is an HTML sanitizing library that escapes or strips markup and 44 attributes based on a white list. Bleach can also linkify text safely, 45 applying filters that Django's urlize filter cannot, and optionally 46 setting rel attributes, even on links already in the text. 47 48 Bleach is intended for sanitizing text from untrusted sources. If you 49 find yourself jumping through hoops to allow your site administrators 50 to do lots of things, you're probably outside the use cases. Either 51 trust those users, or don't. 52 ''; 53 homepage = "https://github.com/mozilla/bleach"; 54 downloadPage = "https://github.com/mozilla/bleach/releases"; 55 license = licenses.asl20; 56 maintainers = with maintainers; [ prikhi ]; 57 }; 58}