Skip to content

Stabilise nix store add #8915

@fricklerhandwerk

Description

@fricklerhandwerk

This implements NixOS/rfcs#136. This issue is agreed-upon by the https://github.com/orgs/NixOS/teams/nix-team

  • merge nix store add-file and nix store add-path into one nix store add and expose the underlying store options
    • expose as --key value or --value1|--value2
      • make PR to CLI guidelines to encode the convention
    • replace --recursive with --mode nar|flat|drv|git (denoting the output hash mode)
      • hash types following Stabilise nix hash and subcommands #8876
      • make --mode nar the default due to history and to match path-to-string coercion behavior in the language
      • flat is for consuming a single file
      • drv (later) for implementing RFC 92; hashing mode to support adding .drv files
      • git (later) for implementing RFC 133
      • TODO: clarify how to expose outputHashMode, outputHashAlgo, etc. on the command line
  • refactoring: nicer names for the concepts in addToStore: https://github.com/NixOS/nix/blob/master/src/libstore/store-api.hh#L517

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRelated to an accepted RFCidea approvedThe given proposal has been discussed and approved by the Nix team. An implementation is welcome.new-cliRelating to the "nix" command

    Projects

    Status

    Done

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions