aboutsummaryrefslogtreecommitdiff
path: root/tests/path-from-hash-part.sh
blob: bdd10443448d8dbad9ee377da249f2c70221fcad (plain)
1
2
3
4
5
6
7
8
9
10
source common.sh

path=$(nix build --no-link --print-out-paths -f simple.nix)

hash_part=$(basename $path)
hash_part=${hash_part:0:32}

path2=$(nix store path-from-hash-part $hash_part)

[[ $path = $path2 ]]