!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

229 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.52 Servers

Load older messages


SenderMessageTime
20 Aug 2025
@sandro:supersandro.deSandro 🐧I just do go vendoring everywhere and then fetch via fetchFromGitHub12:03:25
@nila:derg.socialNila The Dragon We have an internal repo (no vendor folder) and that in turn has other private repos it uses as a dependency. 12:17:46
@sandro:supersandro.deSandro 🐧turn on vendoring. that is faster for nix and getting it to work in CI12:18:09
@diamondburned:matrix.orgDiamond (it/she)is this just for local dev? direnv + impure + fetchgit might suffice18:00:55
@diamondburned:matrix.orgDiamond (it/she)a while back i made this thread that might be useful https://discourse.nixos.org/t/git-buildgomodule-private-repositories/516718:02:40
@diamondburned:matrix.orgDiamond (it/she)vendoring could be a solution too but i hate actually vendoring stuff as it makes checking out + code reviewing a pain18:03:09
@pyrox:pyrox.devdish [Fox/It/She] joined the room.18:31:30
@pyrox:pyrox.devdish [Fox/It/She]https://github.com/nixos/nixpkgs/pull/43534518:32:41
@pyrox:pyrox.devdish [Fox/It/She](i'm aware this is broken on darwin, i think doing c compiler -> 1.4 -> 1.17 would be better and maybe even faster than gccgo anyways19:19:14
@pyrox:pyrox.devdish [Fox/It/She]* (i'm aware this is broken on darwin, i think doing c compiler -> 1.4 -> 1.17 would be better and maybe even faster than gccgo anyways, so I'm gonna work on that)19:19:22
@pyrox:pyrox.devdish [Fox/It/She]i am in mental anguish why cant we have nice things(full source bootstraps)19:21:24
@pyrox:pyrox.devdish [Fox/It/She]screenshot-2025-08-20_15-20-10.png
Download screenshot-2025-08-20_15-20-10.png
19:21:24
21 Aug 2025
@nazarewk:matrix.orgnazarewkHow do I package up a Go app from local sources?10:07:36
@nazarewk:matrix.orgnazarewk* How do I package up a Go app from local sources? I think I had some trouble with hashes previously10:07:52
@j-k:matrix.orgj-k should just be usual buildGoModule definition with src = ./some/local/path; and normal correct handling of vendorHash
(unless your local src has symlinks outside of ./)
10:40:36
@j-k:matrix.orgj-k Make sure when you do your first build you provide an invalid vendorHash. Then it'll tell you the actual value and you can put that in.
If you're still getting mismatches across platforms e.g. linux and darwin/mac you might want to restart that whole process but with proxyVendor = true; included`
10:41:53
@nazarewk:matrix.orgnazarewk j-k: how about vendorHash = null;? I've seen it suggested somewhere 11:56:40
@katexochen:matrix.orgPaul Meyer (katexochen) You can do that. Either way you'll have a manual step to do after dependencies in go.mod changed, either running go mod vendor again or updating the vendorHash. 12:12:16
@j-k:matrix.orgj-k yeah vendorHash = null; is for if youre vendoring your own dependencies already. E.g. lazygit has this dir https://github.com/jesseduffield/lazygit/tree/master/vendor 12:20:39
@j-k:matrix.orgj-k * yeah vendorHash = null; is for if youre vendoring your own dependencies already. E.g. lazygit has this dir https://github.com/jesseduffield/lazygit/tree/master/vendor so nothing else needs to be fetched 12:21:06
@pyrox:pyrox.devdish [Fox/It/She] updated this to keep binary bootstraps for darwin/loong64 14:01:38
@pyrox:pyrox.devdish [Fox/It/She]tests seem to be borked because ofborg is screwed? like the nix daemon just dies with no other output14:55:35
@pyrox:pyrox.devdish [Fox/It/She]wild14:55:37
22 Aug 2025
@pyrox:pyrox.devdish [Fox/It/She]I really dont like how so many platforms can't bootstrap from source, but its inevitable I suppose. Just a bit frustrating that the only thing that bootstraps properly is Linux on non-loong64. No darwin or freebsd builds, which just kinda sucks because those are fairly notable platforms. Hopefully gccgo can support darwin in the future or something else comes along that can help us with easier bootstrapping00:50:46
@opna2608:matrix.orgPuna don't know if this is interesting to ppl here, but i made a pr to allow usage of gccgo for buildGoModule: https://github.com/NixOS/nixpkgs/pull/430137 12:44:16
@opna2608:matrix.orgPuna (mainly to enable very basic go things on powerpc64, where normal go is unusable IMO) 12:46:07
@nazarewk:matrix.orgnazarewkok, so I was not seeing any errors because I don't have any dependencies yet then16:06:23
@j-k:matrix.orgj-kDo you have any error messages or issues/tickets related to the other platform build failures?16:37:36
@pyrox:pyrox.devdish [Fox/It/She] there's a bug report for gccgo about darwin not being supported https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46986 17:06:24
@pyrox:pyrox.devdish [Fox/It/She]and I got a report from someone in my bootstrap PR that freebsd got broken, and also notes that loongarch64 isn't supported for early enough versions to bootstrap17:07:01

Show newer messages


Back to Room ListRoom Version: 9