2022-09-11 15:47:08 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, gflags, gtest, perl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "glog";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "0.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "glog";
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
sha256 = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
buildInputs = [ gtest ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ gflags ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# TODO: Re-enable Darwin tests once we're on a release that has https://github.com/google/glog/issues/709#issuecomment-960381653 fixed
|
|
|
|
doCheck = !stdenv.isDarwin;
|
2022-04-27 09:35:20 +00:00
|
|
|
# There are some non-thread safe tests that can fail
|
|
|
|
enableParallelChecking = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ perl ];
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
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}";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/google/glog";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
description = "Library for application-level logging";
|
|
|
|
platforms = platforms.unix;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ nh2 r-burns ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|