Skip to content

Commit d38ebcc

Browse files
authored
nix: fix cross-build failure by disabling s3-aws-auth (#468205)
2 parents a5671cc + c927d0e commit d38ebcc

File tree

1 file changed

+8
-1
lines changed
  • pkgs/tools/package-management/nix/modular/src/libstore

1 file changed

+8
-1
lines changed

pkgs/tools/package-management/nix/modular/src/libstore/package.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
version,
2222

2323
embeddedSandboxShell ? stdenv.hostPlatform.isStatic,
24+
25+
withAWS ?
26+
# Default is this way because there have been issues building this dependency
27+
stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin),
2428
}:
2529

2630
mkMesonLibrary (finalAttrs: {
@@ -39,7 +43,7 @@ mkMesonLibrary (finalAttrs: {
3943
++ lib.optional stdenv.hostPlatform.isLinux libseccomp
4044
# There have been issues building these dependencies
4145
++
42-
lib.optional (stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin))
46+
lib.optional withAWS
4347
# Nix >=2.33 doesn't depend on aws-sdk-cpp and only requires aws-crt-cpp for authenticated s3:// requests.
4448
(if lib.versionAtLeast (lib.versions.majorMinor version) "2.33" then aws-crt-cpp else aws-sdk-cpp);
4549

@@ -52,6 +56,9 @@ mkMesonLibrary (finalAttrs: {
5256
(lib.mesonEnable "seccomp-sandboxing" stdenv.hostPlatform.isLinux)
5357
(lib.mesonBool "embedded-sandbox-shell" embeddedSandboxShell)
5458
]
59+
++ lib.optional (lib.versionAtLeast (lib.versions.majorMinor version) "2.33") (
60+
lib.mesonEnable "s3-aws-auth" withAWS
61+
)
5562
++ lib.optionals stdenv.hostPlatform.isLinux [
5663
(lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox")
5764
];

0 commit comments

Comments
 (0)