mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
Add a new nix store add
command
Deprecate `nix store add-file` and `nix store add-path`, and replace them with a single `nix store add` command.
This commit is contained in:
parent
2afe2e4fbc
commit
84128461b6
5 changed files with 68 additions and 51 deletions
|
@ -26,3 +26,20 @@ hash2=$(nix-hash --type sha256 --base32 ./dummy)
|
|||
echo $hash2
|
||||
|
||||
test "$hash1" = "sha256:$hash2"
|
||||
|
||||
#### New style commands
|
||||
|
||||
clearStore
|
||||
|
||||
(
|
||||
path1=$(nix store add ./dummy)
|
||||
path2=$(nix store add --mode nar ./dummy)
|
||||
path3=$(nix store add-path ./dummy)
|
||||
[[ "$path1" == "$path2" ]]
|
||||
[[ "$path1" == "$path3" ]]
|
||||
)
|
||||
(
|
||||
path1=$(nix store add --mode flat ./dummy)
|
||||
path2=$(nix store add-file ./dummy)
|
||||
[[ "$path1" == "$path2" ]]
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue