From 84bd2f4ab04b8b53718db6b5ba208a62ae083941 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 22 Sep 2017 23:12:12 +0200 Subject: [PATCH] lmdb: fix library id on darwin --- pkgs/development/libraries/lmdb/default.nix | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index 30703fc7e3ed..d96b5ed6d520 100644 --- a/pkgs/development/libraries/lmdb/default.nix +++ b/pkgs/development/libraries/lmdb/default.nix @@ -1,7 +1,6 @@ { stdenv, fetchFromGitHub }: -let optional = stdenv.lib.optional; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { name = "lmdb-${version}"; version = "0.9.21"; @@ -16,7 +15,8 @@ in stdenv.mkDerivation rec { outputs = [ "bin" "out" "dev" ]; - makeFlags = [ "prefix=$(out)" "CC=cc" ]; + makeFlags = [ "prefix=$(out)" "CC=cc" ] + ++ stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so"; doCheck = true; checkPhase = "make test"; @@ -25,12 +25,6 @@ in stdenv.mkDerivation rec { moveToOutput bin "$bin" moveToOutput "lib/*.a" REMOVE # until someone needs it '' - - # fix bogus library name - + stdenv.lib.optionalString stdenv.isDarwin '' - mv "$out"/lib/liblmdb.{so,dylib} - '' - # add lmdb.pc (dynamic only) + '' mkdir -p "$dev/lib/pkgconfig"