File tree Expand file tree Collapse file tree 3 files changed +21
-8
lines changed
development/php-packages/rdkafka Expand file tree Collapse file tree 3 files changed +21
-8
lines changed Original file line number Diff line number Diff 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 = ''
Original file line number Diff line number Diff line change 44 fetchFromGitHub ,
55 zlib ,
66 zstd ,
7- pkg-config ,
8- python3 ,
97 openssl ,
10- which ,
118 curl ,
9+ cmake ,
10+ ninja ,
1211} :
1312
1413stdenv . 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 .
Original file line number Diff line number Diff 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 ; {
You can’t perform that action at this time.
0 commit comments