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