diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2023-08-03 06:23:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 06:23:36 +0200 |
commit | a6565aafe5d60bdd00f203e08dc1f72295ddafaf (patch) | |
tree | afb9cfd04ae7c5cf3e0fe910d6f46472f911c14f /pkgs/development | |
parent | f1f450ab722ee5ca0ce6888ca4a8ac49a1a1fecf (diff) | |
parent | abcc2729c96688f332610b2edf7191f4a46b399d (diff) |
Merge pull request #246425 from adriandole/master
mongocxx: init at 3.8.0
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/mongocxx/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/libraries/mongocxx/default.nix b/pkgs/development/libraries/mongocxx/default.nix new file mode 100644 index 0000000000000..ef6134c3e497c --- /dev/null +++ b/pkgs/development/libraries/mongocxx/default.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, fetchFromGitHub +, mongoc +, cmake +, validatePkgConfig +, testers +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "mongocxx"; + version = "3.8.0"; + + src = fetchFromGitHub { + owner = "mongodb"; + repo = "mongo-cxx-driver"; + rev = "refs/tags/r${finalAttrs.version}"; + hash = "sha256-7pMVBWMIGV6k04/0rKULwNcl0NMO4hqMnOzWv+0/DrA="; + }; + + postPatch = '' + substituteInPlace src/bsoncxx/config/CMakeLists.txt \ + src/mongocxx/config/CMakeLists.txt \ + --replace "\\\''${prefix}/" "" + ''; + + nativeBuildInputs = [ + cmake + validatePkgConfig + ]; + + buildInputs = [ + mongoc + ]; + + cmakeFlags = [ + "-DCMAKE_CXX_STANDARD=20" + "-DBUILD_VERSION=${finalAttrs.version}" + "-DENABLE_UNINSTALL=OFF" + ]; + + passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + + meta = with lib; { + description = "The official C++ client library for MongoDB"; + homepage = "http://mongocxx.org"; + license = licenses.asl20; + maintainers = with maintainers; [ adriandole ]; + pkgConfigModules = [ "libmongocxx" "libbsoncxx" ]; + platforms = platforms.all; + badPlatforms = [ "x86_64-darwin" ]; # needs sdk >= 10.14 + }; +}) |