Skip to content

Commit e9c57f8

Browse files
committed
rdkafka: switch from mklove to cmake and split off dev output
removes some now-unnecessary dependencies
1 parent bcc1a0b commit e9c57f8

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

pkgs/by-name/mo/modern-cpp-kafka/package.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
4141
url = "https://github.com/morganstanley/modern-cpp-kafka/commit/236f8f91f5c3ad6e1055a6f55cd3aebd218e1226.patch";
4242
hash = "sha256-cy568TQUu08sadq79hDz9jMvDqiDjfr+1cLMxFWGm1Q=";
4343
})
44+
(fetchpatch {
45+
name = "macos-find-dylib.patch";
46+
url = "https://github.com/morganstanley/modern-cpp-kafka/commit/dc2753cd95b607a7202b40bad3aad472558bf350.patch";
47+
hash = "sha256-Te3GwAVRDyb6GFWlvkq1mIcNeXCtMyLr+/w1LilUYbE=";
48+
})
4449
];
4550

4651
postPatch = ''

pkgs/by-name/rd/rdkafka/package.nix

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
fetchFromGitHub,
55
zlib,
66
zstd,
7-
pkg-config,
8-
python3,
97
openssl,
10-
which,
118
curl,
9+
cmake,
10+
ninja,
1211
}:
1312

1413
stdenv.mkDerivation (finalAttrs: {
@@ -22,10 +21,14 @@ stdenv.mkDerivation (finalAttrs: {
2221
sha256 = "sha256-OCCsxgEO8UvCcC0XwzqpqmaT8dV0Klrspp+2o1FbH2Y=";
2322
};
2423

24+
outputs = [
25+
"out"
26+
"dev"
27+
];
28+
2529
nativeBuildInputs = [
26-
pkg-config
27-
python3
28-
which
30+
cmake
31+
ninja
2932
];
3033

3134
buildInputs = [
@@ -35,7 +38,12 @@ stdenv.mkDerivation (finalAttrs: {
3538
curl
3639
];
3740

38-
env.NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
41+
# some tests don't build on darwin
42+
cmakeFlags = [
43+
(lib.cmakeBool "RDKAFKA_BUILD_TESTS" (!stdenv.hostPlatform.isDarwin))
44+
(lib.cmakeBool "RDKAFKA_BUILD_EXAMPLES" (!stdenv.hostPlatform.isDarwin))
45+
(lib.cmakeFeature "CMAKE_C_FLAGS" "-Wno-error=strict-overflow")
46+
];
3947

4048
postPatch = ''
4149
patchShebangs .

pkgs/development/php-packages/rdkafka/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildPecl {
1818

1919
postPhpize = ''
2020
substituteInPlace configure \
21-
--replace 'SEARCH_PATH="/usr/local /usr"' 'SEARCH_PATH=${rdkafka}'
21+
--replace-fail 'SEARCH_PATH="/usr/local /usr"' 'SEARCH_PATH=${lib.getInclude rdkafka}'
2222
'';
2323

2424
meta = with lib; {

0 commit comments

Comments
 (0)