From 817b066f4b4dad161d04a03398f2261071b705e7 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 24 Nov 2019 23:14:51 +0000 Subject: [PATCH] nomacs: switch to using opencv4 (#72749) opencv2 has known, unfixed security vulnerabilities. nomacs itself states the minimum supported version is 3.4 & includes a script to install opencv4, suggesting it is supported darwin requires a patch to update its cmake file to make it less restrictive over this --- pkgs/applications/graphics/nomacs/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/nomacs/default.nix b/pkgs/applications/graphics/nomacs/default.nix index 62fae518b92..48a79e8844e 100644 --- a/pkgs/applications/graphics/nomacs/default.nix +++ b/pkgs/applications/graphics/nomacs/default.nix @@ -1,6 +1,7 @@ { stdenv , mkDerivation , fetchFromGitHub +, fetchpatch , cmake , pkgconfig @@ -9,7 +10,7 @@ , qtsvg , exiv2 -, opencv +, opencv4 , libraw , libtiff , quazip @@ -28,6 +29,12 @@ mkDerivation rec { patches = [ ./nomacs-iostream.patch + (fetchpatch { + name = "darwin-less-restrictive-opencv.patch"; + url = "https://github.com/nomacs/nomacs/commit/d182fce4bcd9a25bd15e3de065ca67849a32458c.patch"; + sha256 = "0j6sviwrjn69nqf59hjn30c4j838h8az7rnlwcx8ymlb21vd9x2h"; + stripLen = 1; + }) ]; enableParallelBuilding = true; @@ -43,7 +50,7 @@ mkDerivation rec { qttools qtsvg exiv2 - opencv + opencv4 libraw libtiff quazip];