bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, openssl
|
|
, zlib
|
|
, zstd
|
|
, icu
|
|
, cyrus_sasl
|
|
, snappy
|
|
, darwin
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mongoc";
|
|
version = "1.27.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mongodb";
|
|
repo = "mongo-c-driver";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-l3iZeu6Y+ZB9bYIg4ivG1o0ou3pXaBZ9dg61b6ie2Jw=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
zlib
|
|
zstd
|
|
icu
|
|
cyrus_sasl
|
|
snappy
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
darwin.apple_sdk_11_0.frameworks.Security
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DBUILD_VERSION=${version}"
|
|
"-DENABLE_UNINSTALL=OFF"
|
|
"-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
];
|
|
|
|
# remove forbidden reference to $TMPDIR
|
|
preFixup = ''
|
|
rm -rf src/{libmongoc,libbson}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Official C client library for MongoDB";
|
|
homepage = "http://mongoc.org";
|
|
license = licenses.asl20;
|
|
mainProgram = "mongoc-stat";
|
|
maintainers = with maintainers; [ archer-65 ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|