On Fri, Dec 16, 2016 at 01:48:57PM +0100, Petter wrote: > On 2016-12-16 02:52, Leo Famulari wrote: > > On Thu, Dec 15, 2016 at 10:06:59PM +0100, Petter wrote: > > > + (arguments > > > + `(#:import-path "github.com/syncthing/syncthing" > > > > What do you think about having the go-build-system try to automatically > > generate the import-path based on the source URL, with the option for > > the packager to set it manually, as shown here? > > > > For many of the packages in this patch (which will eventually be split > > into one package per patch ;) ), that auto-generated import-path > > could be correct. > > > > I think that an (arguments) field indicates that the package's build > > scripts have deviated from the standard. If a Guix build system requires > > all of its packages to do something in (arguments), the build system > > should be extended :) > > This is my goal, and I tried to accomplish this initially, because as > you can see for git checkouts most of the time import-path is url > minus scheme://. But I was unable to retrieve the url in the build > phases. So I did it like this instead, to get something that worked; > also something like #:import-path is required where import-path can't > be derived from the url. > > I would need concrete help with this, that is getting the url and > perhaps what (method) was used.
Does anyone have any advice here? The issue is that the Go build tools typically want the source code to be unpacked in a directory structure based on the URL of the Git repo. We can set it "by hand" in the package definition, which is what the current go-build-system patches do, but it would be great to have a default that worked most of the time.