[Question] combine and copying bins
https://github.com/nix-community/fenix/blob/ba9a36ef175efed4ef3a3de485131da921439301/lib/combine.nix#L9
Why is this cp invocation needed? If I'm understanding it correctly, it's basically converting the binary links to files, but why is this needed?
You are understanding it correctly
Some of the binaries finds the libraries and sysroot by doing something like readlinking itself, iirc rustc and clippy are two of them
Maybe hardlinking could be better? i havent hardlinked anything before, is there any drawbacks?
Some of the binaries finds the libraries and sysroot by doing something like
readlinking itself, iirc rustc and clippy are two of them
I'm confused. Why does it break if we symlink if it's readlinking, then?
Maybe hardlinking could be better? i havent hardlinked anything before, is there any drawbacks?
There shouldn't be, no.
I'm confused. Why does it break if we symlink if it's
readlinking, then?
They try to find the libraries under that path, so rustc wouldn't be able to find rust-std if they are just symlinked into the same package
I gave hardlinking a try and it gave me ln: failed to create hard link '/nix/store/...' => '/nix/store/...': Invalid cross-device link
I don't think it's possible to hardlink across different derivations right now
might be related: https://github.com/NixOS/nix/issues/1272