abseil-cpp: don’t propagate CoreFoundation

abseil-cpp builds with the default SDK, which can break dependent
packages that require a different SDK version to build. Don’t propagate
the CoreFoundation framework path and rely on nixpkgs to provide it
instead. The line can’t be dropped because otherwise abseil-cpp will
fail to build (due to missing symbols).

Changed files
+40
pkgs
+4
pkgs/development/libraries/abseil-cpp/202103.nix
···
url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
})
+
] ++ lib.optionals stdenv.isDarwin [
+
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+
# that require a different SDK other than the default one.
+
./cmake-core-foundation.patch
];
cmakeFlags = [
+6
pkgs/development/libraries/abseil-cpp/202111.nix
···
sha256 = "sha256-sSXT6D4JSrk3dA7kVaxfKkzOMBpqXQb0WbMYWG+nGwk=";
};
+
patches = lib.optionals stdenv.isDarwin [
+
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+
# that require a different SDK other than the default one.
+
./cmake-core-foundation.patch
+
];
+
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
] ++ lib.optionals (cxxStandard != null) [
+6
pkgs/development/libraries/abseil-cpp/202206.nix
···
hash = "sha256-Od1FZOOWEXVQsnZBwGjDIExi6LdYtomyL0STR44SsG8=";
};
+
patches = lib.optionals stdenv.isDarwin [
+
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+
# that require a different SDK other than the default one.
+
./cmake-core-foundation.patch
+
];
+
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
] ++ lib.optionals (cxxStandard != null) [
+6
pkgs/development/libraries/abseil-cpp/202301.nix
···
hash = "sha256-PLoI7ix+reUqkZ947kWzls8lujYqWXk9A9a55UcfahI=";
};
+
patches = lib.optionals stdenv.isDarwin [
+
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+
# that require a different SDK other than the default one.
+
./cmake-core-foundation.patch
+
];
+
cmakeFlags = [
"-DABSL_BUILD_TEST_HELPERS=ON"
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+6
pkgs/development/libraries/abseil-cpp/202308.nix
···
hash = "sha256-uNGrTNg5G5xFGtc+BSWE389x0tQ/KxJQLHfebNWas/k=";
};
+
patches = lib.optionals stdenv.isDarwin [
+
# Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
+
# that require a different SDK other than the default one.
+
./cmake-core-foundation.patch
+
];
+
cmakeFlags = [
"-DABSL_BUILD_TEST_HELPERS=ON"
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
+12
pkgs/development/libraries/abseil-cpp/cmake-core-foundation.patch
···
+
diff -ur a/absl/time/CMakeLists.txt b/absl/time/CMakeLists.txt
+
--- a/absl/time/CMakeLists.txt 1969-12-31 19:00:01.000000000 -0500
+
+++ b/absl/time/CMakeLists.txt 2023-10-30 21:50:32.639061785 -0400
+
@@ -55,7 +55,7 @@
+
)
+
+
if(APPLE)
+
- find_library(CoreFoundation CoreFoundation)
+
+ set(CoreFoundation "-framework CoreFoundation")
+
endif()
+
+
absl_cc_library(