tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
lmdb: fix cross compilation to mingwW64
amesgen
3 years ago
c745afad
87995157
+27
-3
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
lmdb
bin-ext.patch
default.nix
+21
pkgs/development/libraries/lmdb/bin-ext.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
2
+
index 612484e..2e6b562 100644
3
+
--- a/libraries/liblmdb/Makefile
4
+
+++ b/libraries/liblmdb/Makefile
5
+
@@ -27,6 +27,7 @@ CFLAGS = $(THREADS) $(OPT) $(W) $(XCFLAGS)
6
+
LDLIBS =
7
+
SOLIBS =
8
+
SOEXT = .so
9
+
+BINEXT =
10
+
prefix = /usr/local
11
+
exec_prefix = $(prefix)
12
+
bindir = $(exec_prefix)/bin
13
+
@@ -49,7 +50,7 @@ install: $(ILIBS) $(IPROGS) $(IHDRS)
14
+
mkdir -p $(DESTDIR)$(libdir)
15
+
mkdir -p $(DESTDIR)$(includedir)
16
+
mkdir -p $(DESTDIR)$(mandir)/man1
17
+
- for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
18
+
+ for f in $(IPROGS); do cp $$f$(BINEXT) $(DESTDIR)$(bindir); done
19
+
for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
20
+
for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
21
+
for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
+6
-3
pkgs/development/libraries/lmdb/default.nix
···
1
-
{ lib, stdenv, fetchFromGitLab }:
2
3
stdenv.mkDerivation rec {
4
pname = "lmdb";
···
14
15
postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb";
16
17
-
patches = [ ./hardcoded-compiler.patch ];
18
patchFlags = [ "-p3" ];
19
20
outputs = [ "bin" "out" "dev" ];
0
0
21
22
makeFlags = [
23
"prefix=$(out)"
24
"CC=${stdenv.cc.targetPrefix}cc"
25
"AR=${stdenv.cc.targetPrefix}ar"
26
]
27
-
++ lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so";
0
28
29
doCheck = true;
30
checkTarget = "test";
···
1
+
{ lib, stdenv, fetchFromGitLab, windows }:
2
3
stdenv.mkDerivation rec {
4
pname = "lmdb";
···
14
15
postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb";
16
17
+
patches = [ ./hardcoded-compiler.patch ./bin-ext.patch ];
18
patchFlags = [ "-p3" ];
19
20
outputs = [ "bin" "out" "dev" ];
21
+
22
+
buildInputs = lib.optional stdenv.hostPlatform.isWindows windows.pthreads;
23
24
makeFlags = [
25
"prefix=$(out)"
26
"CC=${stdenv.cc.targetPrefix}cc"
27
"AR=${stdenv.cc.targetPrefix}ar"
28
]
29
+
++ lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so"
30
+
++ lib.optionals stdenv.hostPlatform.isWindows [ "SOEXT=.dll" "BINEXT=.exe" ];
31
32
doCheck = true;
33
checkTarget = "test";