1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 23:42:43 +01:00

refactor(libstore): rename NIX_WITH_S3_SUPPORT to NIX_WITH_AWS_AUTH

The macro now accurately reflects its purpose: gating only AWS
authentication code, not all S3 functionality. S3 URL parsing, store
configuration, and public bucket access work regardless of this flag.

This rename clarifies that:
- S3 support is always available (URL parsing, store registration)
- Only AWS credential resolution requires the flag
- The flag controls AWS CRT SDK dependency, not S3 protocol support
This commit is contained in:
Bernardo Meurer Costa 2025-10-15 18:14:21 +00:00
parent bb1f22a8df
commit 3224636ab0
No known key found for this signature in database
9 changed files with 19 additions and 19 deletions

View file

@ -10,7 +10,7 @@
#include "store-config-private.hh"
#include "nix/store/s3-url.hh"
#include <optional>
#if NIX_WITH_S3_SUPPORT
#if NIX_WITH_AWS_AUTH
# include "nix/store/aws-creds.hh"
#endif
@ -435,7 +435,7 @@ struct curlFileTransfer : public FileTransfer
}
}
#if NIX_WITH_S3_SUPPORT
#if NIX_WITH_AWS_AUTH
// Set up AWS SigV4 signing if this is an S3 request
// Note: AWS SigV4 support guaranteed available (curl >= 7.75.0 checked at build time)
// The username/password (access key ID and secret key) are set via the general
@ -874,7 +874,7 @@ void FileTransferRequest::setupForS3()
// Update the request URI to use HTTPS (works without AWS SDK)
uri = parsedS3.toHttpsUrl();
#if NIX_WITH_S3_SUPPORT
#if NIX_WITH_AWS_AUTH
// Auth-specific code only compiled when AWS support is available
awsSigV4Provider = "aws:amz:" + parsedS3.region.value_or("us-east-1") + ":s3";