-
-
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
Fix #2984: attempt to copy if unlinking source directory fails #3321
Conversation
Hm, do you know why |
I suspect the build creates an |
* fix a nix bug regarding `runCommand` copying a symlink. cf. NixOS/nix#3321 * Upgrade pandoc-include-code * Upgrade pandoc-types * Fix warnings
Another trivial expression that triggers the problem: |
There's quite a few references here and on #2984 that trigger this bug on single-user installation. |
I can confirm this issue on a single-user installation on Ubuntu:
Also including the perms for
but I don't think those matter, given that I'm pretty sure this is a new bug / regression, as I've run this before and it worked. |
…(MacOS) to avoid error described in NixOS/nix#3321 (comment) the problem manifests itself when building streamLayeredImage in single user mode on MacOS using method described in NixOS#91084 (comment) (via a remote builder)
@yorickvP doing a |
BTW https://git.savannah.gnu.org/cgit/guix.git/commit/?id=d445c30ea6f9693454ca96bae9089ba8738a6f78 seems slightly related. |
I ran into this issue again today. I suppose there aren't that many single-user nix users out there. Should I reinstall nix in multi-user mode, or can I hope for this to get fixed? |
I found a workaround for my case: I had written a derivation that copied the outputs of another derivation like this: cp -r ${pkgs.otherDerivation} $out After that, the permissions of My workaround is to do this instead: cp -r ${pkgs.otherDerivation} $out
chmod -R u+w $out then it works also in my single-user install. |
Perhaps #4054 fixed this? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Hopefully fixed by #4312, have no way to reproduce this anymore. |
We were seeing an error on single-user nix mode, where
rename
fails if the right permissions on the source path are missing. Since the paths are removed in sandbox mode anyways, we can usecopyPath
to work around this.Testcase:
nix-build '<nixpkgs>' -A documentation-highlighter --substituters ""