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 documented way to upgrade Nix in nix-portable is to override the nix flake input (see #27). With recent Nix versions (2.34, and likely any post-split-outputs release) this produces a binary that builds fine but fails at runtime:
error: unable to exec '~/.nix-portable/nix/store/q7f0d…-nix-2.34.6/bin/nix-store': Symbolic link loop
#170 is the most obvious trigger — it does exactly this input bump — but the underlying breakage is in the runtime, not the PR. Anyone following the #27 guidance on a modern Nix will hit it.
The runtime extracts the embedded tarball with busybox tar (PATH is locked to \$dir/busybox/bin). busybox tar silently strips the leading / from symlink targets; GNU tar does not:
The shipped 2.20.6 happens to dodge this because all its commands were sibling relative symlinks (`nix-build -> nix`) in one directory. Any Nix version that uses split outputs will trip it.
The documented way to upgrade Nix in nix-portable is to override the
nixflake input (see #27). With recent Nix versions (2.34, and likely any post-split-outputs release) this produces a binary that builds fine but fails at runtime:#170 is the most obvious trigger — it does exactly this input bump — but the underlying breakage is in the runtime, not the PR. Anyone following the #27 guidance on a modern Nix will hit it.
Reproduce
mainalone works;mainwith thenixinput bumped (or #170 merged) fails.Cause
Modern Nix uses split outputs.
bin/nixis an absolute symlink to another store path:The runtime extracts the embedded tarball with busybox tar (PATH is locked to
\$dir/busybox/bin). busybox tar silently strips the leading/from symlink targets; GNU tar does not:After extraction:
Combined with the sibling
nix-store -> nix, the kernel returnsELOOP.The tarball itself is correct — the breakage is at extraction time:
The shipped 2.20.6 happens to dodge this because all its commands were sibling relative symlinks (`nix-build -> nix`) in one directory. Any Nix version that uses split outputs will trip it.
Impact
Fix options
Env
Arch Linux x86_64, kernel 7.0.5-zen.