lmdb: split outputs and add lmdb.pc

lmdb.a is removed, until someone needs it.
This commit is contained in:
Vladimír Čunát 2017-02-13 15:47:08 +01:00
parent 0b87efacb1
commit 1a55974cef
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -14,14 +14,28 @@ in stdenv.mkDerivation rec {
postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb"; postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb";
makeFlags = ["prefix=$(out)"] outputs = [ "bin" "out" "dev" ];
++ optional stdenv.cc.isClang "CC=clang";
makeFlags = [ "prefix=$(out)" "CC=cc" ];
doCheck = true; doCheck = true;
checkPhase = "make test"; checkPhase = "make test";
preInstall = '' postInstall = ''
mkdir -p $out/{bin,lib,include} moveToOutput bin "$bin"
moveToOutput "lib/*.a" REMOVE # until someone needs it
''
# add lmdb.pc (dynamic only)
+ ''
mkdir -p "$dev/lib/pkgconfig"
cat > "$dev/lib/pkgconfig/lmdb.pc" <<EOF
Name: lmdb
Description: ${meta.description}
Version: ${version}
Cflags: -I$dev/include
Libs: -L$out/lib -llmdb
EOF
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -34,7 +48,7 @@ in stdenv.mkDerivation rec {
limited to the size of the virtual address space. limited to the size of the virtual address space.
''; '';
homepage = http://symas.com/mdb/; homepage = http://symas.com/mdb/;
maintainers = with maintainers; [ jb55 ]; maintainers = with maintainers; [ jb55 vcunat ];
license = licenses.openldap; license = licenses.openldap;
platforms = platforms.all; platforms = platforms.all;
}; };