brotli: add staticOnly option

This commit is contained in:
Matthew Bauer 2019-02-13 00:07:13 -05:00 committed by Domen Kožar
parent 3a63bee154
commit 7ebd5999bd
No known key found for this signature in database
GPG Key ID: C2FFBCAFD2C24246
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake }:
{ stdenv, fetchFromGitHub, cmake, fetchpatch, staticOnly ? false }:
# ?TODO: there's also python lib in there
@ -15,7 +15,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ];
cmakeFlags = [];
patches = stdenv.lib.optional staticOnly (fetchpatch {
url = "https://github.com/google/brotli/pull/655/commits/7289e5a378ba13801996a84d89d8fe95c3fc4c11.patch";
sha256 = "1bghbdvj24jrvb0sqfdif9vwg7wx6pn8dvl6flkrcjkhpj0gi0jg";
});
cmakeFlags = []
++ stdenv.lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
outputs = [ "out" "dev" "lib" ];

View File

@ -159,6 +159,10 @@ in {
};
};
brotli = super.brotli.override {
staticOnly = true;
};
llvmPackages_8 = super.llvmPackages_8 // {
libraries = super.llvmPackages_8.libraries // rec {
libcxxabi = super.llvmPackages_8.libraries.libcxxabi.override {