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 {
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 ];
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;

View file

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