cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
3.56k stars 259 forks source link

ability to specifiy a go language version #1179

Open john-fwss opened 2 weeks ago

john-fwss commented 2 weeks ago

CONTEXT

Other languages have the ability to specify a specific version of the language to be used in the devenv.nix file.

Example: languages.python.version = "3.11.3"; works great, love it.

Go does not, and it is frustrating (and not best practice according to support channel in discord) to try and pin specific commit hashes of older versions.

Go has the package language option (which is great that its there) here: https://devenv.sh/reference/options/#languagesgopackage

but no examples of what a properly formatted input looks like. seems to be happy with pkgs.go_1_22 and pkgs.go_1_21 (after a lot of trial and error) but no others.

REQUEST

make golang compatible with specific pinned language versions, just like many other languages already supported are.

domenkozar commented 1 day ago

Someone needs to create nixpkgs-go with all the versions packaged :)