mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 06:56:14 +02:00
22 lines
518 B
Bash
22 lines
518 B
Bash
source common.sh
|
|
|
|
cd $TEST_ROOT
|
|
|
|
echo example > example.txt
|
|
mkdir -p ./x
|
|
|
|
NIX_STORE_DIR=$TEST_ROOT/x
|
|
|
|
CORRECT_PATH=$(nix-store --store ./x --add example.txt)
|
|
|
|
PATH1=$(nix path-info --store ./x $CORRECT_PATH)
|
|
[ $CORRECT_PATH == $PATH1 ]
|
|
|
|
PATH2=$(nix path-info --store "$PWD/x" $CORRECT_PATH)
|
|
[ $CORRECT_PATH == $PATH2 ]
|
|
|
|
PATH3=$(nix path-info --store "local?root=$PWD/x" $CORRECT_PATH)
|
|
[ $CORRECT_PATH == $PATH3 ]
|
|
|
|
# Ensure store info trusted works with local store
|
|
nix --store ./x store info --json | jq -e '.trusted'
|