| 19 Mar 2024 |
K900 | Presumably go generate started failing on non-existent files | 16:58:06 |
K900 | ~
❯ nix run nixpkgs#go_1_21 -- generate this-file-does-not-exist.go
~
❯ nix run nixpkgs#go_1_22 -- generate this-file-does-not-exist.go
no required module provides package this-file-does-not-exist.go: go.mod file not found in current directory or any parent directory; see 'go help modules'
| 17:03:02 |
K900 | It's not documented anywhere | 17:03:09 |
K900 | Is it a bug? Is it a feature? Whomst the fuck knows | 17:03:16 |
Paul Meyer (katexochen) | In reply to @k900:0upti.me Is it a bug? Is it a feature? Whomst the fuck knows https://github.com/golang/go/commit/ee788dbae0fc8e074fc66fc76f0597200b443950 | 17:09:48 |
K900 | Cool | 17:10:23 |
K900 | I guess we know then | 17:10:26 |
Paul Meyer (katexochen) | could have been a nice change if documented... | 17:12:11 |
| @bumperboat:matrix.org set a profile picture. | 22:20:53 |
| 21 Mar 2024 |
| NixOS Moderation Botchanged room power levels. | 18:03:26 |
| Brad joined the room. | 18:30:59 |
| @grahamc:nixos.org left the room. | 20:10:25 |
| 22 Mar 2024 |
| @mrene:matrix.org joined the room. | 00:44:32 |
| @bumperboat:matrix.org changed their display name from bumperboat to bumperboat (UTC+8 when). | 13:27:55 |
| @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 joined the room. | 00:37:08 |
| @jgero:matrix.org joined the room. | 12:04:00 |
| 24 Mar 2024 |
| hoskellisiera joined the room. | 01:48:44 |
| hoskellisiera changed their profile picture. | 19:48:50 |
| 25 Mar 2024 |
| stv0g joined the room. | 18:15:27 |
stv0g | Hi 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 | Stop testing Go like javascript | 18:25:40 |
@qbit:tapenet.org | stv0g: hi! I assume you mean "go install" vs "nix install" ? :D | 18:51:38 |
stv0g | Oh yeah, sorry | 18:51:49 |
stv0g | 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 | so you have ginkgo in nixpkgs | 18:52:30 |
@qbit:tapenet.org | no need to go install it | 18:52:35 |
stv0g | The issue is that the version in nixpkgs might not match the version in my go.mod | 18:52:55 |
stv0g | Same is true for other Go tools like protoc-gen-go | 18:53:19 |
@qbit:tapenet.org | seems you would have the same problem with that approach | 18:54:06 |