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

Add nix store import and nix store export commands to work with nar/narinfo #9038

Open
fricklerhandwerk opened this issue Sep 25, 2023 · 1 comment · May be fixed by #9474
Open

Add nix store import and nix store export commands to work with nar/narinfo #9038

fricklerhandwerk opened this issue Sep 25, 2023 · 1 comment · May be fixed by #9474
Labels
feature Feature request or proposal new-cli Relating to the "nix" command

Comments

@fricklerhandwerk
Copy link
Contributor

fricklerhandwerk commented Sep 25, 2023

This is part of the CLI stabilisation effort.

Description

The commands should convert between store objects and nar/narinfo .
Since we're not settled on a format, require passing a format flag. This allows to add more formats later and set a default once we're confident this something that can be supported in the long term.

Warning

The current export format does not support CA and is not extensible.

Example

$ nix store export <store path> --format tar
# ... tar stream with nar and narinfo files
$ nix store import <path>...
/nix/store/<hash>-<name>
# more paths

TODO: Clarify CLI guideline in terms of reading from stdin

Context

Add 👍 to issues you find important.

@fricklerhandwerk fricklerhandwerk added feature Feature request or proposal new-cli Relating to the "nix" command labels 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

thufschmitt pushed a commit to tweag/nix that referenced this issue Nov 27, 2023
Fix NixOS#9038

The only thing that the issue didn't precise is how we should call the
current (`nix-store --export`) format[^1]. I've settled to `binary` by lack
of something better.

[^1]: The issue mentions `--format tar`, but this is whishful thinking
for the future, the current format isn't `tar`-based at all.
thufschmitt pushed a commit to tweag/nix that referenced this issue Nov 27, 2023
Fix NixOS#9038

The only thing that the issue didn't precise is how we should call the
current (`nix-store --export`) format[^1]. I've settled to `binary` by lack
of something better.

[^1]: The issue mentions `--format tar`, but this is whishful thinking
for the future, the current format isn't `tar`-based at all.
@thufschmitt thufschmitt added this to the CLI Stabilisation milestone Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request or proposal new-cli Relating to the "nix" command
Projects
Status: Defined work
Development

Successfully merging a pull request may close this issue.

3 participants