You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output is unexpected because when running ls -l /nix/store/r6lqcxqvm8q574rfba804d5gsxspnrrp-hello outside of a nix build sandbox, it is a symbolic link, while when building ls-hello, it is a regular file.
The behavior is not good. For example, the inconsistent file types of r6lqcxqvm8q574rfba804d5gsxspnrrp-hello between build time and run time makes the digest computed by nix2container at build time mismatch with the digest at run time, leading to nlewo/nix2container#127.
Expected behavior
/nix/store/r6lqcxqvm8q574rfba804d5gsxspnrrp-hello should be always a symbolic link even in a sandbox, not a regular file.
nix-env --version output
nix-env (Nix) 2.21.0
Additional context
When building ls-hello in nix-daemon 2.18.2, it sees a symbolic link as expected. Therefore, this issue is a regression.
The nix client version does not matter. I used nix client 2.18.2 with nix-daemon 2.21.0 to reproduce this bug.
Describe the bug
When I create a derivation of a symbolic link:
then print it from another derivation:
the output path of
hello
becomes a regular file.I created a simple reproduction at https://github.com/Atry/nix-regression-sandbox-symbolic-links/blob/main/flake.nix
Steps To Reproduce
nix run github:Atry/nix-regression-sandbox-symbolic-links#print-ls-hello
The output is:
The output is unexpected because when running
ls -l /nix/store/r6lqcxqvm8q574rfba804d5gsxspnrrp-hello
outside of a nix build sandbox, it is a symbolic link, while when buildingls-hello
, it is a regular file.The behavior is not good. For example, the inconsistent file types of
r6lqcxqvm8q574rfba804d5gsxspnrrp-hello
between build time and run time makes the digest computed by nix2container at build time mismatch with the digest at run time, leading to nlewo/nix2container#127.Expected behavior
/nix/store/r6lqcxqvm8q574rfba804d5gsxspnrrp-hello
should be always a symbolic link even in a sandbox, not a regular file.nix-env --version
outputnix-env (Nix) 2.21.0
Additional context
When building
ls-hello
in nix-daemon 2.18.2, it sees a symbolic link as expected. Therefore, this issue is a regression.The nix client version does not matter. I used nix client 2.18.2 with nix-daemon 2.21.0 to reproduce this bug.
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: