7 , static ? stdenv.hostPlatform.isStatic
11 stdenv.mkDerivation (finalAttrs: {
13 version = "20240116.2";
15 src = fetchFromGitHub {
18 rev = "refs/tags/${finalAttrs.version}";
19 hash = "sha256-eA2/dZpNOlex1O5PNa3XSZhpMB3AmaIoHzVDI9TD/cg=";
23 # Fixes: clang++: error: unsupported option '-msse4.1' for target 'aarch64-apple-darwin'
24 # https://github.com/abseil/abseil-cpp/pull/1707
26 name = "fix-compile-breakage-on-darwin";
27 url = "https://github.com/abseil/abseil-cpp/commit/6dee153242d7becebe026a9bed52f4114441719d.patch";
28 hash = "sha256-r6QnHPnwPwOE/hv4kLNA3FqNq2vU/QGmwAc5q0/q1cs=";
33 "-DABSL_BUILD_TEST_HELPERS=ON"
34 "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
35 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
36 ] ++ lib.optionals (cxxStandard != null) [
37 "-DCMAKE_CXX_STANDARD=${cxxStandard}"
42 nativeBuildInputs = [ cmake ];
44 buildInputs = [ gtest ];
47 description = "Open-source collection of C++ code designed to augment the C++ standard library";
48 homepage = "https://abseil.io/";
49 license = lib.licenses.asl20;
50 platforms = lib.platforms.all;
51 maintainers = [ lib.maintainers.GaetanLepage ];