!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

227 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.47 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
13 Feb 2024
@qbit:tapenet.org@qbit:tapenet.orgit should print the hash for the derivation of the go-modules it generates19:01:38
@anthr76:mozilla.organthr76

It just bailed out

error: buildGoModule: vendorHash is missing
19:02:12
@anthr76:mozilla.organthr76let me try lib.fakeSha25619:02:52
@qbit:tapenet.org@qbit:tapenet.orgoh, make it empty19:03:07
@anthr76:mozilla.organthr76Got it, that did it19:04:23
@anthr76:mozilla.organthr76

So it then failed

       >   fatal: could not read Username for 'https://github.com': terminal prompts disabled
       > Confirm the import path was entered correctly.
       > If this is a private repositor
19:04:43
@qbit:tapenet.org@qbit:tapenet.orgso now put your .netrc and set HOME and see if it works? 19:05:19
@qbit:tapenet.org@qbit:tapenet.orgadding your credentials to a .netrc is not ideal though :D19:05:32
@anthr76:mozilla.organthr76I'm new to nix package but been doing it in fedora land for a while so really what would be best is if I can vendor in the source phase since these repos don't vendor ~/.netrc is present and works 19:05:49
@qbit:tapenet.org@qbit:tapenet.orgrelative to the build? 19:06:11
@qbit:tapenet.org@qbit:tapenet.orgor in your own home dir?19:06:15
@anthr76:mozilla.organthr76In my own home-dir19:06:26
@anthr76:mozilla.organthr76it seems like nix uses access-token to pull the source tarbal but I've tried to pull git https on my shell (which uses netrc) and that does work should it be relative to the build?19:07:13
@qbit:tapenet.org@qbit:tapenet.orgnix builds are isolated from all that (to prevent other dependencies from leaking in)19:07:15
@anthr76:mozilla.organthr76yeah that makes sense19:07:28
@anthr76:mozilla.organthr76i guess I'm looking for the right hole to punch to solve a problem like this19:07:42
@anthr76:mozilla.organthr76 to me having nix run go mod vendor while it has access to my token seems to make the most sense and repeatable for CI 19:08:03
@qbit:tapenet.org@qbit:tapenet.org so, it's basically running go mod vendor and storing that as a separate derivation in the nix store 19:09:11
@qbit:tapenet.org@qbit:tapenet.org the vendorHash is the hash of that derivation 19:09:19
@anthr76:mozilla.organthr76So is it possibly a bug?19:09:37
@qbit:tapenet.org@qbit:tapenet.orgit just doesn't have the ability to pull down the deps since they are private 19:09:38
@anthr76:mozilla.organthr76Because nix can access the private repo in src19:09:47

Show newer messages


Back to Room ListRoom Version: 9