mirror of
https://github.com/NixOS/nix.git
synced 2025-04-15 13:47:34 +00:00
Merge 1f2266d590
into 0e1323c041
This commit is contained in:
commit
6c730624f0
@ -8,6 +8,7 @@ struct CmdStore : NixMultiCommand
|
||||
{
|
||||
aliases = {
|
||||
{"ping", { AliasStatus::Deprecated, {"info"}}},
|
||||
{"optimize", { AliasStatus::AcceptedShorthand, {"optimise"}}},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -41,6 +41,28 @@ if [ "$inode1" != "$inode3" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
outPath4=$(echo 'with import '"${config_nix}"'; mkDerivation { name = "foo4"; builder = builtins.toFile "builder" "mkdir $out; echo hello > $out/foo"; }' | nix-build - --no-out-link)
|
||||
|
||||
NIX_REMOTE="" nix store optimise
|
||||
|
||||
inode1="$(stat --format=%i $outPath1/foo)"
|
||||
inode4="$(stat --format=%i $outPath4/foo)"
|
||||
if [ "$inode1" != "$inode4" ]; then
|
||||
echo "inodes do not match"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
outPath5=$(echo 'with import '"${config_nix}"'; mkDerivation { name = "foo5"; builder = builtins.toFile "builder" "mkdir $out; echo hello > $out/foo"; }' | nix-build - --no-out-link)
|
||||
|
||||
NIX_REMOTE="" nix store optimize # alias of optimise
|
||||
|
||||
inode1="$(stat --format=%i $outPath1/foo)"
|
||||
inode5="$(stat --format=%i $outPath5/foo)"
|
||||
if [ "$inode1" != "$inode5" ]; then
|
||||
echo "inodes do not match"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
nix-store --gc
|
||||
|
||||
if [ -n "$(ls $NIX_STORE_DIR/.links)" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user