Open cottand opened 1 month ago
During builds, I have also seen:
> vendor/github.com/farcaller/gonix/gonix.go:69:10: could not determine kind of name for C.nix_init_plugins
with nixVersions.latest
Yeah, it's unfortunately a moving target. I verified it working with the nix pinned inside the flake of this repo, and you should be safe to use it, but unfortunately there's not much we can do other than to play chase for now.
No worries, I understand this is expected as the C API is not stable yet.
I do suggest you either update the README from "the one available on master" to "the one in Nix 2.18-2.23", so that it is clear that pinning is necessary. Otherwise it reads like this repo is trying to keep track of the moving target, which it understandably is not.
Good point, added the notice in cfc578737eca667c929d294d3a53ae0784f2ccdc.
I building a Go app using gonix, and since Nix 2.24 the build fails. Build logs:
I suspect this is due to breaking changes in the C API in Nix 2.24, see https://github.com/NixOS/nix/commit/b94e1d62182114ab5198fd58869a9af29d54cff5
You can reproduce this by running:
(build here)
Pinning Nix at 2.23 with
buildInputs = [ nixVersions.nix_2_23 ]
fixes this.Otherwise wanted to say thanks for this! Makes using Nix from Go much, much easier :)