!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

226 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.46 Servers

Load older messages


SenderMessageTime
13 Nov 2024
@diamondburned:matrix.orgdiamond (it/its) i think the issue is that Nix needs a hash in order to validate the downloaded modules, but the only hash it has is h2 and there's just no support for that 00:33:49
@diamondburned:matrix.orgdiamond (it/its)like it expects a sha25600:33:57
@diamondburned:matrix.orgdiamond (it/its) gomod2nix kinda "solves" this by doing the fetching on its own and re-hashing it in sha256 instead, is what i've noticed 00:34:24
@4noch:matrix.orgElliot CameronI found an issue on Nix (https://github.com/NixOS/nix/issues/8021) and someone quite clever got it "working" here: https://nichi.co/articles/go-module-in-nix.html00:42:51
@diamondburned:matrix.orgdiamond (it/its) this is pretty much what gomod2nix does, yeah 01:07:12
@diamondburned:matrix.orgdiamond (it/its)image.png
Download image.png
01:07:24
@inayet:matrix.orgInayet joined the room.22:15:34
15 Nov 2024
@diamondburned:matrix.orgdiamond (it/its) changed their profile picture.23:01:09
17 Nov 2024
@adis:blad.isadisbladis joined the room.03:23:02
@adis:blad.isadisbladisI'm experimenting with new Go builders for Nix and would like to invite people to take a look https://github.com/adisbladis/gobuild.nix/03:26:19
19 Nov 2024
@diamondburned:matrix.orgdiamond (it/its) changed their profile picture.21:15:52
20 Nov 2024
@inayet:matrix.orgInayet removed their profile picture.00:59:17
26 Nov 2024
@sefodopo:matrix.orgSefodopo joined the room.03:14:23
5 Dec 2024
@tomasajt:matrix.orgToma joined the room.18:43:06
6 Dec 2024
@kaya:catnip.ee@kaya:catnip.ee changed their profile picture.21:16:47
9 Dec 2024
@katexochen:matrix.orgPaul Meyer (katexochen)Any thought on https://github.com/NixOS/nixpkgs/pull/363617? Would love to get some feedback on the idea.15:47:23
11 Dec 2024
@dminca:matrix.org@dminca:matrix.org left the room.14:19:10
17 Dec 2024
@okamis:matrix.org@okamis:matrix.org joined the room.12:03:58
@okamis:matrix.org@okamis:matrix.org Hello, when running "go run ." in nixos I get the error message "go: creating work dir: stat /tmp/nix-shell-59259-0: no such file or directory" how do I make it build for testing? 12:05:17
@katexochen:matrix.orgPaul Meyer (katexochen) Can you paste the output of go env? 12:09:15
@okamis:matrix.org@okamis:matrix.org go: creating work dir: stat /tmp/nix-shell-94646-0: no such file or directory 12:10:43
@okamis:matrix.org@okamis:matrix.orgit works if i create that dir and runs a command on that shell session. Moving to another it wants a new directory12:12:06
@okamis:matrix.org@okamis:matrix.org
> GO111MODULE=''
> GOARCH='amd64'
> GOBIN=''
> GOCACHE='/home/johndoe/.cache/go-build'
> GOENV='/home/johndoe/.config/go/env'
> GOEXE=''
> GOEXPERIMENT=''
> GOFLAGS=''
> GOHOSTARCH='amd64'
> GOHOSTOS='linux'
> GOINSECURE=''
> GOMODCACHE='/home/johndoe/go/pkg/mod'
> GONOPROXY=''
> GONOSUMDB=''
> GOOS='linux'
> GOPATH='/home/johndoe/go'
> GOPRIVATE=''
> GOPROXY='https://proxy.golang.org,direct'
> GOROOT='/nix/store/klw1ipjsqx1np7pkk833x7sad7f3ivv9-go-1.23.2/share/go'
> GOSUMDB='sum.golang.org'
> GOTMPDIR=''
> GOTOOLCHAIN='auto'
> GOTOOLDIR='/nix/store/klw1ipjsqx1np7pkk833x7sad7f3ivv9-go-1.23.2/share/go/pkg/tool/linux_amd64'
> GOVCS=''
> GOVERSION='go1.23.2'
> GODEBUG=''
> GOTELEMETRY='local'
> GOTELEMETRYDIR='/home/johndoe/.config/go/telemetry'
> GCCGO='gccgo'
> GOAMD64='v1'
> AR='ar'
> CC='gcc'
> CXX='g++'
> CGO_ENABLED='1'
> GOMOD='/home/johndoe/repo/firecracker-bazel/go.mod'
> GOWORK=''
> CGO_CFLAGS='-O2 -g'
> CGO_CPPFLAGS=''
> CGO_CXXFLAGS='-O2 -g'
> CGO_FFLAGS='-O2 -g'
> CGO_LDFLAGS='-O2 -g'
> PKG_CONFIG='pkg-config'
> GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/nix-shell-2798-0/go-build1545191164=/tmp/go-build -gno-record-gcc-switches'
12:17:58
@okamis:matrix.org@okamis:matrix.orgI realize I can still create the dir and give you the output hehehe :)12:18:10
@okamis:matrix.org@okamis:matrix.orgnot sure what I did but it started working. Some random stuff i had done was adding attic and substituters, and now I recently added myself as trusted user12:30:45
20 Dec 2024
@frederic:scs.ems.hostFrédéric Christ changed their display name from Frédéric Christ to Frédéric Christ 🎄23.12. - 07.01..13:03:09
21 Dec 2024
@dnrix:matrix.orgdnrHey all, I recently got annoyed by the lack of caching in incremental Go builds in Nix and decided to just fix it to work the way I thought it should (opt-in similar to ccache). I came up with this: https://github.com/dnr/nix-gocacheprog Let me know how it works for you!16:06:16
@katexochen:matrix.orgPaul Meyer (katexochen)
In reply to @dnrix:matrix.org
Hey all, I recently got annoyed by the lack of caching in incremental Go builds in Nix and decided to just fix it to work the way I thought it should (opt-in similar to ccache). I came up with this:
https://github.com/dnr/nix-gocacheprog
Let me know how it works for you!
Nice! We are working on a similar approach with gocacheprog! https://github.com/adisbladis/gobuild.nix/
16:10:41
@katexochen:matrix.orgPaul Meyer (katexochen)Ah, you already saw it. ^^16:11:41
22 Dec 2024
@dnrix:matrix.orgdnrI did.. that's a more ambitious project and a different focus. If I understand correctly, you end up with one derivation per module and the build caching is effectively at module granularity? I wanted to speed up incremental builds/tests so I wanted file-level granularity, more like ccache. Of course it's at the cost of purity, so it's only useful for development, but for that purpose it should be faster.00:54:53

Show newer messages


Back to Room ListRoom Version: 9