packaging: Fix static builds with S3 support, enable by default
aws-crt-cpp doesn't provide pkg-config files and has a bunch of transitive deps, so switch to cmake for resolving the dependency.
This commit is contained in:
@@ -158,14 +158,15 @@ sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
|
||||
deps_private += sqlite
|
||||
|
||||
s3_aws_auth = get_option('s3-aws-auth')
|
||||
aws_crt_cpp = cxx.find_library('aws-crt-cpp', required : s3_aws_auth)
|
||||
aws_crt_cpp = dependency(
|
||||
'aws-crt-cpp',
|
||||
required : s3_aws_auth,
|
||||
method : 'cmake',
|
||||
modules : [ 'AWS::aws-crt-cpp' ],
|
||||
)
|
||||
|
||||
if s3_aws_auth.enabled()
|
||||
deps_other += aws_crt_cpp
|
||||
aws_c_common = cxx.find_library('aws-c-common', required : true)
|
||||
deps_other += aws_c_common
|
||||
aws_c_auth = cxx.find_library('aws-c-auth', required : true)
|
||||
deps_other += aws_c_auth
|
||||
endif
|
||||
|
||||
configdata_pub.set('NIX_WITH_AWS_AUTH', s3_aws_auth.enabled().to_int())
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
libseccomp,
|
||||
nlohmann_json,
|
||||
sqlite,
|
||||
cmake, # for resolving aws-crt-cpp dep
|
||||
|
||||
busybox-sandbox-shell ? null,
|
||||
|
||||
@@ -25,7 +26,7 @@
|
||||
|
||||
withAWS ?
|
||||
# Default is this way because there have been issues building this dependency
|
||||
lib.meta.availableOn stdenv.hostPlatform aws-c-common,
|
||||
(lib.meta.availableOn stdenv.hostPlatform aws-c-common),
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -57,7 +58,8 @@ mkMesonLibrary (finalAttrs: {
|
||||
(fileset.fileFilter (file: file.hasExt "sql") ./.)
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optional embeddedSandboxShell unixtools.hexdump;
|
||||
nativeBuildInputs =
|
||||
lib.optional withAWS cmake ++ lib.optional embeddedSandboxShell unixtools.hexdump;
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
|
||||
Reference in New Issue
Block a user