!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

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

Load older messages


SenderMessageTime
19 Mar 2024
@k900:0upti.meK900Cool17:10:23
@k900:0upti.meK900I guess we know then17:10:26
@katexochen:matrix.orgkatexochencould have been a nice change if documented...17:12:11
@bumperboat:matrix.org@bumperboat:matrix.org set a profile picture.22:20:53
21 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:03:26
@bradwheel:matrix.orgBrad joined the room.18:30:59
@grahamc:nixos.org@grahamc:nixos.org left the room.20:10:25
22 Mar 2024
@mrene:matrix.org@mrene:matrix.org joined the room.00:44:32
@bumperboat:matrix.org@bumperboat:matrix.org changed their display name from bumperboat to bumperboat (UTC+8 when).13:27:55
@bumperboat:matrix.org@bumperboat:matrix.org changed their display name from bumperboat (UTC+8 when) to bumperboat (UTC+8).15:01:26
23 Mar 2024
@federicodschonborn:matrix.org@federicodschonborn:matrix.org joined the room.00:37:08
@jgero:matrix.org@jgero:matrix.org joined the room.12:04:00
24 Mar 2024
@hoskellisiera:matrix.orghoskellisiera joined the room.01:48:44
@hoskellisiera:matrix.orghoskellisiera changed their profile picture.19:48:50
25 Mar 2024
@stv0ge:matrix.orgstv0g joined the room.18:15:27
@stv0ge:matrix.orgstv0gHi all, I am trying to install Ginkgo into my devShell with the version locked in go.sum. In non-Nix environments, I achieve this by simply running 'nix install github.com/path/to/package'. But for nix I am a bit stuck..18:17:16
@curid:matrix.org@curid:matrix.orgStop testing Go like javascript18:25:40
@qbit:tapenet.org@qbit:tapenet.org stv0g: hi! I assume you mean "go install" vs "nix install" ? :D 18:51:38
@stv0ge:matrix.orgstv0gOh yeah, sorry18:51:49
@stv0ge:matrix.orgstv0g

This is my current attempt:

            pkgs.runCommand "ginkgo" {
              nativeBuildInputs = [
                pkgs.go
              ];
            } ''
              export HOME=$(pwd)
              export GO111MODULE=off
              export GOPATH=$out
              mkdir -p $GOPATH

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

              go install -v -n -a github.com/onsi/ginkgo/v2/ginkgo

              # mkdir -p $out/bin
              # ls -l /build/bin/
              # mv /build/bin/ginkgo $out/bin
            '';
18:52:15
@qbit:tapenet.org@qbit:tapenet.orgso you have ginkgo in nixpkgs18:52:30
@qbit:tapenet.org@qbit:tapenet.org no need to go install it 18:52:35
@stv0ge:matrix.orgstv0gThe issue is that the version in nixpkgs might not match the version in my go.mod18:52:55
@stv0ge:matrix.orgstv0gSame is true for other Go tools like protoc-gen-go18:53:19
@qbit:tapenet.org@qbit:tapenet.orgseems you would have the same problem with that approach 18:54:06
@stv0ge:matrix.orgstv0gI've tried to reuse the vendor'ed modules by buildGoModule and then run "go install" with pkgs.runCommand18:54:30
@qbit:tapenet.org@qbit:tapenet.orgi guess it will bump the go.mod file?18:54:30
@stv0ge:matrix.orgstv0gI guess by using the vendored modules, I am actually ignoring the go.mod already because its only used to build the goModules derivation18:55:21
@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

Show newer messages


Back to Room ListRoom Version: 9