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 nar and subcommands #8875

Closed
fricklerhandwerk opened this issue Aug 28, 2023 · 11 comments · Fixed by #9354
Closed

Stabilise nix nar and subcommands #8875

fricklerhandwerk opened this issue Aug 28, 2023 · 11 comments · Fixed by #9354
Assignees
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 Aug 28, 2023

This implements RFC 136. This issue is agreed-upon by the @nixos/nix-team

  • Rename nix nar dump-path to nix nar pack (reserving unpack for the reverse operation)
  • Possible extensions for follow-ups:
    • Make sure the command uses all global flags (currently it doesn't)
    • add unpack to create a local directory
    • Read files to cat and ls from pipe, take arbitrary many on the command line (might get tricky due to sequetiality of reads though)
    • Add direct conversion from and to tar
@fricklerhandwerk fricklerhandwerk added 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 Aug 28, 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-08-28-nix-team-meeting-minutes-83/32290/1

@roberth roberth added the new-cli Relating to the "nix" command label Aug 30, 2023
@thufschmitt thufschmitt modified the milestones: Flakes, CLI Stabilisation Sep 4, 2023
@vicky1999
Copy link
Contributor

Hello, I want to work on this task. can I start working on it?

@fricklerhandwerk
Copy link
Contributor Author

Thanks @vicky1999, this is very much appreciated!

@vicky1999
Copy link
Contributor

vicky1999 commented Sep 14, 2023

@fricklerhandwerk one doubt regarding dump-path command rename task. I saw that we have dump-path subcommand under store as well. should I rename that also to pack?

@fricklerhandwerk
Copy link
Contributor Author

We haven't looked at that one, but from what I can tell they're supposed to do the same. We may want to make an alias. Will check back with the team on Friday.

@fricklerhandwerk
Copy link
Contributor Author

fricklerhandwerk commented Sep 15, 2023

We will reserve nix store import/export for serialising store objects (i.e. with references) while nix nar is for plain directory trees. So let's continue as described in the issue.

Discussed in the Nix team meeting
  • @thufschmitt: nix store operates on the store directly, while nix nar can take any path
    • the problem is that nix store takes installables and will expect flake references if you give it a path
  • @fricklerhandwerk: should call it import/export for the nix store to dump nar+narinfo (=store objects)
    • then nix nar is a strict subset of that that only deals with file system objects, i.e. without references
  • decision: keep nix nar pack, later deal with nix store imprort/export

@vicky1999
Copy link
Contributor

@fricklerhandwerk I have created the PR for renaming nix nar dump-path to nix nar pack. Please review the changes and let me know if it is ok or any other changes were needed. Thanks

@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-15-nix-team-meeting-minutes-86/33171/1

@vicky1999
Copy link
Contributor

@fricklerhandwerk @Ericson2314 I have one doubt regarding the first tast (Rename dump-path to pack). Can I implement it in the same way like store ping, making nix nar dump-path as an alias of nix nar pack.

@fricklerhandwerk
Copy link
Contributor Author

@vicky1999 sure, that should work.

@Ericson2314
Copy link
Member

Should we be closing these before the things are actually marked stable?

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.

6 participants