nix: make AWS support optional

This commit is contained in:
Jan Malakhovski 2018-09-05 14:35:15 +00:00
parent c9fcabcf4b
commit 4e735835e0

View File

@ -1,11 +1,12 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
, pkgconfig, boehmgc, perlPackages, libsodium, aws-sdk-cpp, brotli, boost
, pkgconfig, boehmgc, perlPackages, libsodium, brotli, boost
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
, busybox-sandbox-shell
, storeDir ? "/nix/store"
, stateDir ? "/nix/var"
, confDir ? "/etc"
, withLibseccomp ? libseccomp.meta.available, libseccomp
, withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp
}:
let
@ -31,7 +32,7 @@ let
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optionals is20 [ brotli boost ]
++ lib.optional withLibseccomp libseccomp
++ lib.optional ((stdenv.isLinux || stdenv.isDarwin) && is20)
++ lib.optional (withAWS && is20)
((aws-sdk-cpp.override {
apis = ["s3" "transfer"];
customMemoryManagement = false;