Skip to content

Commit 6b78bc4

Browse files
committed
Fix build on OS X
1 parent 8231a2b commit 6b78bc4

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

opencv-extra/Setup.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import System.Environment ( getArgs )
33

44
main = do
55
args <- getArgs
6-
let args' | "configure" `elem` args = args ++ ["--with-gcc","g++", "--with-ld","g++"]
6+
let args' | "configure" `elem` args = args ++ ["--with-gcc","c++", "--with-ld","c++"]
77
| otherwise = args
88
defaultMainArgs args'

opencv-extra/opencv-extra.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ mkDerivation {
7373
libraryPkgconfigDepends = [ opencv3 ];
7474

7575
configureFlags =
76-
[ "--with-gcc=g++"
77-
"--with-ld=g++"
76+
[ "--with-gcc=${stdenv.cc}/bin/c++"
77+
"--with-ld=${stdenv.cc}/bin/c++"
7878
];
7979

8080
hardeningDisable = [ "bindnow" ];

opencv/Setup.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import System.Environment ( getArgs )
33

44
main = do
55
args <- getArgs
6-
let args' | "configure" `elem` args = args ++ ["--with-gcc","g++", "--with-ld","g++"]
6+
let args' | "configure" `elem` args = args ++ ["--with-gcc","c++", "--with-ld","c++"]
77
| otherwise = args
88
defaultMainArgs args'

opencv/opencv.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ mkDerivation ({
103103
libraryPkgconfigDepends = [ opencv3 ];
104104

105105
configureFlags =
106-
[ "--with-gcc=g++"
107-
"--with-ld=g++"
106+
[ "--with-gcc=${stdenv.cc}/bin/c++"
107+
"--with-ld=${stdenv.cc}/bin/c++"
108108
];
109109

110110
hardeningDisable = [ "bindnow" ];

0 commit comments

Comments
 (0)