From 1473d85ec01cab2e68b253556a9ffb60274042eb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 30 Jun 2023 09:32:25 +0200 Subject: [PATCH 1/3] python311Packages.html-sanitizer: add changelog to meta --- pkgs/development/python-modules/html-sanitizer/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/html-sanitizer/default.nix b/pkgs/development/python-modules/html-sanitizer/default.nix index 4c75a2cbb3f0..fe84a012e734 100644 --- a/pkgs/development/python-modules/html-sanitizer/default.nix +++ b/pkgs/development/python-modules/html-sanitizer/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "matthiask"; repo = pname; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-1JSdi1PFM+N+UuEPfgWkOZw8S2PZ4ntadU0wnVJNnjw="; }; @@ -43,6 +43,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 ]; }; From b83192144f73b0fe664157bda143e4a93944d043 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 30 Jun 2023 09:33:17 +0200 Subject: [PATCH 2/3] python311Packages.html-sanitizer: add format - disable onb unsupported Python releases --- pkgs/development/python-modules/html-sanitizer/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/html-sanitizer/default.nix b/pkgs/development/python-modules/html-sanitizer/default.nix index fe84a012e734..8c747d8a7588 100644 --- a/pkgs/development/python-modules/html-sanitizer/default.nix +++ b/pkgs/development/python-modules/html-sanitizer/default.nix @@ -4,11 +4,15 @@ , lxml , beautifulsoup4 , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "html-sanitizer"; version = "1.9.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "matthiask"; From ea30de5da887784a5f60c86683d2120e261c4b34 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 30 Jun 2023 09:35:22 +0200 Subject: [PATCH 3/3] python311Packages.html-sanitizer: 1.9.3 -> 2.1 Diff: https://github.com/matthiask/html-sanitizer/compare/refs/tags/1.9.3...2.1 Changelog: https://github.com/matthiask/html-sanitizer/blob/2.1/CHANGELOG.rst --- .../python-modules/html-sanitizer/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/html-sanitizer/default.nix b/pkgs/development/python-modules/html-sanitizer/default.nix index 8c747d8a7588..e5446d31a6a9 100644 --- a/pkgs/development/python-modules/html-sanitizer/default.nix +++ b/pkgs/development/python-modules/html-sanitizer/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, hatchling , lxml , beautifulsoup4 , pytestCheckHook @@ -9,8 +10,8 @@ buildPythonPackage rec { pname = "html-sanitizer"; - version = "1.9.3"; - format = "setuptools"; + version = "2.1"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -18,9 +19,13 @@ buildPythonPackage rec { owner = "matthiask"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-1JSdi1PFM+N+UuEPfgWkOZw8S2PZ4ntadU0wnVJNnjw="; + hash = "sha256-t9mwsieFwdRPkOcnOc66lau+S9naK6Ys79zgIv3+3qw="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ lxml beautifulsoup4