Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 openssl, 8 zlib, 9 zstd, 10 icu, 11 cyrus_sasl, 12 snappy, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "mongoc"; 17 version = "1.30.3"; 18 19 src = fetchFromGitHub { 20 owner = "mongodb"; 21 repo = "mongo-c-driver"; 22 tag = version; 23 hash = "sha256-3mzqsrbXfrtAAC5igIna5dAgU8FH23lkMS2IacVlCmI="; 24 }; 25 26 nativeBuildInputs = [ 27 cmake 28 pkg-config 29 ]; 30 31 buildInputs = [ 32 openssl 33 zlib 34 zstd 35 icu 36 cyrus_sasl 37 snappy 38 ]; 39 40 cmakeFlags = [ 41 "-DBUILD_VERSION=${version}" 42 "-DENABLE_UNINSTALL=OFF" 43 "-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF" 44 "-DCMAKE_INSTALL_LIBDIR=lib" 45 ]; 46 47 # remove forbidden reference to $TMPDIR 48 preFixup = '' 49 rm -rf src/{libmongoc,libbson} 50 ''; 51 52 meta = with lib; { 53 description = "Official C client library for MongoDB"; 54 homepage = "http://mongoc.org"; 55 license = licenses.asl20; 56 mainProgram = "mongoc-stat"; 57 maintainers = with maintainers; [ archer-65 ]; 58 platforms = platforms.all; 59 }; 60}