1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 22:20:51 +00:00

aws-sdk-cpp: fix darwin sandbox build

The tests use localhost networking, which is disallowed by
default in the darwin sandbox.
This commit is contained in:
Daiderd Jordan 2019-02-12 23:38:13 +01:00
parent 91c7157919
commit a4a7fd8d68
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 9 additions and 5 deletions

View file

@ -1,9 +1,9 @@
{ lib, stdenv, fetchFromGitHub, cmake, curl, openssl, zlib { lib, stdenv, fetchFromGitHub, cmake, curl, openssl, zlib
, CoreAudio, AudioToolbox
, # Allow building a limited set of APIs, e.g. ["s3" "ec2"]. , # Allow building a limited set of APIs, e.g. ["s3" "ec2"].
apis ? ["*"] apis ? ["*"]
, # Whether to enable AWS' custom memory management. , # Whether to enable AWS' custom memory management.
customMemoryManagement ? true customMemoryManagement ? true
, darwin
}: }:
let let
@ -34,10 +34,10 @@ in stdenv.mkDerivation rec {
++ lib.optionals (stdenv.isDarwin && ++ lib.optionals (stdenv.isDarwin &&
((builtins.elem "text-to-speech" apis) || ((builtins.elem "text-to-speech" apis) ||
(builtins.elem "*" apis))) (builtins.elem "*" apis)))
(with darwin.apple_sdk.frameworks; [ CoreAudio AudioToolbox ]); [ CoreAudio AudioToolbox ];
cmakeFlags = cmakeFlags =
lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0" lib.optional (!customMemoryManagement) "-DCUSTOM_MEMORY_MANAGEMENT=0"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DENABLE_TESTING=OFF" ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DENABLE_TESTING=OFF"
++ lib.optional (apis != ["*"]) ++ lib.optional (apis != ["*"])
"-DBUILD_ONLY=${lib.concatStringsSep ";" apis}"; "-DBUILD_ONLY=${lib.concatStringsSep ";" apis}";
@ -60,6 +60,8 @@ in stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = [ "-Wno-error=noexcept-type" ]; NIX_CFLAGS_COMPILE = [ "-Wno-error=noexcept-type" ];
__darwinAllowLocalNetworking = true;
meta = { meta = {
description = "A C++ interface for Amazon Web Services"; description = "A C++ interface for Amazon Web Services";
homepage = https://github.com/awslabs/aws-sdk-cpp; homepage = https://github.com/awslabs/aws-sdk-cpp;

View file

@ -9369,7 +9369,9 @@ in
inherit (darwin.apple_sdk.frameworks) AudioUnit CoreServices; inherit (darwin.apple_sdk.frameworks) AudioUnit CoreServices;
}; };
aws-sdk-cpp = callPackage ../development/libraries/aws-sdk-cpp { }; aws-sdk-cpp = callPackage ../development/libraries/aws-sdk-cpp {
inherit (darwin.apple_sdk.frameworks) CoreAudio AudioToolbox;
};
babl = callPackage ../development/libraries/babl { }; babl = callPackage ../development/libraries/babl { };
@ -21533,7 +21535,7 @@ in
bftools = callPackage ../applications/science/biology/bftools { }; bftools = callPackage ../applications/science/biology/bftools { };
cmtk = callPackage ../applications/science/biology/cmtk { }; cmtk = callPackage ../applications/science/biology/cmtk { };
conglomerate = callPackage ../applications/science/biology/conglomerate { }; conglomerate = callPackage ../applications/science/biology/conglomerate { };