From c927d0e21cc4061d8da80a6de2c4cf5d311be3ae Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 5 Dec 2025 15:33:39 -0400 Subject: [PATCH] nix: fix cross-build failure by disabling s3-aws-auth --- .../nix/modular/src/libstore/package.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/package-management/nix/modular/src/libstore/package.nix b/pkgs/tools/package-management/nix/modular/src/libstore/package.nix index fc24d6bccf59b..30312d05fdba6 100644 --- a/pkgs/tools/package-management/nix/modular/src/libstore/package.nix +++ b/pkgs/tools/package-management/nix/modular/src/libstore/package.nix @@ -21,6 +21,10 @@ version, embeddedSandboxShell ? stdenv.hostPlatform.isStatic, + + withAWS ? + # Default is this way because there have been issues building this dependency + stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin), }: mkMesonLibrary (finalAttrs: { @@ -39,7 +43,7 @@ mkMesonLibrary (finalAttrs: { ++ lib.optional stdenv.hostPlatform.isLinux libseccomp # There have been issues building these dependencies ++ - lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin)) + lib.optional withAWS # Nix >=2.33 doesn't depend on aws-sdk-cpp and only requires aws-crt-cpp for authenticated s3:// requests. (if lib.versionAtLeast (lib.versions.majorMinor version) "2.33" then aws-crt-cpp else aws-sdk-cpp); @@ -52,6 +56,9 @@ mkMesonLibrary (finalAttrs: { (lib.mesonEnable "seccomp-sandboxing" stdenv.hostPlatform.isLinux) (lib.mesonBool "embedded-sandbox-shell" embeddedSandboxShell) ] + ++ lib.optional (lib.versionAtLeast (lib.versions.majorMinor version) "2.33") ( + lib.mesonEnable "s3-aws-auth" withAWS + ) ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox") ];