File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,30 @@ stdenv.mkDerivation (finalAttrs: {
3838 curl
3939 ] ;
4040
41- # some tests don't build on darwin
41+ # examples and tests don't build on darwin statically
4242 cmakeFlags = [
43- ( lib . cmakeBool "RDKAFKA_BUILD_TESTS" ( ! stdenv . hostPlatform . isDarwin ) )
44- ( lib . cmakeBool "RDKAFKA_BUILD_EXAMPLES" ( ! stdenv . hostPlatform . isDarwin ) )
43+ ( lib . cmakeBool "RDKAFKA_BUILD_STATIC" stdenv . hostPlatform . isStatic )
44+ ( lib . cmakeBool "RDKAFKA_BUILD_TESTS" (
45+ ! stdenv . hostPlatform . isDarwin && ! stdenv . hostPlatform . isStatic
46+ ) )
47+ ( lib . cmakeBool "RDKAFKA_BUILD_EXAMPLES" (
48+ ! stdenv . hostPlatform . isDarwin && ! stdenv . hostPlatform . isStatic
49+ ) )
4550 ( lib . cmakeFeature "CMAKE_C_FLAGS" "-Wno-error=strict-overflow" )
4651 ] ;
4752
4853 postPatch = ''
4954 patchShebangs .
5055 '' ;
5156
57+ postFixup = lib . optionalString stdenv . hostPlatform . isStatic ''
58+ # rdkafka changes the library names for static libraries but users in pkgsStatic aren't likely to be aware of this
59+ # make sure the libraries are findable with both names
60+ for pc in rdkafka{,++}; do
61+ ln -s $dev/lib/pkgconfig/$pc{-static,}.pc
62+ done
63+ '' ;
64+
5265 enableParallelBuilding = true ;
5366
5467 meta = with lib ; {
You can’t perform that action at this time.
0 commit comments