gbenchmark: 1.9.4 -> 1.9.5

This commit is contained in:
Harinn 2026-04-04 02:07:15 +07:00
commit f6da919839

View file

@ -5,18 +5,19 @@
cmake,
ninja,
gtest,
glibcLocales,
prometheus-cpp,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gbenchmark";
version = "1.9.4";
version = "1.9.5";
src = fetchFromGitHub {
owner = "google";
repo = "benchmark";
rev = "v${finalAttrs.version}";
hash = "sha256-P7wJcKkIBoWtN9FCRticpBzYbEZPq71a0iW/2oDTZRU=";
tag = "v${finalAttrs.version}";
hash = "sha256-Mm4pG7zMB00iof32CxreoNBFnduPZTMp3reHMCIAFPQ=";
};
nativeBuildInputs = [
@ -26,20 +27,30 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ gtest ];
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isLinux [ glibcLocales ];
cmakeFlags = [
(lib.cmakeBool "BENCHMARK_USE_BUNDLED_GTEST" false)
(lib.cmakeBool "BENCHMARK_ENABLE_WERROR" false)
];
# We ran into issues with gtest 1.8.5 conditioning on
# `#if __has_cpp_attribute(maybe_unused)`, which was, for some
# reason, going through even when C++14 was being used and
# breaking the build on Darwin by triggering errors about using
# C++17 features.
#
# This might be a problem with our Clang, as it does not reproduce
# with Xcode, but we just work around it by silencing the warning.
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-c++17-attribute-extensions";
env = {
# We ran into issues with gtest 1.8.5 conditioning on
# `#if __has_cpp_attribute(maybe_unused)`, which was, for some
# reason, going through even when C++14 was being used and
# breaking the build on Darwin by triggering errors about using
# C++17 features.
#
# This might be a problem with our Clang, as it does not reproduce
# with Xcode, but we just work around it by silencing the warning.
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-c++17-attribute-extensions";
}
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
# For test:locale_impermeability_test
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
};
# Tests fail on 32-bit due to not enough precision
doCheck = stdenv.hostPlatform.is64bit;