Merge sublime4: 4189 -> 4192; sublime4-dev: 4188 -> 4191 (#378651)
[NixPkgs.git] / pkgs / development / python-modules / bleach / default.nix
blob290aa1913b817a0c37f98dd953e84fc93c4a5ce1
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   pytestCheckHook,
6   html5lib,
7   setuptools,
8   tinycss2,
9   packaging,
10   webencodings,
13 buildPythonPackage rec {
14   pname = "bleach";
15   version = "6.2.0";
16   pyproject = true;
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-Ej6JQRi4pZn9gNPsGm1Mx85OWIKxMXp+G6abVulfmR8=";
21   };
23   nativeBuildInputs = [ setuptools ];
25   propagatedBuildInputs = [
26     html5lib
27     packaging
28     setuptools
29     webencodings
30   ];
32   optional-dependencies = {
33     css = [ tinycss2 ];
34   };
36   nativeCheckInputs = [ pytestCheckHook ];
38   disabledTests = [
39     # Disable network tests
40     "protocols"
41   ];
43   pythonImportsCheck = [ "bleach" ];
45   meta = with lib; {
46     description = "Easy, HTML5, whitelisting HTML sanitizer";
47     longDescription = ''
48       Bleach is an HTML sanitizing library that escapes or strips markup and
49       attributes based on a white list. Bleach can also linkify text safely,
50       applying filters that Django's urlize filter cannot, and optionally
51       setting rel attributes, even on links already in the text.
53       Bleach is intended for sanitizing text from untrusted sources. If you
54       find yourself jumping through hoops to allow your site administrators
55       to do lots of things, you're probably outside the use cases. Either
56       trust those users, or don't.
57     '';
58     homepage = "https://github.com/mozilla/bleach";
59     downloadPage = "https://github.com/mozilla/bleach/releases";
60     changelog = "https://github.com/mozilla/bleach/blob/v${version}/CHANGES";
61     license = licenses.asl20;
62     maintainers = with maintainers; [ prikhi ];
63   };