7 static ? stdenv.hostPlatform.isStatic,
11 stdenv.mkDerivation rec {
13 version = "20210324.2";
15 src = fetchFromGitHub {
19 sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
24 # Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
25 # https://github.com/abseil/abseil-cpp/pull/963
27 url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
28 sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
32 # https://github.com/abseil/abseil-cpp/pull/1187
34 name = "gcc-13.patch";
35 url = "https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
36 hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
39 ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
40 # https://github.com/abseil/abseil-cpp/pull/1110
42 url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
43 sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
46 ++ lib.optionals stdenv.hostPlatform.isDarwin [
47 # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
48 # that require a different SDK other than the default one.
49 ./cmake-core-foundation.patch
54 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
56 ++ lib.optionals (cxxStandard != null) [
57 "-DCMAKE_CXX_STANDARD=${cxxStandard}"
60 nativeBuildInputs = [ cmake ];
63 description = "Open-source collection of C++ code designed to augment the C++ standard library";
64 homepage = "https://abseil.io/";
65 license = licenses.asl20;
66 platforms = platforms.all;
67 maintainers = [ maintainers.andersk ];
68 # Requires LFS64 APIs. 202401 and later are fine.
69 broken = stdenv.hostPlatform.isMusl;