summary refs log tree commit diff
path: root/pkgs/development/libraries/glog/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/glog/default.nix')
-rw-r--r--pkgs/development/libraries/glog/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/development/libraries/glog/default.nix b/pkgs/development/libraries/glog/default.nix
index 792217043da..aa846e41d55 100644
--- a/pkgs/development/libraries/glog/default.nix
+++ b/pkgs/development/libraries/glog/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, perl }:
+{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, gflags, perl }:
 
 stdenv.mkDerivation rec {
   pname = "glog";
@@ -20,13 +20,23 @@ stdenv.mkDerivation rec {
     })
   ];
 
-  nativeBuildInputs = [ autoreconfHook ];
+  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
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  propagatedBuildInputs = [ gflags ];
+
+  cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
 
   checkInputs = [ perl ];
   doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
 
   meta = with stdenv.lib; {
-    homepage = https://github.com/google/glog;
+    homepage = "https://github.com/google/glog";
     license = licenses.bsd3;
     description = "Library for application-level logging";
     platforms = platforms.unix;