about summary refs log tree commit diff
path: root/pkgs/development/python-modules/invisible-watermark/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/invisible-watermark/default.nix')
-rw-r--r--pkgs/development/python-modules/invisible-watermark/default.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/invisible-watermark/default.nix b/pkgs/development/python-modules/invisible-watermark/default.nix
index 968669ec92bc..d7ad922cf538 100644
--- a/pkgs/development/python-modules/invisible-watermark/default.nix
+++ b/pkgs/development/python-modules/invisible-watermark/default.nix
@@ -4,7 +4,7 @@
   buildPythonPackage,
   pythonOlder,
   fetchFromGitHub,
-  opencv4,
+  opencv-python,
   torch,
   onnx,
   onnxruntime,
@@ -30,7 +30,7 @@ buildPythonPackage rec {
 
   propagatedBuildInputs =
     [
-      opencv4
+      opencv-python
       torch
       pillow
       pywavelets
@@ -42,8 +42,6 @@ buildPythonPackage rec {
     ];
 
   postPatch = ''
-    substituteInPlace setup.py \
-      --replace 'opencv-python>=4.1.0.25' 'opencv'
     substituteInPlace imwatermark/rivaGan.py --replace \
       'You can install it with pip: `pip install onnxruntime`.' \
       'You can install it with an override: `python3Packages.invisible-watermark.override { withOnnx = true; };`.'
@@ -72,7 +70,8 @@ buildPythonPackage rec {
         let
           testName = "${if withOnnx then "withOnnx" else "withoutOnnx"}-${method}";
           # This test fails in the sandbox on aarch64-linux, see https://github.com/microsoft/onnxruntime/issues/10038
-          skipTest = stdenv.isLinux && stdenv.isAarch64 && withOnnx && method == "rivaGan";
+          skipTest =
+            stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64 && withOnnx && method == "rivaGan";
         in
         lib.optionalAttrs (!skipTest) {
           "${testName}" = callPackage ./tests/cli.nix {