Skip to content

Build S3 and other stores as plugins #11234

Open
@roberth

Description

Is your feature request related to a problem? Please describe.

"Nix itself depends on aws-sdk-cpp"

It kind of doesn't. It's an optional dependency, and many users don't need it.
Some might even feel it's tainted because they don't understand S3 is just an HTTP interface with multiple good open source server implementations, and this is just an HTTP client library.
Nonetheless, we can reap benefits from modularizing internally, and other stores could follow the same pattern:

  • Validate the plugin system and lower the barrier for using it for this purpose. It probably has a few kinks we'll iron out in the process.
  • Finer grained build leads to shorter incremental build times. E.g. the functional tests VM test doesn't need it.
  • Let users enable/disable without having to recompile (only rebuilding the final wrapper package)

Describe the solution you'd like

  • Build this store implementation in a separate derivation and meson subproject. Combine it into the Nix CLI at a late stage.
  • Keep distributing the S3 store in the default package and NixOS images. Its removal would be unnecessarily disruptive.
    It could perhaps be removed from the default NixOS configuration, but it's probably best to enable it in the installer images.

Describe alternatives you've considered

Additional context

If we extend the C API to handle this, we could turn it into a separately distributed package, but figuring out a stable interface for this implies a level of maturity that I don't think the store layer has reached yet. This public/stable API would follow all quirks we may currently have, and fixing those would then involve writing and maintaining compatibility logic, so I think we shouldn't do this yet.

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposalstoreIssues and pull requests concerning the Nix store

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions