From f21d4e7004ae3a2eaa9f6cf3f768981ece245fed Mon Sep 17 00:00:00 2001 From: laniusv0 Date: Wed, 3 Jul 2024 18:09:01 +0200 Subject: [PATCH] mongocxx: 3.8.1 -> 3.10.2 add stenv override in top-level --- .../libraries/mongocxx/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/mongocxx/default.nix b/pkgs/development/libraries/mongocxx/default.nix index a17e7f8d037f..5659043e2f62 100644 --- a/pkgs/development/libraries/mongocxx/default.nix +++ b/pkgs/development/libraries/mongocxx/default.nix @@ -1,5 +1,5 @@ { lib -, stdenv +, pkgs , fetchFromGitHub , mongoc , openssl @@ -7,23 +7,26 @@ , cmake , validatePkgConfig , testers +, darwin }: +let stdenv = if pkgs.stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else pkgs.stdenv; in + stdenv.mkDerivation (finalAttrs: { pname = "mongocxx"; - version = "3.8.1"; + version = "3.10.2"; src = fetchFromGitHub { owner = "mongodb"; repo = "mongo-cxx-driver"; rev = "refs/tags/r${finalAttrs.version}"; - hash = "sha256-fBZg69jsvXzhllpcPBGXkjYyvUQImnGNkb2Ek5Oi0p4="; + hash = "sha256-nGLE0vyCe3PaNJf3duXdBfAhTdRvdeQ+OCwcaSDxi5Y="; }; postPatch = '' - substituteInPlace src/bsoncxx/config/CMakeLists.txt \ - src/mongocxx/config/CMakeLists.txt \ - --replace "\\\''${prefix}/" "" + substituteInPlace src/bsoncxx/cmake/libbsoncxx.pc.in \ + src/mongocxx/cmake/libmongocxx.pc.in \ + --replace "\''${prefix}/" "" ''; nativeBuildInputs = [ @@ -35,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { mongoc openssl cyrus_sasl - ]; + ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; cmakeFlags = [ "-DCMAKE_CXX_STANDARD=20" @@ -49,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Official C++ client library for MongoDB"; homepage = "http://mongocxx.org"; license = licenses.asl20; - maintainers = with maintainers; [ adriandole ]; + maintainers = with maintainers; [ adriandole vcele ]; pkgConfigModules = [ "libmongocxx" "libbsoncxx" ]; platforms = platforms.all; badPlatforms = [ "x86_64-darwin" ]; # needs sdk >= 10.14