glog: add pkgsStatic support

This commit is contained in:
Tobias Mayer 2019-12-16 13:04:53 +01:00
parent 15fb93ac4f
commit d567c7e497
2 changed files with 8 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook, perl }: { stdenv, lib, fetchFromGitHub, fetchpatch, cmake, perl, static ? false }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "glog"; pname = "glog";
@ -20,13 +20,15 @@ stdenv.mkDerivation rec {
}) })
]; ];
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ];
checkInputs = [ perl ]; checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm" doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/google/glog; homepage = "https://github.com/google/glog";
license = licenses.bsd3; license = licenses.bsd3;
description = "Library for application-level logging"; description = "Library for application-level logging";
platforms = platforms.unix; platforms = platforms.unix;

View file

@ -176,6 +176,9 @@ in {
gmp = super.gmp.override { gmp = super.gmp.override {
withStatic = true; withStatic = true;
}; };
glog = super.glog.override {
static = true;
};
cdo = super.cdo.override { cdo = super.cdo.override {
enable_all_static = true; enable_all_static = true;
}; };