From ebe97e5ad5f16b0d62317bf873d9690b9106b1aa Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sat, 13 Sep 2025 20:24:05 +0200 Subject: [PATCH 1/2] python3Packages.invisible-watermark: disable auto update There is no Git tag for the latest version, so the update script gets confused. To avoid the update script downgrading the version, disable automatic updates. --- pkgs/development/python-modules/invisible-watermark/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/invisible-watermark/default.nix b/pkgs/development/python-modules/invisible-watermark/default.nix index 00ca42d94b22..31ac39da8103 100644 --- a/pkgs/development/python-modules/invisible-watermark/default.nix +++ b/pkgs/development/python-modules/invisible-watermark/default.nix @@ -24,6 +24,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "ShieldMnt"; repo = "invisible-watermark"; + # nixpkgs-update: no auto update rev = "e58e451cff7e092457cd915e445b1a20b64a7c8f"; # No git tag, see https://github.com/ShieldMnt/invisible-watermark/issues/22 hash = "sha256-6SjVpKFtiiLLU7tZ3hBQr0KT/YEQyywJj0e21/dJRzk="; }; From fea626bbbf822fe9be61d60b199d45de88f6b99c Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 14 Sep 2025 13:18:23 +0200 Subject: [PATCH 2/2] python3Packages.invisible-watermark: modernize --- .../python-modules/invisible-watermark/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/invisible-watermark/default.nix b/pkgs/development/python-modules/invisible-watermark/default.nix index 31ac39da8103..212bbbc44ae5 100644 --- a/pkgs/development/python-modules/invisible-watermark/default.nix +++ b/pkgs/development/python-modules/invisible-watermark/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, + setuptools, opencv-python, torch, onnx, @@ -18,7 +19,7 @@ buildPythonPackage rec { pname = "invisible-watermark"; version = "0.2.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; src = fetchFromGitHub { @@ -29,7 +30,9 @@ buildPythonPackage rec { hash = "sha256-6SjVpKFtiiLLU7tZ3hBQr0KT/YEQyywJj0e21/dJRzk="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ opencv-python torch pillow @@ -92,11 +95,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "imwatermark" ]; - meta = with lib; { + meta = { description = "Library for creating and decoding invisible image watermarks"; mainProgram = "invisible-watermark"; homepage = "https://github.com/ShieldMnt/invisible-watermark"; - license = licenses.mit; - maintainers = with maintainers; [ Luflosi ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ Luflosi ]; }; }