6 , static ? stdenv.hostPlatform.isStatic
10 stdenv.mkDerivation (finalAttrs: {
12 version = "20230125.3";
14 src = fetchFromGitHub {
17 rev = "refs/tags/${finalAttrs.version}";
18 hash = "sha256-PLoI7ix+reUqkZ947kWzls8lujYqWXk9A9a55UcfahI=";
21 patches = lib.optionals stdenv.isDarwin [
22 # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
23 # that require a different SDK other than the default one.
24 ./cmake-core-foundation.patch
28 "-DABSL_BUILD_TEST_HELPERS=ON"
29 "-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
30 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
31 ] ++ lib.optionals (cxxStandard != null) [
32 "-DCMAKE_CXX_STANDARD=${cxxStandard}"
37 nativeBuildInputs = [ cmake ];
39 buildInputs = [ gtest ];
42 description = "An open-source collection of C++ code designed to augment the C++ standard library";
43 homepage = "https://abseil.io/";
44 license = licenses.asl20;
45 platforms = platforms.all;
46 maintainers = [ maintainers.andersk ];