mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +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:
parent
1f710300c9
commit
bb1f22a8df
9 changed files with 40 additions and 67 deletions
|
|
@ -1,13 +1,10 @@
|
|||
#include "nix/store/s3-url.hh"
|
||||
#include "nix/util/error.hh"
|
||||
#include "nix/util/split.hh"
|
||||
#include "nix/util/strings-inline.hh"
|
||||
|
||||
#if NIX_WITH_S3_SUPPORT
|
||||
|
||||
# include "nix/util/error.hh"
|
||||
# include "nix/util/split.hh"
|
||||
# include "nix/util/strings-inline.hh"
|
||||
|
||||
# include <ranges>
|
||||
# include <string_view>
|
||||
#include <ranges>
|
||||
#include <string_view>
|
||||
|
||||
using namespace std::string_view_literals;
|
||||
|
||||
|
|
@ -117,5 +114,3 @@ ParsedURL ParsedS3URL::toHttpsUrl() const
|
|||
}
|
||||
|
||||
} // namespace nix
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue