From 93da24ca80f04349b5fc00848ae0a20120607e5c Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Mon, 16 Dec 2019 13:05:48 +0100 Subject: [PATCH] gflags: add pkgsStatic support --- pkgs/development/libraries/gflags/default.nix | 6 +++--- pkgs/top-level/static.nix | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gflags/default.nix b/pkgs/development/libraries/gflags/default.nix index 2e818ea94ea5..b09936f29240 100644 --- a/pkgs/development/libraries/gflags/default.nix +++ b/pkgs/development/libraries/gflags/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake }: +{ stdenv, fetchFromGitHub, cmake, enableShared ? true}: stdenv.mkDerivation rec { pname = "gflags"; @@ -17,8 +17,8 @@ stdenv.mkDerivation rec { preConfigure = "rm BUILD"; cmakeFlags = [ - "-DBUILD_SHARED_LIBS=ON" - "-DBUILD_STATIC_LIBS=ON" + "-DGFLAGS_BUILD_SHARED_LIBS=${if enableShared then "ON" else "OFF"}" + "-DGFLAGS_BUILD_STATIC_LIBS=ON" ]; doCheck = false; diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix index 74c4b838ccc3..16484b47e010 100644 --- a/pkgs/top-level/static.nix +++ b/pkgs/top-level/static.nix @@ -176,6 +176,9 @@ in { gmp = super.gmp.override { withStatic = true; }; + gflags = super.gflags.override { + enableShared = false; + }; glog = super.glog.override { static = true; };