double-conversion: add pkgsStatic support

This commit is contained in:
Tobias Mayer 2019-12-16 10:59:36 +01:00
parent c06a0b2c8c
commit 15fb93ac4f
2 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, cmake }: { stdenv, lib, fetchFromGitHub, cmake, static ? false }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "double-conversion"; pname = "double-conversion";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}" ];
# Case sensitivity issue # Case sensitivity issue
preConfigure = lib.optionalString stdenv.isDarwin '' preConfigure = lib.optionalString stdenv.isDarwin ''
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Binary-decimal and decimal-binary routines for IEEE doubles"; description = "Binary-decimal and decimal-binary routines for IEEE doubles";
homepage = https://github.com/google/double-conversion; homepage = "https://github.com/google/double-conversion";
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = with maintainers; [ abbradar ]; maintainers = with maintainers; [ abbradar ];

View File

@ -170,6 +170,9 @@ in {
# --disable-shared flag # --disable-shared flag
stdenv = super.stdenv; stdenv = super.stdenv;
}; };
double-conversion = super.double-conversion.override {
static = true;
};
gmp = super.gmp.override { gmp = super.gmp.override {
withStatic = true; withStatic = true;
}; };