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:
parent
bb1f22a8df
commit
3224636ab0
9 changed files with 19 additions and 19 deletions
|
|
@ -46,7 +46,7 @@
|
|||
#include "store-config-private.hh"
|
||||
#include "build/derivation-check.hh"
|
||||
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
# include "nix/store/aws-creds.hh"
|
||||
# include "nix/store/s3-url.hh"
|
||||
# include "nix/util/url.hh"
|
||||
|
|
@ -296,7 +296,7 @@ protected:
|
|||
*/
|
||||
virtual void startChild();
|
||||
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
/**
|
||||
* Pre-resolve AWS credentials for S3 URLs in builtin:fetchurl.
|
||||
* This should be called before forking to ensure credentials are available in child.
|
||||
|
|
@ -359,7 +359,7 @@ protected:
|
|||
*/
|
||||
struct RunChildArgs
|
||||
{
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
std::optional<AwsCredentials> awsCredentials;
|
||||
#endif
|
||||
};
|
||||
|
|
@ -945,7 +945,7 @@ void DerivationBuilderImpl::openSlave()
|
|||
throw SysError("cannot pipe standard error into log file");
|
||||
}
|
||||
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
std::optional<AwsCredentials> DerivationBuilderImpl::preResolveAwsCredentials()
|
||||
{
|
||||
if (drv.isBuiltin() && drv.builder == "builtin:fetchurl") {
|
||||
|
|
@ -974,7 +974,7 @@ std::optional<AwsCredentials> DerivationBuilderImpl::preResolveAwsCredentials()
|
|||
void DerivationBuilderImpl::startChild()
|
||||
{
|
||||
RunChildArgs args{
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
.awsCredentials = preResolveAwsCredentials(),
|
||||
#endif
|
||||
};
|
||||
|
|
@ -1255,7 +1255,7 @@ void DerivationBuilderImpl::runChild(RunChildArgs args)
|
|||
BuiltinBuilderContext ctx{
|
||||
.drv = drv,
|
||||
.tmpDirInSandbox = tmpDirInSandbox(),
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
#if NIX_WITH_AWS_AUTH
|
||||
.awsCredentials = args.awsCredentials,
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ struct ChrootLinuxDerivationBuilder : ChrootDerivationBuilder, LinuxDerivationBu
|
|||
void startChild() override
|
||||
{
|
||||
RunChildArgs args{
|
||||
# if NIX_WITH_S3_SUPPORT
|
||||
# if NIX_WITH_AWS_AUTH
|
||||
.awsCredentials = preResolveAwsCredentials(),
|
||||
# endif
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue