greenmask: 0.2.6 -> 0.2.7 (#378403)
[NixPkgs.git] / pkgs / development / libraries / abseil-cpp / 202401.nix
blob7a9d1eb836e3cd7a0d6f6203fb00ca09c0164554
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchpatch
5 , cmake
6 , gtest
7 , static ? stdenv.hostPlatform.isStatic
8 , cxxStandard ? null
9 }:
11 stdenv.mkDerivation (finalAttrs: {
12   pname = "abseil-cpp";
13   version = "20240116.2";
15   src = fetchFromGitHub {
16     owner = "abseil";
17     repo = "abseil-cpp";
18     rev = "refs/tags/${finalAttrs.version}";
19     hash = "sha256-eA2/dZpNOlex1O5PNa3XSZhpMB3AmaIoHzVDI9TD/cg=";
20   };
22   patches = [
23     # Fixes: clang++: error: unsupported option '-msse4.1' for target 'aarch64-apple-darwin'
24     # https://github.com/abseil/abseil-cpp/pull/1707
25     (fetchpatch {
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=";
29     })
30   ];
32   cmakeFlags = [
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}"
38   ];
40   strictDeps = true;
42   nativeBuildInputs = [ cmake ];
44   buildInputs = [ gtest ];
46   meta = {
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 ];
52   };