unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Frederick Muriithi <fredmanglis@gmail.com>
To: guix-devel@gnu.org
Subject: [go-build-system] How to access properties or keys of a package on the build side?
Date: Tue, 29 Aug 2017 15:54:40 +0300	[thread overview]
Message-ID: <CALjrZwaT_5wgMcq0BUtAZzcp8gT9TJKWkbMftjt3A2jdG3yn9A@mail.gmail.com> (raw)

Maybe the following will help clarify the issue:

The package being built needs the sources of the dependenc(y/ies) to
be available in its GOPATH.

The build system needs to set the GOPATH such that the Go build system
will find the the dependencies and build against them.

I have a repository[1] where I'm currently working on definitions for
IPFS before translating them for mainline guix.
If you checkout commit f7f97edc635381384c3532eb8a2bd92cf10a5ac9 and
look at the code there, you can see that I manually set up GOPATH in
the build of go-log so that it can find go-logging (the modified
version[2]).

Now, when building, you need to lay out the code such that go is able
to find everything, and in my code, I do that manually in the
"setup-go-workspace" phase.

I hope this will help clarify issues a bit.

[1] (https://github.com/fredmanglis/guix-ipfs)
[1] (https://github.com/whyrusleeping/go-logging)

-- 
Frederick M. Muriithi

             reply	other threads:[~2017-08-29 12:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 12:54 Frederick Muriithi [this message]
2017-08-31 12:17 ` [go-build-system] Leo Famulari
2017-09-02 17:00   ` [go-build-system] Leo Famulari
  -- strict thread matches above, loose matches on Subject: below --
2017-08-28 18:51 [go-build-system] How to access properties or keys of a package on the build side? Leo Famulari
2017-08-28 19:15 ` Ricardo Wurmus
2017-08-28 20:32   ` Ricardo Wurmus
2017-08-31  1:01     ` Leo Famulari
2017-09-01 17:15     ` Leo Famulari
2017-09-01 20:58       ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALjrZwaT_5wgMcq0BUtAZzcp8gT9TJKWkbMftjt3A2jdG3yn9A@mail.gmail.com \
    --to=fredmanglis@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).