-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix add-to-store: Move markdown docs into a separate file
- Loading branch information
Showing
2 changed files
with
31 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 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""( | ||
|
||
# Description | ||
|
||
Copy the file or directory *path* to the Nix store, and | ||
print the resulting store path on standard output. | ||
|
||
> **Warning** | ||
> | ||
> The resulting store path is not registered as a garbage | ||
> collector root, so it could be deleted before you have a | ||
> chance to register it. | ||
# Examples | ||
|
||
Add a regular file to the store: | ||
|
||
```console | ||
# echo foo > bar | ||
|
||
# nix add-to-store --flat ./bar | ||
/nix/store/cbv2s4bsvzjri77s2gb8g8bpcb6dpa8w-bar | ||
|
||
# cat /nix/store/cbv2s4bsvzjri77s2gb8g8bpcb6dpa8w-bar | ||
foo | ||
``` | ||
|
||
)"" |