From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Muriithi 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 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmg2v-0007Rv-U6 for guix-devel@gnu.org; Tue, 29 Aug 2017 08:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmg2q-00083C-Ed for guix-devel@gnu.org; Tue, 29 Aug 2017 08:55:10 -0400 Received: from mail-lf0-x22b.google.com ([2a00:1450:4010:c07::22b]:37018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmg2q-00082D-6V for guix-devel@gnu.org; Tue, 29 Aug 2017 08:55:04 -0400 Received: by mail-lf0-x22b.google.com with SMTP id y128so7338542lfd.4 for ; Tue, 29 Aug 2017 05:55:02 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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