Hard links copy the whole target node, symlinks included
Merged
LU
22d ago+1567+1567+0123456789012345678901234567890123456789-138-138-012345678901234567890123456789
A hard link was replayed as a regular file with the target's attributes, so a hard link to a symlink kept the symlink mode but had no target and readlink failed with EINVAL. Nix's optimised store hard-links symlinks into /nix/store/.links, which broke every nixpacks-built image (unreadable libz.so.1 and friends). Regression test added.
Made with Cursor