diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index 047a74f08409..9d57d4721820 100644 --- a/pkgs/development/libraries/lmdb/default.nix +++ b/pkgs/development/libraries/lmdb/default.nix @@ -18,7 +18,11 @@ stdenv.mkDerivation rec { outputs = [ "bin" "out" "dev" ]; - makeFlags = [ "prefix=$(out)" "CC=cc" ] + makeFlags = [ + "prefix=$(out)" + "CC=${stdenv.cc.targetPrefix}cc" + "AR=${stdenv.cc.targetPrefix}ar" + ] ++ stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/liblmdb.so"; doCheck = true;