3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/glog/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2020-01-14 14:56:19 +00:00
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }:
2014-01-24 14:51:04 +00:00
stdenv.mkDerivation rec {
pname = "glog";
version = "0.4.0";
2015-04-21 23:33:39 +01:00
src = fetchFromGitHub {
2017-11-12 13:37:36 +00:00
owner = "google";
2015-04-21 23:33:39 +01:00
repo = "glog";
rev = "v${version}";
sha256 = "1xd3maiipfbxmhc9rrblc5x52nxvkwxp14npg31y5njqvkvzax9b";
2014-01-24 14:51:04 +00:00
};
patches = lib.optionals stdenv.hostPlatform.isMusl [
# TODO: Remove at next release that includes this commit.
(fetchpatch {
name = "glog-Fix-symbolize_unittest-for-musl-builds.patch";
url = "https://github.com/google/glog/commit/834dd780bf1fe0704b8ed0350ca355a55f711a9f.patch";
sha256 = "0k4lanxg85anyvjsj3mh93bcgds8gizpiamcy2zvs3yyfjl40awn";
})
];
postPatch = lib.optionalString stdenv.isDarwin ''
# A path clash on case-insensitive file systems blocks creation of the build directory.
# The file in question is specific to bazel and does not influence the build result.
rm BUILD
'';
2019-12-16 12:04:53 +00:00
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ gflags ];
2020-01-14 14:56:19 +00:00
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
2015-04-21 23:33:39 +01:00
2018-08-08 19:31:20 +01:00
checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
2015-04-21 23:33:39 +01:00
meta = with stdenv.lib; {
2019-12-16 12:04:53 +00:00
homepage = "https://github.com/google/glog";
2015-04-21 23:33:39 +01:00
license = licenses.bsd3;
description = "Library for application-level logging";
2015-04-21 23:33:39 +01:00
platforms = platforms.unix;
2014-01-24 14:51:04 +00:00
};
}