From c7801e49b128a5b004a9363134c8b201a58ed2f5 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Tue, 15 Jul 2025 14:45:49 +0200 Subject: [PATCH] nix: Only enable AWS when aws-c-common is available on the platform --- pkgs/tools/package-management/nix/common-autoconf.nix | 6 +++++- pkgs/tools/package-management/nix/common-meson.nix | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/package-management/nix/common-autoconf.nix b/pkgs/tools/package-management/nix/common-autoconf.nix index 4ad05d61d01b..a6e758467596 100644 --- a/pkgs/tools/package-management/nix/common-autoconf.nix +++ b/pkgs/tools/package-management/nix/common-autoconf.nix @@ -72,7 +72,11 @@ in xz, enableDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, enableStatic ? stdenv.hostPlatform.isStatic, - withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), + withAWS ? + lib.meta.availableOn stdenv.hostPlatform aws-c-common + && !enableStatic + && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), + aws-c-common, aws-sdk-cpp, withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp, diff --git a/pkgs/tools/package-management/nix/common-meson.nix b/pkgs/tools/package-management/nix/common-meson.nix index 1e2bb73aef41..50e5c9fd060d 100644 --- a/pkgs/tools/package-management/nix/common-meson.nix +++ b/pkgs/tools/package-management/nix/common-meson.nix @@ -63,7 +63,11 @@ assert (hash == null) -> (src != null); xz, enableDocumentation ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, enableStatic ? stdenv.hostPlatform.isStatic, - withAWS ? !enableStatic && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), + withAWS ? + lib.meta.availableOn stdenv.hostPlatform aws-c-common + && !enableStatic + && (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin), + aws-c-common, aws-sdk-cpp, withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp,