Hello,
I’m trying to build a Golang project with Nix, but I’m getting the following error following a nix-build
:
output '/nix/store/1gh331jddxbc1lgsr36yz5gm5v48rbah-hello-there' is not allowed to refer to the following paths:
/nix/store/k6p0as061as1jyawchlv79hgwx0b77xs-go-1.9.4
error: build of '/nix/store/fb4rs1k0j9zpb8hf576nc76m0570jgxi-hello-there.drv' failed
This is especially odd because I had just run nix-build
successfully (it produced a binary that worked). But now I can’t get it to work, and I’m not sure what I did to cause this to happen.
Some other background:
- I had recently installed single-user Nix as root, but realized that’s a bad idea. I uninstalled Nix & then installed it in multi-user mode.
- It’s installed on an
Ubuntu 16.04.4 x64
DigitalOcean droplet
- It’s installed on an
- Here is the
default.nix
I am using to build this go project: https://gist.githubusercontent.com/ramirez7/bebd125995a587aceb1e688e846c3434/raw/4680e455c24bba0dbff048123f441c3a79ba6571/default.nix - I ran
nix-collect-garbage -d
and the problem persists
EDIT:
I updated to nixpkgs 18.09-beta from 18.03 and now it builds. Maybe a bug was fixed? I’ll update again if the issue comes back (since it was did work on 18.03 before it broke as well)