at 23.05-pre 48 lines 1.4 kB view raw
1{ stdenv, lib, fetchFromGitHub, cmake, gflags, gtest, perl }: 2 3stdenv.mkDerivation rec { 4 pname = "glog"; 5 version = "0.6.0"; 6 7 src = fetchFromGitHub { 8 owner = "google"; 9 repo = "glog"; 10 rev = "v${version}"; 11 sha256 = "sha256-xqRp9vaauBkKz2CXbh/Z4TWqhaUtqfbsSlbYZR/kW9s="; 12 }; 13 14 nativeBuildInputs = [ cmake ]; 15 16 buildInputs = [ gtest ]; 17 18 propagatedBuildInputs = [ gflags ]; 19 20 cmakeFlags = [ 21 "-DBUILD_SHARED_LIBS=ON" 22 ]; 23 24 # TODO: Re-enable Darwin tests once we're on a release that has https://github.com/google/glog/issues/709#issuecomment-960381653 fixed 25 doCheck = !stdenv.isDarwin; 26 # There are some non-thread safe tests that can fail 27 enableParallelChecking = false; 28 checkInputs = [ perl ]; 29 30 GTEST_FILTER = 31 let 32 filteredTests = lib.optionals stdenv.hostPlatform.isMusl [ 33 "Symbolize.SymbolizeStackConsumption" 34 "Symbolize.SymbolizeWithDemanglingStackConsumption" 35 ] ++ lib.optionals stdenv.hostPlatform.isStatic [ 36 "LogBacktraceAt.DoesBacktraceAtRightLineWhenEnabled" 37 ]; 38 in 39 lib.optionalString doCheck "-${builtins.concatStringsSep ":" filteredTests}"; 40 41 meta = with lib; { 42 homepage = "https://github.com/google/glog"; 43 license = licenses.bsd3; 44 description = "Library for application-level logging"; 45 platforms = platforms.unix; 46 maintainers = with maintainers; [ nh2 r-burns ]; 47 }; 48}