nixie
nixie copied to clipboard
Handling the `result` symbolic link
While in a Nix shell, all commands are run within the sandbox/fakedir context, meaning links to the Nix store are all resolved. However, if the user were to call nix build, the result is a dangling symbolic link to the user store.
In this situation, would it be better to:
- ... leave the symlink as-is, and instruct users to enter a Nix shell to use it?
- ... copy the artifacts/rewrite the link to the user's store, which would not address dynamic libraries?
- A user store rewrite also breaks the migration scenario where a user installs Nix system-wide between uses of our wrapper script
- A full copy on a non-reflink filesystem would cause increased storage consumption
- ... copy the artifacts but smart, by detecting any executables and replacing them with a special wrapper?
- In my opinion this would be the most user-friendly option, but potentially the most fragile
- The space duplication problem remains, as above
There's no right or wrong answer, so suggestions are welcome!