Commit e0754b43 authored by Gaetan Lepage's avatar Gaetan Lepage Committed by Masum Reza
Browse files

abseil-cpp_202501: init at 20250127.1

parent f555156c
Loading
Loading
Loading
Loading
+46 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  gtest,
  static ? stdenv.hostPlatform.isStatic,
  cxxStandard ? null,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "abseil-cpp";
  version = "20250127.1";

  src = fetchFromGitHub {
    owner = "abseil";
    repo = "abseil-cpp";
    tag = finalAttrs.version;
    hash = "sha256-QTywqQCkyGFpdbtDBvUwz9bGXxbJs/qoFKF6zYAZUmQ=";
  };

  cmakeFlags =
    [
      (lib.cmakeBool "ABSL_BUILD_TEST_HELPERS" true)
      (lib.cmakeBool "ABSL_USE_EXTERNAL_GOOGLETEST" true)
      (lib.cmakeBool "BUILD_SHARED_LIBS" (!static))
    ]
    ++ lib.optionals (cxxStandard != null) [
      (lib.cmakeFeature "CMAKE_CXX_STANDARD" cxxStandard)
    ];

  strictDeps = true;

  nativeBuildInputs = [ cmake ];

  buildInputs = [ gtest ];

  meta = {
    description = "Open-source collection of C++ code designed to augment the C++ standard library";
    homepage = "https://abseil.io/";
    changelog = "https://github.com/abseil/abseil-cpp/releases/tag/${finalAttrs.version}";
    license = lib.licenses.asl20;
    platforms = lib.platforms.all;
    maintainers = [ lib.maintainers.GaetanLepage ];
  };
})