aws-sdk-cpp: Allow building some APIS and disabling custom memory management
This commit is contained in:
parent
42255f8945
commit
7b2ac69ada
|
@ -1,4 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, curl }:
|
{ lib, stdenv, fetchFromGitHub, cmake, curl
|
||||||
|
, # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
|
||||||
|
apis ? ["*"]
|
||||||
|
, # Whether to enable AWS' custom memory management.
|
||||||
|
customMemoryManagement ? true
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "aws-sdk-cpp-${version}";
|
name = "aws-sdk-cpp-${version}";
|
||||||
|
@ -13,9 +18,10 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ cmake curl ];
|
buildInputs = [ cmake curl ];
|
||||||
|
|
||||||
# FIXME: provide flags to build only part of the SDK, or put them in
|
cmakeFlags =
|
||||||
# different outputs.
|
lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
|
||||||
# cmakeFlags = "-DBUILD_ONLY=aws-cpp-sdk-s3";
|
++ lib.optional (apis != ["*"])
|
||||||
|
"-DBUILD_ONLY=${lib.concatMapStringsSep ";" (api: "aws-cpp-sdk-" + api) apis}";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue