diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/lmdb/default.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index a73a95000d647..6b3070a39aa90 100644 --- a/pkgs/development/libraries/lmdb/default.nix +++ b/pkgs/development/libraries/lmdb/default.nix @@ -14,14 +14,28 @@ in stdenv.mkDerivation rec { postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb"; - makeFlags = ["prefix=$(out)"] - ++ optional stdenv.cc.isClang "CC=clang"; + outputs = [ "bin" "out" "dev" ]; + + makeFlags = [ "prefix=$(out)" "CC=cc" ]; doCheck = true; checkPhase = "make test"; - preInstall = '' - mkdir -p $out/{bin,lib,include} + postInstall = '' + 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; { @@ -34,7 +48,7 @@ in stdenv.mkDerivation rec { limited to the size of the virtual address space. ''; homepage = http://symas.com/mdb/; - maintainers = with maintainers; [ jb55 ]; + maintainers = with maintainers; [ jb55 vcunat ]; license = licenses.openldap; platforms = platforms.all; }; |