Skip to content

Commit cd613e2

Browse files
committed
Fix build using nix-build on GHC-8.4.2
Fixes #116
1 parent 3c8d075 commit cd613e2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

opencv-extra/Setup.hs

Lines changed: 1 addition & 1 deletion
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","c++", "--with-ld","c++"]
6+
let args' | "configure" `elem` args = args ++ ["--with-gcc","c++"]
77
| otherwise = args
88
defaultMainArgs args'

opencv/Setup.hs

Lines changed: 1 addition & 1 deletion
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","c++", "--with-ld","c++"]
6+
let args' | "configure" `elem` args = args ++ ["--with-gcc","c++" ]
77
| otherwise = args
88
defaultMainArgs args'

overlay.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ let
3030
shellHook = ''
3131
export hardeningDisable=bindnow
3232
'';
33+
# TODO: cabal2nix automatically adds:
34+
#
35+
# configureFlags = ["--with-gcc=${stdenv.cc}/bin/c++" "--with-ld=${stdenv.cc}/bin/c++"];
36+
#
37+
# This is not needed anymore and will actually break the build.
38+
# So lets remove this from cabal2nix or ask @peti to do it.
39+
configureFlags = [];
3340
});
3441

3542
opencv-examples =
@@ -77,6 +84,7 @@ let
7784
shellHook = ''
7885
export hardeningDisable=bindnow
7986
'';
87+
configureFlags = [];
8088
});
8189

8290
opencv-extra-examples =

0 commit comments

Comments
 (0)