Whenever I try to build a docker image with nix (not nixos), I recently get stuck with this error:
building '/nix/store/ymfhh17bm1n9hsvhgl1ky78qb18d2d1b-registry.quantumops.rocks-ae-dir-web-server-base.json.drv'... building '/nix/store/280hk9ql82q2n87p8n5j9rhhkn5bg8wf-registry.quantumops.rocks-ae-dir-web-server-bulk-layers.drv'... building '/nix/store/d6wq607893l6s4v9c6x57mwdfwc1yj5m-closure.drv'... building '/nix/store/1wlhdi3518fyp92l7w9rnvwqq1wrllr6-registry.quantumops.rocks-ae-dir-web-server-customisation-layer.drv'... error: moving build output '/nix/store/frbhvc8srsm4jgpah8lfww2pcgw2a5zw-registry.quantumops.rocks-ae-dir-web-server-customisation-layer' from the sandbox to the Nix store: Permission denied
I’m using a pretty recent nixpkgs (12 days ago):
I also use the → it is not respected:
nix packaged pinned by that version.
PATH=/home/blaggacao/.nix-profile/bin:/home/blaggacao/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/nix/store/57pilyyns1gvdyw7rxjkpkca1ya667sf-aedir.k8s-env/bin[...] ll /nix/store/57pilyyns1gvdyw7rxjkpkca1ya667sf-aedir.k8s-env/bin/nix nix ⇒ /nix/store/jjmar1q8k7l25mdmnhpxs9nwaa38rpnk-nix-2.3.7/bin/nix # BUT $ which nix /home/blaggacao/.nix-profile/bin/nix # nasty, but crafting the following doesn't seem to fix it $ which nix /nix/store/57pilyyns1gvdyw7rxjkpkca1ya667sf-aedir.k8s-env/bin/nix $ nix --version nix (Nix) 2.3.7
Bug filed for this occasional discovery during debugging here: https://github.com/NixOS/nix/issues/4152
I tried with both:
sandbox = true and
# sandbox = true to no success.
Can anybody help me to fix this? (hopefully upstream)
Things I’ve researched:
- https://github.com/NixOS/nix/issues/2984 (I think I understand - but is there a work around?)
- https://github.com/NixOS/nix/pull/3321 (is this relevant?)
- https://github.com/NixOS/nix/pull/4054 (is this a fix?)
- https://github.com/typeclasses/haskell-phrasebook/issues/38 (related?)
- https://github.com/NixOS/nix/pull/3036 (or is this it?)
- Nix-shell and output path
$ nix --version nix (Nix) 3.0pre19700101_11882d7
works again. That probably means some of those referenced issues can be closed. I’d really like to hint there, but I only understand 10-20% of what’s going on.