Nix + Go | 221 Members | |
| Go packaging for and with Nixpkgs. | Be excellent to each other. | 49 Servers |
| Sender | Message | Time |
|---|---|---|
| 15 Aug 2023 | ||
| 14:57:57 | ||
| 19:34:19 | ||
| 17 Aug 2023 | ||
| j-k: | 14:31:49 | |
| 17:43:30 | ||
| 17:43:53 | ||
| 19 Aug 2023 | ||
| /me shakes his fist at stuck unread notifications | 12:38:53 | |
| 20 Aug 2023 | ||
| 12:47:29 | ||
| 23 Aug 2023 | ||
| 16:42:14 | ||
| 24 Aug 2023 | ||
| 12:55:25 | ||
| So with the release of go 1.21, where do people get their go_1_21 toolchain attributes from? Is there a collection of versions like oxalica/rust-overlay but for go? | 13:10:31 | |
| it's in unstable atm | 13:12:55 | |
| Yeah - doesn’t stop my library’s deps from pinning 1.21 in their module though ): | 13:13:27 | |
| (Which then breaks my builds when I need to upgrade for security patches, gotta love transitive deps) | 13:13:54 | |
| Oh wait, i see what you mean! Oops, didn’t find it in the package search … welp | 13:17:23 | |
| 27 Aug 2023 | ||
| 20:05:35 | ||
| 30 Aug 2023 | ||
| 08:49:10 | ||
| Hey, I'm currently trying to build https://github.com/mautrix/discord using go. However, I'm having a missing dependency problem: ``` go: github.com/bwmarrin/discordgo@v0.27.0 requires golang.org/x/crypto@v0.8.0: missing go.sum entry; to add it: go mod download golang.org/x/cryp ``` I couldn't find anything in the documentation (https://nixos.org/manual/nixpkgs/unstable/#sec-language-go) on how I could add this dependency. Does anybody know how I could patch go.sum or something alike? Here is my current package definition: ```nix { lib , buildGoModule , fetchFromGitHub }: buildGoModule rec { pname = "discord"; version = "0.6.1"; src = fetchFromGitHub { owner = "mautrix"; repo = "discord"; rev = "v${version}"; hash = "sha256-rs7wWlQMc79Vls+cqPPo+lRzYAGye4WcKKz+9EXlEBo="; }; vendorSha256 = "sha256-GKUy/HYuPyaUNzfAD7NQWH+tuwcoQhWU4bfxhOpIM0Y="; ldflags = [ "-s" "-w" ]; doCheck = false; proxyVendor = true; meta = with lib; { description = "A Matrix-Discord puppeting bridge"; homepage = "https://github.com/mautrix/discord"; changelog = "https://github.com/mautrix/discord/blob/${src.rev}/CHANGELOG.md"; license = licenses.agpl3Only; maintainers = with maintainers; [ ]; }; } ``` | 08:55:47 | |
| this should probably work clone the repo > checkout the tag you want > go mod tidy > create patch file > add patch file to patches list (see other packages for examples | 09:00:36 | |
| Thanks, I'll try it. | 09:01:48 | |
| remember when you add the patch you need to invalidate the vendorSha256 otherwise it might keep using the already fetched copy | 09:03:54 | |
I tried checking out cloning https://github.com/mautrix/discord and running go mod tidy, but it didn't produce any different result. The same with discordgo...However, I did notice that the definition for crypto in the discordgo repo seems a bit odd: golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b. Could this have something to do with the error I'm getting? | 09:07:41 | |
* I tried checking out cloning https://github.com/mautrix/discord and running go mod tidy, but it didn't produce any different result. The same with discordgo...However, I did notice that the definition for crypto in the discordgo repo seems a bit odd: golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b. Could this have something to do with the error I'm getting? | 09:07:55 | |
* I tried checking out cloning https://github.com/mautrix/discord and running go mod tidy, but it didn't produce any diff in git. The same with discordgo...However, I did notice that the definition for crypto in the discordgo repo seems a bit odd: golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b. Could this have something to do with the error I'm getting? | 09:08:17 | |
* I tried cloning https://github.com/mautrix/discord and running go mod tidy, but it didn't produce any diff in git. The same with discordgo...However, I did notice that the definition for crypto in the discordgo repo seems a bit odd: golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b. Could this have something to do with the error I'm getting? | 09:08:28 | |
| yeah. that's pre go modules by the looks of it | 09:10:02 | |
|
https://pkg.go.dev/golang.org/x/crypto#section-readme | 09:10:39 | |
| oh it does have x/crypto v0.12.0 in the go.mod so it shouldn't cause any issue there | 09:11:27 | |
| maybe check which copy of go you're using for build and tidy | 09:12:36 | |
| It's go v1.20.7 in both cases. | 09:13:57 | |
| Mhh, I guess I'll just try another version. | 09:15:28 | |