File tree Expand file tree Collapse file tree 6 files changed +42
-4
lines changed Expand file tree Collapse file tree 6 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 139
139
packages . ghc . flags . internal-interpreter = true ;
140
140
packages . ghci . flags . ghci = true ;
141
141
packages . ghci . flags . internal-interpreter = true ;
142
+
143
+ # See https://github.com/Bodigrim/bitvec/pull/61
144
+ packages . bitvec . patches = [
145
+ ( fromUntil "1.1.3.0" "1.1.3.0.1" ../patches/bitvec-gmp-fix.patch )
146
+ ] ;
142
147
}
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ final: prev: with prev;
5
5
hasNativeBignum = name : ! lib . hasPrefix "ghc8" name ;
6
6
7
7
ghcPkgOverrides = name : { enableIntegerSimple = false ; } // lib . optionalAttrs ( hasNativeBignum name ) {
8
- enableNativeBignum = false ;
8
+ enableNativeBignum = true ;
9
9
} ;
10
10
11
11
ghcDrvOverrides = drv : {
Original file line number Diff line number Diff line change
1
+ From 903561107640cdbe1fbb3669c58e006d8b658fb8 Mon Sep 17 00:00:00 2001
2
+ From: Mikaela Allan <mikaela@vitalbio.com>
3
+ Date: Sun, 31 Jul 2022 11:52:27 -0400
4
+ Subject: [PATCH] include Data.Bit.Gmp only if libgmp flag is set
5
+
6
+ if this module is linked into the library when libgmp is not enabled,
7
+ the foreign imports will lead to link failures when consuming the
8
+ library.
9
+ ---
10
+ bitvec.cabal | 3 ++-
11
+ 1 file changed, 2 insertions(+), 1 deletion(-)
12
+
13
+ diff --git a/bitvec.cabal b/bitvec.cabal
14
+ index c6cb6c0..d4a28d6 100644
15
+ --- a/bitvec.cabal
16
+ +++ b/bitvec.cabal
17
+ @@ -78,7 +78,6 @@ library
18
+ other-modules:
19
+ Data.Bit.F2Poly
20
+ Data.Bit.F2PolyTS
21
+ - Data.Bit.Gmp
22
+ Data.Bit.Immutable
23
+ Data.Bit.ImmutableTS
24
+ Data.Bit.Internal
25
+ @@ -98,6 +97,8 @@ library
26
+ if flag(libgmp)
27
+ extra-libraries: gmp
28
+ cpp-options: -DUseLibGmp
29
+ + other-modules:
30
+ + Data.Bit.Gmp
31
+
32
+ test-suite bitvec-tests
33
+ type: exitcode-stdio-1.0
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ in recurseIntoAttrs {
39
39
optionalString ( ! stdenv . hostPlatform . isAarch32 && ! stdenv . hostPlatform . isAarch64 ) ( ''
40
40
printf "checking that executable is dynamically linked to system libraries... " >& 2
41
41
'' + optionalString ( stdenv . isLinux && ! stdenv . hostPlatform . isMusl ) ''
42
- ldd $exe | grep libgmp
42
+ ldd $exe | grep 'libc[.]so'
43
43
'' + optionalString stdenv . isDarwin ''
44
44
otool -L $exe | grep "libSystem.B"
45
45
'' + ''
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ in recurseIntoAttrs {
47
47
optionalString ( ! stdenv . hostPlatform . isAarch32 && ! stdenv . hostPlatform . isAarch64 && ! stdenv . hostPlatform . isMusl ) ( ''
48
48
printf "checking that executable is dynamically linked to system libraries... " >& 2
49
49
'' + optionalString ( stdenv . isLinux && ! stdenv . hostPlatform . isMusl ) ''
50
- ldd $exe | grep libgmp
50
+ ldd $exe | grep 'libc[.]so'
51
51
'' + optionalString stdenv . isDarwin ''
52
52
otool -L $exe |grep .dylib
53
53
'' ) + ''
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ in recurseIntoAttrs {
39
39
optionalString ( ! stdenv . hostPlatform . isAarch32 && ! stdenv . hostPlatform . isAarch64 && ! stdenv . hostPlatform . isMusl ) ( ''
40
40
printf "checking that executable is dynamically linked to system libraries... " >& 2
41
41
'' + optionalString ( stdenv . isLinux && ! stdenv . hostPlatform . isMusl ) ''
42
- ldd $exe | grep libgmp
42
+ ldd $exe | grep 'libc[.]so'
43
43
'' + optionalString stdenv . isDarwin ''
44
44
otool -L $exe |grep .dylib
45
45
'' ) + ''
You can’t perform that action at this time.
0 commit comments