[Golang] output ... is not allowed to refer to the following paths

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:

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)

1 Like