rdkafka: switch from mklove to cmake and split off dev output

removes some now-unnecessary dependencies
This commit is contained in:
Julius Michaelis
2024-10-17 10:48:45 +09:00
parent bcc1a0be3b
commit e9c57f8a31
3 changed files with 21 additions and 8 deletions
@@ -41,6 +41,11 @@ stdenv.mkDerivation rec {
url = "https://github.com/morganstanley/modern-cpp-kafka/commit/236f8f91f5c3ad6e1055a6f55cd3aebd218e1226.patch";
hash = "sha256-cy568TQUu08sadq79hDz9jMvDqiDjfr+1cLMxFWGm1Q=";
})
(fetchpatch {
name = "macos-find-dylib.patch";
url = "https://github.com/morganstanley/modern-cpp-kafka/commit/dc2753cd95b607a7202b40bad3aad472558bf350.patch";
hash = "sha256-Te3GwAVRDyb6GFWlvkq1mIcNeXCtMyLr+/w1LilUYbE=";
})
];
postPatch = ''
+15 -7
View File
@@ -4,11 +4,10 @@
fetchFromGitHub,
zlib,
zstd,
pkg-config,
python3,
openssl,
which,
curl,
cmake,
ninja,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -22,10 +21,14 @@ stdenv.mkDerivation (finalAttrs: {
sha256 = "sha256-OCCsxgEO8UvCcC0XwzqpqmaT8dV0Klrspp+2o1FbH2Y=";
};
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
pkg-config
python3
which
cmake
ninja
];
buildInputs = [
@@ -35,7 +38,12 @@ stdenv.mkDerivation (finalAttrs: {
curl
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
# some tests don't build on darwin
cmakeFlags = [
(lib.cmakeBool "RDKAFKA_BUILD_TESTS" (!stdenv.hostPlatform.isDarwin))
(lib.cmakeBool "RDKAFKA_BUILD_EXAMPLES" (!stdenv.hostPlatform.isDarwin))
(lib.cmakeFeature "CMAKE_C_FLAGS" "-Wno-error=strict-overflow")
];
postPatch = ''
patchShebangs .
@@ -18,7 +18,7 @@ buildPecl {
postPhpize = ''
substituteInPlace configure \
--replace 'SEARCH_PATH="/usr/local /usr"' 'SEARCH_PATH=${rdkafka}'
--replace-fail 'SEARCH_PATH="/usr/local /usr"' 'SEARCH_PATH=${lib.getInclude rdkafka}'
'';
meta = with lib; {