typeclasses / haskell-phrasebook

The Haskell Phrasebook: a quick intro to Haskell via small annotated example programs
https://typeclasses.com/phrasebook
210 stars 22 forks source link

[nix-shell] moving build output from the sandbox to the Nix store: Permission denied #38

Closed lambiase closed 4 years ago

lambiase commented 4 years ago

When running

nix-shell tools/shell.nix

I get (on a Debian and on an Ubuntu machine on which I have freshly installed nix):

...
building '/nix/store/d7wmn4239kg32jv0i4y600nxdl2a0v3v-alex-plan-to-nix-pkgs.drv'...
error: moving build output '/nix/store/cx2gfhixdiv6kxdlijj7ifn29mvqy6sl-alex-plan-to-nix-pkgs' from the sandbox to the Nix store: Permission denied

Is anyone else having the same issue?

chris-martin commented 4 years ago

I haven't seen this before, but I suspect something is wrong with your Nix installation. Is Nix not working at all, or is it just this repository?

lambiase commented 4 years ago

nix-shell in general seems to work fine (however I don't have too much experience with the nix package manager).

I can consistently reproduce the issue as follows:

It looks like it's a nix bug: https://github.com/NixOS/nix/issues/2984

which is also mentioned here: https://github.com/input-output-hk/haskell.nix/issues/466

@chris-martin : are you using a different OS or an older version of nix?

lambiase commented 4 years ago

After following the "Multi User Installation" instructions (https://nixos.org/nix/manual/#sect-multi-user-installation) I don't get the permission denied error anymore, confirming that it's a nix bug affecting single user installations only.