6 , static ? stdenv.hostPlatform.isStatic
10 stdenv.mkDerivation rec {
12 version = "20210324.2";
14 src = fetchFromGitHub {
18 sha256 = "sha256-fcxPhuI2eL/fnd6nT11p8DpUNwGNaXZmd03yOiZcOT0=";
22 # Use CMAKE_INSTALL_FULL_{LIBDIR,INCLUDEDIR}
23 # https://github.com/abseil/abseil-cpp/pull/963
25 url = "https://github.com/abseil/abseil-cpp/commit/5bfa70c75e621c5d5ec095c8c4c0c050dcb2957e.patch";
26 sha256 = "0nhjxqfxpi2pkfinnqvd5m4npf9l1kg39mjx9l3087ajhadaywl5";
30 # https://github.com/abseil/abseil-cpp/pull/1187
32 name = "gcc-13.patch";
33 url = "https://github.com/abseil/abseil-cpp/commit/36a4b073f1e7e02ed7d1ac140767e36f82f09b7c.patch";
34 hash = "sha256-aA7mwGEtv/cQINcawjkukmCvfNuqwUeDFssSiNKPdgg=";
36 ] ++ lib.optionals stdenv.hostPlatform.isLoongArch64 [
37 # https://github.com/abseil/abseil-cpp/pull/1110
39 url = "https://github.com/abseil/abseil-cpp/commit/808bc202fc13e85a7948db0d7fb58f0f051200b1.patch";
40 sha256 = "sha256-ayY/aV/xWOdEyFSDqV7B5WDGvZ0ASr/aeBeYwP5RZVc=";
42 ] ++ lib.optionals stdenv.isDarwin [
43 # Don’t propagate the path to CoreFoundation. Otherwise, it’s impossible to build packages
44 # that require a different SDK other than the default one.
45 ./cmake-core-foundation.patch
49 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
50 ] ++ lib.optionals (cxxStandard != null) [
51 "-DCMAKE_CXX_STANDARD=${cxxStandard}"
54 nativeBuildInputs = [ cmake ];
57 description = "An open-source collection of C++ code designed to augment the C++ standard library";
58 homepage = "https://abseil.io/";
59 license = licenses.asl20;
60 platforms = platforms.all;
61 maintainers = [ maintainers.andersk ];