Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go Workspace guidance #98

Open
dmvinson opened this issue Sep 29, 2022 · 3 comments
Open

Go Workspace guidance #98

dmvinson opened this issue Sep 29, 2022 · 3 comments

Comments

@dmvinson
Copy link

Hi, I know they're a relatively new feature, but how does gomod2nix interact with Go workspaces. Are there any examples available for how to set up workspaces with gomod2nix?

@tomodachi94
Copy link

Someone asked about this in the NixOS Discord.

@CaptainKranch
Copy link

I'm getting this error while trying to build my project. If I use go build it works, if I use nix it doesn't.

error: builder for '/nix/store/192rxacfr8al42fd0zaq74wk8dcqbh0g-bot-0.1.drv' failed with exit code 1;
       last 10 log lines:
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > Building subPackage .
       > go: inconsistent vendoring in /build/bot:
       >     github.com/joho/[email protected]: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
       >
       >     To ignore the vendor directory, use -mod=readonly or -mod=mod.
       >     To sync the vendor directory, run:
       >         go work vendor
       For full logs, run 'nix log /nix/store/192rxacfr8al42fd0zaq74wk8dcqbh0g-bot-0.1.drv'.

@koalazub
Copy link

Was this resolved? And if so, how did you fix it?

I'm running into the same issue as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants