nixpkgs/pkgs/development/libraries/glog/default.nix

37 lines
1.1 KiB
Nix
Raw Normal View History

2019-12-16 12:04:53 +00:00
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl, static ? false }:
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";
})
];
2019-12-16 12:04:53 +00:00
nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "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
};
}