From 1a55974cef94fb53f68cdcaf305405a8790af78a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 13 Feb 2017 15:47:08 +0100 Subject: [PATCH] lmdb: split outputs and add lmdb.pc lmdb.a is removed, until someone needs it. --- pkgs/development/libraries/lmdb/default.nix | 24 ++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index a73a95000d64..6b3070a39aa9 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" <