From f0f2372ac454a1ec3fcffcc1d1b2bbf9c4db9d16 Mon Sep 17 00:00:00 2001 From: ditsuke Date: Mon, 28 Aug 2023 15:18:55 +0530 Subject: [PATCH 1/2] maintainers: add ditsuke --- maintainers/maintainer-list.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c8b31eccbea37..4d1b727780c85 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4424,6 +4424,15 @@ githubId = 14034137; name = "Mostly Void"; }; + ditsuke = { + name = "Tushar"; + email = "hello@ditsuke.com"; + github = "ditsuke"; + githubId = 72784348; + keys = [{ + fingerprint = "8FD2 153F 4889 541A 54F1 E09E 71B6 C31C 8A5A 9D21"; + }]; + }; djacu = { email = "daniel.n.baker@gmail.com"; github = "djacu"; From 568c1278a80977938902a99a628314ff92732269 Mon Sep 17 00:00:00 2001 From: ditsuke Date: Sun, 27 Aug 2023 21:45:40 +0530 Subject: [PATCH 2/2] modern-cpp-kafka: init at 2023.03.07 --- pkgs/by-name/mo/modern-cpp-kafka/package.nix | 57 ++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/mo/modern-cpp-kafka/package.nix diff --git a/pkgs/by-name/mo/modern-cpp-kafka/package.nix b/pkgs/by-name/mo/modern-cpp-kafka/package.nix new file mode 100644 index 0000000000000..daa3396255bcb --- /dev/null +++ b/pkgs/by-name/mo/modern-cpp-kafka/package.nix @@ -0,0 +1,57 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, boost +, rdkafka +, gtest +, rapidjson +}: + +stdenv.mkDerivation rec { + pname = "modern-cpp-kafka"; + version = "2023.03.07"; + + src = fetchFromGitHub { + repo = "modern-cpp-kafka"; + owner = "morganstanley"; + rev = "v${version}"; + hash = "sha256-7hkwM1YbveQpDRqwMZ3MXM88LTwlAT7uB8NL0t409To="; + }; + + patches = [ + (fetchpatch { + name = "fix-avoid-overwriting-library-paths.patch"; + url = "https://github.com/morganstanley/modern-cpp-kafka/pull/221.patch"; + hash = "sha256-UsQcMvJoRTn5kgXhmXOyqfW3n59kGKO596U2WjtdqAY="; + }) + (fetchpatch { + name = "add-pkg-config-cmake-config.patch"; + url = "https://github.com/morganstanley/modern-cpp-kafka/pull/222.patch"; + hash = "sha256-OjoSttnpgEwSZjCVKc888xJb5f1Dulu/rQqoGmqXNM4="; + }) + ]; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ boost ]; + propagatedBuildInputs = [ rdkafka ]; + + cmakeFlags = [ + "-DLIBRDKAFKA_INCLUDE_DIR=${rdkafka.out}/include" + "-DGTEST_LIBRARY_DIR=${gtest.out}/lib" + "-DGTEST_INCLUDE_DIR=${gtest.dev}/include" + "-DRAPIDJSON_INCLUDE_DIRS=${rapidjson.out}/include" + "-DCMAKE_CXX_FLAGS=-Wno-uninitialized" + ]; + + checkInputs = [ gtest rapidjson ]; + + meta = with lib; { + description = "A C++ API for Kafka clients (i.e. KafkaProducer, KafkaConsumer, AdminClient)"; + homepage = "https://github.com/morganstanley/modern-cpp-kafka"; + license = licenses.asl20; + maintainers = with maintainers; [ ditsuke ]; + platforms = platforms.unix; + }; +}