diff --git a/pkgs/development/python-modules/html-sanitizer/default.nix b/pkgs/development/python-modules/html-sanitizer/default.nix index 4c75a2cbb3f0..e5446d31a6a9 100644 --- a/pkgs/development/python-modules/html-sanitizer/default.nix +++ b/pkgs/development/python-modules/html-sanitizer/default.nix @@ -1,22 +1,31 @@ { lib , buildPythonPackage , fetchFromGitHub +, hatchling , lxml , beautifulsoup4 , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "html-sanitizer"; - version = "1.9.3"; + version = "2.1"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "matthiask"; repo = pname; - rev = version; - hash = "sha256-1JSdi1PFM+N+UuEPfgWkOZw8S2PZ4ntadU0wnVJNnjw="; + rev = "refs/tags/${version}"; + hash = "sha256-t9mwsieFwdRPkOcnOc66lau+S9naK6Ys79zgIv3+3qw="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ lxml beautifulsoup4 @@ -43,6 +52,7 @@ buildPythonPackage rec { meta = with lib; { description = "Allowlist-based and very opinionated HTML sanitizer"; homepage = "https://github.com/matthiask/html-sanitizer"; + changelog = "https://github.com/matthiask/html-sanitizer/blob/${version}/CHANGELOG.rst"; license = with licenses; [ bsd3 ]; maintainers = with maintainers; [ fab ]; };