-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Derivation: src with symbolic link behaves strange #1232
Comments
The following minimal derivation realization shows on a multi-user nix store that the symbolic link is copied and not the directory it self:
The cd command can not be performed, because /nix/store/98ndpdd41ccp3373bc3sxs74hm9d8hzb-symlink is a symbolic link to the created temp directory which is exclusively owned by the calling user. |
This issue is annoys me a lot. |
As a workaround for #51025 and NixOS/nix#1232 This reverts commit 5f894a6.
I am using this trick in a few private packages as well. Rails and Java apps. At build time, it's too late to resolve symlinks. The build sandbox is not supposed to be able to go outside. |
This issue is still valid for nix version 2.2.2 . |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-to-stop-nix-from-unpacking-a-directory/6866/4 |
I marked this as stale due to inactivity. → More info |
This could partially alleviated by documenting the behavior. |
I defined a derivation where src is a path to a symbolic link which itself points to a directory.
I tried to use a symbolic link to keep the Nix expression untouched, while I am able to change src path with normal command line tools.
By using this mechanism you get following behavior:
Resolving the symbolic link with Nix functions is not possible (as far I understand).
The text was updated successfully, but these errors were encountered: