Build package with go 1.22

Hi, I’m trying to add a package to nixpkgs, but its go.mod file requires go 1.22.0.

I tried to use substituteInPlace to change that and match the current go version in nixpkgs, which is 1.21.7.

The app is building fine, but there are problems when running. Some graphical things are not as they should be.

I found that we have go_1_22 in nixpkgs, but after taking a look at the go build-support module.nix and package.nix I can’t find a way to force the buildGoModule to use go 1.22.0.

Is there a way to do that? Or should I use stdenv.mkDerivation in the meantime?

I’d like to try and build the app with the expected go version before opening an issue with the developer of the application.

Use buildGo122Module instead of buildGoModule

1 Like

Very nice, thank you!

Where is this builder located? How could I find this without asking here? Nothing harsh, just trying to increase my nixpkgs knowledge here :slight_smile:

You kinda need to know that it exists to find it

1 Like