1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-22 18:29:36 +01:00

refactor(libstore): minimize NIX_WITH_S3_SUPPORT scope to auth only

Move S3 URL parsing, store configuration, and public bucket support
outside of NIX_WITH_S3_SUPPORT guards. Only AWS credential resolution
remains gated, allowing builds with withAWS = false to:

- Parse s3:// URLs
- Register S3 store types
- Access public S3 buckets (via HTTPS conversion)
- Use S3-compatible services without authentication

The setupForS3() function now always performs URL conversion, with
authentication code conditionally compiled based on NIX_WITH_S3_SUPPORT.
The aws-creds.cc file (only code using AWS CRT SDK) is now conditionally
compiled by meson.
This commit is contained in:
Bernardo Meurer Costa 2025-10-15 18:07:42 +00:00
parent 1f710300c9
commit bb1f22a8df
No known key found for this signature in database
9 changed files with 40 additions and 67 deletions

View file

@ -265,7 +265,6 @@ config_priv_h = configure_file(
subdir('nix-meson-build-support/common')
sources = files(
'aws-creds.cc',
'binary-cache-store.cc',
'build-result.cc',
'build/derivation-builder.cc',
@ -344,6 +343,11 @@ sources = files(
'worker-protocol.cc',
)
# AWS credentials code requires AWS CRT, so only compile when enabled
if curl_s3_store_opt.enabled()
sources += files('aws-creds.cc')
endif
subdir('include/nix/store')
if host_machine.system() == 'linux'