6 , static ? stdenv.hostPlatform.isStatic
10 stdenv.mkDerivation rec {
12 version = "20220623.1";
14 src = fetchFromGitHub {
17 rev = "refs/tags/${version}";
18 hash = "sha256-Od1FZOOWEXVQsnZBwGjDIExi6LdYtomyL0STR44SsG8=";
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 "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
29 ] ++ lib.optionals (cxxStandard != null) [
30 "-DCMAKE_CXX_STANDARD=${cxxStandard}"
33 nativeBuildInputs = [ cmake ];
36 description = "An open-source collection of C++ code designed to augment the C++ standard library";
37 homepage = "https://abseil.io/";
38 license = licenses.asl20;
39 platforms = platforms.all;
40 maintainers = [ maintainers.andersk ];