1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 19:23:54 +02:00

Support hard links in tarballs

Fixes #10395.
This commit is contained in:
Eelco Dolstra 2024-06-11 16:05:57 +02:00
parent d1dd7abbf0
commit 35bdb9cee7
7 changed files with 78 additions and 7 deletions

View file

@ -59,3 +59,12 @@ test_tarball() {
test_tarball '' cat
test_tarball .xz xz
test_tarball .gz gzip
# Test hard links.
path="$(nix flake prefetch --json "tarball+file://$(pwd)/tree.tar.gz" | jq -r .storePath)"
[[ $(cat "$path/a/b/foo") = bar ]]
[[ $(cat "$path/a/b/xyzzy") = bar ]]
[[ $(cat "$path/a/yyy") = bar ]]
[[ $(cat "$path/a/zzz") = bar ]]
[[ $(cat "$path/c/aap") = bar ]]
[[ $(cat "$path/fnord") = bar ]]

Binary file not shown.