git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #144561 from nh2/glog-0.5.0

glog: 0.4.0 -> 0.5.0, also enable tests

commitb79047331e07e16bb7f9e512f88f7dde8ee3bf82 authorNiklas Hambüchen <mail@nh2.me> dateSat 6 Nov 2021, 00:36 (5 years ago) parent9ce5bc68b9d12e
1 file changed+18−15
pkgs/development/libraries/glog/default.nix+18−15
pkgs/development/libraries/glog/default.nix+18−15
@@ -2,43 +2,46 @@
22
33stdenv.mkDerivation rec {
44 pname = "glog";
5− version = "0.4.0";
5+ version = "0.5.0";
66
77 src = fetchFromGitHub {
88 owner = "google";
99 repo = "glog";
1010 rev = "v${version}";
11− sha256 = "1xd3maiipfbxmhc9rrblc5x52nxvkwxp14npg31y5njqvkvzax9b";
11+ sha256 = "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3";
1212 };
1313
14− patches = lib.optionals stdenv.hostPlatform.isMusl [
15− # TODO: Remove at next release that includes this commit.
14+ patches = [
15+ # Fix duplicate-concatenated nix store path in cmake file, see:
16+ # https://github.com/NixOS/nixpkgs/pull/144561#issuecomment-960296043
17+ # TODO: Remove when https://github.com/google/glog/pull/733 is merged and available.
1618 (fetchpatch {
17− name = "glog-Fix-symbolize_unittest-for-musl-builds.patch";
18− url = "https://github.com/google/glog/commit/834dd780bf1fe0704b8ed0350ca355a55f711a9f.patch";
19− sha256 = "0k4lanxg85anyvjsj3mh93bcgds8gizpiamcy2zvs3yyfjl40awn";
19+ name = "glog-cmake-Fix-incorrect-relative-path-concatenation.patch";
20+ url = "https://github.com/google/glog/pull/733/commits/57c636c02784f909e4b5d3c2f0ecbdbb47097266.patch";
21+ sha256 = "1py93gkzmcyi2ypcwyj3nri210z8fmlaif51yflzmrrv507zd7bi";
2022 })
2123 ];
2224
23− postPatch = lib.optionalString stdenv.isDarwin ''
24− # A path clash on case-insensitive file systems blocks creation of the build directory.
25− # The file in question is specific to bazel and does not influence the build result.
26− rm BUILD
27− '';
28−
2925 nativeBuildInputs = [ cmake ];
3026
3127 propagatedBuildInputs = [ gflags ];
3228
33− cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
29+ cmakeFlags = [
30+ "-DBUILD_SHARED_LIBS=ON"
31+ # Mak CMake place RPATHs such that tests will find the built libraries.
32+ # See https://github.com/NixOS/nixpkgs/pull/144561#discussion_r742468811 and https://github.com/NixOS/nixpkgs/pull/108496
33+ "-DCMAKE_SKIP_BUILD_RPATH=OFF"
34+ ];
3435
36+ # TODO: Re-enable Darwin tests once we're on a release that has https://github.com/google/glog/issues/709#issuecomment-960381653 fixed
37+ doCheck = !stdenv.isDarwin;
3538 checkInputs = [ perl ];
36− doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
3739
3840 meta = with lib; {
3941 homepage = "https://github.com/google/glog";
4042 license = licenses.bsd3;
4143 description = "Library for application-level logging";
4244 platforms = platforms.unix;
45+ maintainers = with lib.maintainers; [ nh2 r-burns ];
4346 };
4447}