From d6ba407e5df87cc40d4ef92acf2a21759392dda3 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 14 Aug 2022 12:21:32 +0200 Subject: pkgs{Musl,Static}.glog: fix build A few tests fail when built with musl or statically, so we now use gtest and turn those off. --- pkgs/development/libraries/glog/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix index f49c8b98299..4e8503b4843 100644 --- a/pkgs/development/libraries/glog/default.nix +++ b/pkgs/development/libraries/glog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, cmake, gflags, perl }: +{ stdenv, lib, fetchFromGitHub, cmake, gflags, gtest, perl }: stdenv.mkDerivation rec { pname = "glog"; @@ -13,6 +13,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + buildInputs = [ gtest ]; + propagatedBuildInputs = [ gflags ]; cmakeFlags = [ @@ -25,6 +27,17 @@ stdenv.mkDerivation rec { enableParallelChecking = false; checkInputs = [ perl ]; + GTEST_FILTER = + let + filteredTests = lib.optionals stdenv.hostPlatform.isMusl [ + "Symbolize.SymbolizeStackConsumption" + "Symbolize.SymbolizeWithDemanglingStackConsumption" + ] ++ lib.optionals stdenv.hostPlatform.isStatic [ + "LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled" + ]; + in + lib.optionalString doCheck "-${builtins.concatStringsSep ":" filteredTests}"; + meta = with lib; { homepage = "https://github.com/google/glog"; license = licenses.bsd3; -- cgit 1.4.1