-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add nix nario
command to replace nix-store --export/--import
#13969
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
Open
edolstra
wants to merge
1
commit into
master
Choose a base branch
from
nario
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,28 @@ | ||||||||
R""( | ||||||||
|
||||||||
# Examples | ||||||||
|
||||||||
* Export the closure of building `nixpkgs#hello`: | ||||||||
|
||||||||
```console | ||||||||
# nix nario export --format 1 -r nixpkgs#hello > dump | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe useful?
Suggested change
|
||||||||
``` | ||||||||
|
||||||||
It can be imported in another store: | ||||||||
|
||||||||
```console | ||||||||
# nix nario import < dump | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
``` | ||||||||
|
||||||||
# Description | ||||||||
|
||||||||
This command prints on standard output a serialization of the specified store paths in `nario` format. This serialization can be imported into another store using `nix nario import`. | ||||||||
|
||||||||
References of a path are not exported by default; use `-r` to export a complete closure. | ||||||||
Paths are exported in topographically sorted order (i.e. if path `X` refers to `Y`, then `Y` appears before `X`). | ||||||||
|
||||||||
You must specify the desired `nario` version. Currently the following versions are supported: | ||||||||
|
||||||||
* `1`: This version is compatible with the legacy `nix-store --export` and `nix-store --import` commands. | ||||||||
|
||||||||
)"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
R""( | ||
|
||
# Examples | ||
|
||
* Import store paths from the file named `dump`: | ||
|
||
```console | ||
# nix nario import < dump | ||
``` | ||
|
||
# Description | ||
|
||
This command reads from standard input a serialization of store paths produced by `nix nario export` and adds them to the Nix store. | ||
|
||
)"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
R""( | ||
|
||
# Examples | ||
|
||
* List the contents of a nario file: | ||
|
||
```console | ||
# nix nario list < dump | ||
/nix/store/4y1jj6cwvslmfh1bzkhbvhx77az6yf00-xgcc-14.2.1.20250322-libgcc: 201856 bytes | ||
/nix/store/d8hnbm5hvbg2vza50garppb63y724i94-libunistring-1.3: 2070240 bytes | ||
… | ||
``` | ||
|
||
# Description | ||
|
||
This command lists the contents of a nario file read from standard input. | ||
|
||
)"" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could version be an enum instead? That would be slightly more self-documenting.