On Fri, Jan 8, 2021, at 02:01, Timmy Douglas wrote: > > I recently installed guix for the first time and I wanted to try to > package my first program. The one I decided to try is written in go and > uses go.mod (https://github.com/coredns/coredns/blob/master/go.mod) for > modules. Running `go build` would normally download those if they don't > exist. > > I took a look at a couple of other packages, and it looks like the right > way to do it would be to package the individual modules as seen in > guix/gnu/packages/golang.scm. Has anyone tried automating this sort of > thing? There are almost 40 dependencies...
Thanks for working on this! It's true, Go programs usually have a dependency graph that is uncomfortably large — although not impossibly large like Rust. There is a work-in-progress implementation of a Go package importer that I believe should make it easier: https://issues.guix.gnu.org/issue/44178 You could try it out and, if it works for you, send those patches, and give feedback on the importer as well :) As for the versioning, the Guix package tree can include multiple versions of a package. Search for "inherit" in the crates-io.scm package module for some examples. We would like to improve how this works, again for Go and Rust, because it's such a common requirement.