!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

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

Load older messages


SenderMessageTime
25 Mar 2024
@qbit:tapenet.org@qbit:tapenet.org mmm, you might be able to use the FOD modules stuff via GOCACHE 18:55:42
@qbit:tapenet.org@qbit:tapenet.orgnothing's gonna be ideal (at least that I can think of)18:56:09
@qbit:tapenet.org@qbit:tapenet.orgmaybe vendor your deps, then just build the code locally?18:59:18
@qbit:tapenet.org@qbit:tapenet.orgthat'd probably be the cleanest 18:59:24
@stv0ge:matrix.orgstv0g

I think I got it working with:

            pkgs.runCommand "ginkgo" {
              nativeBuildInputs = [
                pkgs.go
              ];
            } ''
              export HOME=$(pwd)
              export GO111MODULE=off
              export GOPATH=/build

              ln -s ${packages.go-babel.goModules} src

              go build -o $out/bin/ginkgo github.com/onsi/ginkgo/v2/ginkgo
            '';
18:59:54
@qbit:tapenet.org@qbit:tapenet.orgi'd make it grep the ginkgo version from go.mod and explicitly build the version 19:00:57
@qbit:tapenet.org@qbit:tapenet.orgjust to be sure19:01:00
@stv0ge:matrix.orgstv0gOkay also a instresting idea.. But that could still be a different version from whats acutally used by my code I assume.. I would need to check the go.sum file to be 100% certain19:07:04
@qbit:tapenet.org@qbit:tapenet.org so like: go build -o $out/bin/gnkgo github.com/onsi/ginkgo/v2/ginkgo@$(grep ginkgo go.mod | awk '{print $NF}' 19:09:32
@qbit:tapenet.org@qbit:tapenet.org * so like: go build -o $out/bin/gnkgo github.com/onsi/ginkgo/v2/ginkgo@$(grep ginkgo go.mod | awk '{print $NF}') 19:09:36
@qbit:tapenet.org@qbit:tapenet.orgbasically19:09:38
@qbit:tapenet.org@qbit:tapenet.org or maybe switch it to go install 19:09:54
@qbit:tapenet.org@qbit:tapenet.orgnot sure19:09:57
@qbit:tapenet.org@qbit:tapenet.org or cd vendor/...etc../ginkgo; go build -o ...... 19:10:22
@qbit:tapenet.org@qbit:tapenet.orgin a subshell after you have vendor'd19:10:27
26 Mar 2024
@katexochen:matrix.orgPaul Meyer (katexochen)
In reply to @stv0ge:matrix.org
Okay also a instresting idea.. But that could still be a different version from whats acutally used by my code I assume.. I would need to check the go.sum file to be 100% certain
go.sum is not an exact lockfile. It can contain multiple versions of your dependencies where only one of them would be used by your code. To get the dependencies after minimal version selection (Go's dependency resolution algorithm) use go list -m all or go mod graph.
06:43:30
@katexochen:matrix.orgPaul Meyer (katexochen)https://github.com/NixOS/nixpkgs/issues/29909612:07:27
@qbit:tapenet.org@qbit:tapenet.orggo.work is one of those things I just can't understand..14:59:09
@qbit:tapenet.org@qbit:tapenet.orglike the difference between update and upgrade14:59:16
@diamondburned:matrix.orgDiamond (it/she)rn it has a Go package using workspace that has GOWORK=off in the Nix file because of this problem 22:11:19
@diamondburned:matrix.orgDiamond (it/she)that was long ago too 22:11:22
@jrick:zettaport.comjricki "get" go.work but i don't get why people are adding it to their repos on their main/master branches (might make sense on a development branch)22:21:09
@jrick:zettaport.comjrickespecially don't get it if they are making release tags containing it22:21:50
27 Mar 2024
@diamondburned:matrix.orgDiamond (it/she) gotk4-examples has one just to keep all submodules in sync w/ the outer one 04:47:45
@diamondburned:matrix.orgDiamond (it/she)there's a github action to guarantee that04:47:49
28 Mar 2024
@verscheures:matrix.orgverscheures joined the room.10:23:21
29 Mar 2024
@sebtm:lodere.esSebTM joined the room.04:22:42
2 Apr 2024
@mkal:matrix.orgmkal joined the room.08:49:25
3 Apr 2024
@maka_77x:matrix.orgmaka_77x joined the room.14:10:25
@jrick:zettaport.comjrick i think tests are broken (possibly by proxyVendor) of any internal package, all the non-internal packages pass internal ones fail with fork/exec /build/go-build245361709/b286/primitives.test: no such file or directory (where primitives is the name of the package) 15:42:24

Show newer messages


Back to Room ListRoom Version: 9