lol

Merge pull request #21116 from mdaiter/cudaOpenCVIf

opencv3: pull patches only if necessary

authored by

viric and committed by
GitHub
b1c20ad3 cbdc94f2

+11 -10
+11 -10
pkgs/development/libraries/opencv/3.x.nix
··· 42 42 sha256 = "1l0w12czavgs0wzw1c594g358ilvfg2fn32cn8z7pv84zxj4g429"; 43 43 }; 44 44 45 - patches = [ 46 - (fetchpatch { # Patch for CUDA 8 compatibility 47 - url = "https://github.com/opencv/opencv/commit/10896129b39655e19e4e7c529153cb5c2191a1db.patch"; 48 - sha256 = "0jka3kxxywgs3prqqgym5kav6p73rrblwj50k1nf3fvfpk194ah1"; 49 - }) 50 - (fetchpatch { # Patch to add CUDA Compute Capability compilation targets up to 6.0 51 - url = "https://github.com/opencv/opencv/commit/d76f258aebdf63f979a205cabe6d3e81700a7cd8.patch"; 52 - sha256 = "00b3msfgrcw7laij6qafn4b18c1dl96xxpzwx05wxzrjldqb6kqg"; 53 - }) 54 - ]; 45 + patches = 46 + lib.optionals enableCuda [ 47 + (fetchpatch { # Patch for CUDA 8 compatibility 48 + url = "https://github.com/opencv/opencv/commit/10896129b39655e19e4e7c529153cb5c2191a1db.patch"; 49 + sha256 = "0jka3kxxywgs3prqqgym5kav6p73rrblwj50k1nf3fvfpk194ah1"; 50 + }) 51 + (fetchpatch { # Patch to add CUDA Compute Capability compilation targets up to 6.0 52 + url = "https://github.com/opencv/opencv/commit/d76f258aebdf63f979a205cabe6d3e81700a7cd8.patch"; 53 + sha256 = "00b3msfgrcw7laij6qafn4b18c1dl96xxpzwx05wxzrjldqb6kqg"; 54 + }) 55 + ]; 55 56 56 57 preConfigure = 57 58 let ippicvVersion = "20151201";