| 21 May 2024 |
| Frédéric Christ changed their display name from Frédéric Christ 🌴 17.05. to Frédéric Christ. | 06:41:53 |
| 22 May 2024 |
| @bullet-bending-koala:matrix.org joined the room. | 03:26:46 |
@bullet-bending-koala:matrix.org | Hey! I'm new to the nix build game and trying to get over an error I'm having when attempting to build a go project. I've already posted on the discord with no response(just impatient), but thought to post here as well:
I just started running into an issue referenced here: https://github.com/nix-community/gomod2nix/issues/98
I'm on go 1.22 and not sure how to resolve this issue during the buildPhase. Here is a snippet of how I'm running my phases:
preBuild = ''
go work sync
go vet server/
go vet infra/
'';
buildPhase = ''
go build -v -o $out/bin/bin_result .
chmod +x $out/bin/bin_result
'';
checkPhase = ''
go test -v server/
go test -v infra/
'';
I've been trying different ways of getting it build such as vendoring prior and generating and having no real success. Here's the error:
Running phase: buildPhase go: inconsistent vendoring in /private/tmp/nix-build-my-project-0.1.0.drv-1/v94xsm9rfafqgqhmf975928jbhfwyz4b-source: github.com/jmoiron/sqlx@v1.4.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt github.com/pulumi/pulumi-azure-native-sdk/resources/v2@v2.42.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
I've already synced, deleted cache, re-vendored and added the -mod=vendor flags when running commands. This is the first time trying out a build step using nix, so any help would be really appreciated.
There are a few things which I just might not be cognisant of when it comes to behaviour - such as what happens during the preBuild and buildPhase for it error out like that and that even though I'm synced, it still prompts this error
| 03:32:41 |
| NixOS Moderation Botchanged room power levels. | 15:25:59 |
| NixOS Moderation Botchanged room power levels. | 15:28:13 |
| @drupol:matrix.org joined the room. | 16:18:39 |
@drupol:matrix.org | How can I have the binary godotenv available through nativeBuildInputs ? | 16:19:04 |
@drupol:matrix.org | Context: https://github.com/NixOS/nixpkgs/pull/313713 | 16:19:57 |
@drupol:matrix.org | Never mind ;) got it working I think | 16:56:15 |
| 23 May 2024 |
jrick | what is the buildGoModule way of making a race-enabled build? | 17:08:42 |
jrick | i think adding to go build flags would work.. but that seems deprecated and will be removed later | 17:09:03 |
jrick | oh, i guess ldflags = [ '-race' ] | 17:27:57 |
jrick | even though it's not a a linker flag, ugh | 17:28:03 |
Paul Meyer (katexochen) | You can use GOFLAGS for that. | 17:34:05 |
Paul Meyer (katexochen) | * jrick: You can use GOFLAGS for that. | 17:34:20 |
jrick | thanks, that sounds more reasonable | 17:38:11 |
| diamond (it/its) changed their profile picture. | 17:43:37 |
| 24 May 2024 |
| diamond (it/its) changed their profile picture. | 01:49:06 |
| 26 May 2024 |
@faust403:matrix.org |  Download image.png | 12:58:19 |
@faust403:matrix.org | Hey guys, when trying to build go package getting this error | 12:58:19 |
@faust403:matrix.org | As far as I understand I need to input a certain package hidapi, but it doesn't work | 12:58:49 |
diamond (it/its) | what's your go build command and your CC? | 20:48:21 |
| 28 May 2024 |
| diamond (it/its) changed their profile picture. | 20:20:34 |
| 29 May 2024 |
| @nscnt:matrix.org joined the room. | 15:11:51 |
| 30 May 2024 |
| Olaf Krasicki Freund joined the room. | 18:52:14 |
| 31 May 2024 |
| diamond (it/its) changed their profile picture. | 09:32:02 |
| 2 Jun 2024 |
| @bumperboat:matrix.org changed their display name from bumperboat (UTC+7) to bumperboat (UTC+1). | 05:29:04 |
| 4 Jun 2024 |
hexa | https://groups.google.com/g/golang-announce/c/XbxouI9gY7k | 20:13:37 |
| 5 Jun 2024 |
Paul Meyer (katexochen) |
- re-post from contributors channel, where there weren't any reactions *
Should we deprecate buildGoPackage for 24.11? Go modules, released 6y ago, are now widely adopted in the ecosystem. Most remaining (~30) packages in nixpkgs using buildGoPackage weren't touched in years. I think most of these can be easily migrated to modules by adding the mod file downstream (or should be removed anyway as their upstream is unmaintained).
| 07:44:42 |
Paul Meyer (katexochen) | * * re-post from contributors channel, where there weren't any reactions *
Should we deprecate buildGoPackage for 24.11? Go modules, released 6y ago, are now widely adopted in the ecosystem. Most remaining (~30) packages in nixpkgs using buildGoPackage weren't touched in years. I think most of these can be easily migrated to modules by adding the mod file downstream (or should be removed anyway as their upstream is unmaintained).
| 07:44:59 |