Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilise nix store add #8915

Closed
fricklerhandwerk opened this issue Sep 4, 2023 · 3 comments · Fixed by #9357
Closed

Stabilise nix store add #8915

fricklerhandwerk opened this issue Sep 4, 2023 · 3 comments · Fixed by #9357
Labels
idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. new-cli Relating to the "nix" command RFC Related to an accepted RFC

Comments

@fricklerhandwerk
Copy link
Contributor

fricklerhandwerk commented Sep 4, 2023

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
@fricklerhandwerk fricklerhandwerk added new-cli Relating to the "nix" command idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. RFC Related to an accepted RFC labels Sep 4, 2023
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-09-04-nix-team-meeting-minutes-85/32608/1

@Ericson2314 Ericson2314 changed the title Stabilise nix store add-file and nix store add-path Stabilise nix store add Sep 25, 2023
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-09-25-nix-team-meeting-minutes-89/33489/1

@Ericson2314
Copy link
Member

We forgot the --algo flag to choose the hash algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. new-cli Relating to the "nix" command RFC Related to an accepted RFC
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants