!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

221 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.48 Servers

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


SenderMessageTime
10 Jul 2025
@jrick:zettaport.comjrickerr, i have tried, and failed lol20:51:54
@nazarewk:matrix.orgkdn yeah, CGO_ENABLED=0 go build works fine on NixOS 20:52:15
@diamondburned:matrix.orgdiamond (it/its)yeah for the explicit purpose of cross-building i wouldn't bother with PIE20:55:57
@diamondburned:matrix.orgdiamond (it/its)or i guess just build a Nix OCI container instead20:56:14
@jrick:zettaport.comjrickthe issue with building static pie executables is that you need the target platform's ld.so and essentially embed it into the final binary20:57:05
@jrick:zettaport.comjrickit works if you have the file and can set the appropriate go flags to link with it20:57:45
@jrick:zettaport.comjrickbut makes cross compiling a nightmare20:57:49
@nazarewk:matrix.orgkdnI'd love to, but the team uses goreleaser to build for few-teen targets including different architectures, containers & operating systems20:58:28
@diamondburned:matrix.orgdiamond (it/its)hm ic21:00:36
@nazarewk:matrix.orgkdnI just wanted to adjust my local build to whatever they're running so I can make a proper entrypoint21:01:08
@diamondburned:matrix.orgdiamond (it/its)i mean in terms of building containers for usage, whether it's Nix-built or FROM alpine Dockerfile-built doesn't matter too much21:02:58

Show newer messages


Back to Room ListRoom Version: 9