Merge pull request #194961 from Luflosi/add/python3Packages.invisible-watermark

This commit is contained in:
Sandro 2022-12-04 21:57:02 +01:00 committed by GitHub
commit 9adcb1e712
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,49 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, opencv4
, pytorch
, onnx
, onnxruntime
, pillow
, pywavelets
, numpy
}:
buildPythonPackage rec {
pname = "invisible-watermark";
version = "0.1.5";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "ShieldMnt";
repo = "invisible-watermark";
rev = version;
sha256 = "sha256-NGDPEETuM7rYbo8kXYoRWLJWpa/lWLKEvaaiDzSWYZ4=";
};
propagatedBuildInputs = [
opencv4
pytorch
onnx
onnxruntime
pillow
pywavelets
numpy
];
postPatch = ''
substituteInPlace setup.py \
--replace 'opencv-python>=4.1.0.25' 'opencv'
'';
pythonImportsCheck = [ "imwatermark" ];
meta = with lib; {
description = "A library for creating and decoding invisible image watermarks";
homepage = "https://github.com/ShieldMnt/invisible-watermark";
license = licenses.mit;
maintainers = with maintainers; [ Luflosi ];
};
}

View file

@ -4565,6 +4565,8 @@ self: super: with self; {
intreehooks = callPackage ../development/python-modules/intreehooks { };
invisible-watermark = callPackage ../development/python-modules/invisible-watermark { };
invocations = callPackage ../development/python-modules/invocations { };
invoke = callPackage ../development/python-modules/invoke { };