From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id lB6gCDcBKWEU1gAAgWs5BA (envelope-from ) for ; Fri, 27 Aug 2021 17:13:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SBF7AzcBKWE/cwAAB5/wlQ (envelope-from ) for ; Fri, 27 Aug 2021 15:13:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 567927C6A for ; Fri, 27 Aug 2021 17:13:58 +0200 (CEST) Received: from localhost ([::1]:38104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJdYL-0006ga-C7 for larch@yhetil.org; Fri, 27 Aug 2021 11:13:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJdWU-0005FP-EL for guix-patches@gnu.org; Fri, 27 Aug 2021 11:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mJdWT-0006hh-TS for guix-patches@gnu.org; Fri, 27 Aug 2021 11:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mJdWT-000709-N7 for guix-patches@gnu.org; Fri, 27 Aug 2021 11:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50227] [PATCH 0/3] go-build-system and GOPATH improvements Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Aug 2021 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50227 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50227@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163007706226828 (code B ref -1); Fri, 27 Aug 2021 15:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 Aug 2021 15:11:02 +0000 Received: from localhost ([127.0.0.1]:52694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJdVW-0006yZ-5O for submit@debbugs.gnu.org; Fri, 27 Aug 2021 11:11:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:38654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mJdVS-0006yL-8m for submit@debbugs.gnu.org; Fri, 27 Aug 2021 11:11:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJdVS-0004af-2i for guix-patches@gnu.org; Fri, 27 Aug 2021 11:10:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50652) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mJdVR-00065I-DU for guix-patches@gnu.org; Fri, 27 Aug 2021 11:10:57 -0400 Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:38000 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJdVO-0001fb-Tn for guix-patches@gnu.org; Fri, 27 Aug 2021 11:10:57 -0400 From: Marius Bakke Date: Fri, 27 Aug 2021 17:10:52 +0200 Message-Id: <20210827151052.12611-1-marius@gnu.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630077238; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Fy9DK+4t78Dt2FM5Vsisq+M1D0UmZYD9PTh8fTkq6Pc=; b=q7KEA5LsKVA42jacHgl3uVmqHVF7XkgmySxv6XqBNUwbSNxyyH76muA4QUSuZaqbS282al 3qq58zglCBkk8wz35IE5NSeLChfl6IKMjOzHhNoJQD7Q39QScjX0GXuNugCzf2O3PxVgqc FgWVbPtM1u8ubQTvh912oZRXv7O9v9qy/oyVHhlaorqXY5x6yexzu3evOr2o9gSt+jK/iB tTDNOJOaJxwXPWUswFKHp7Iu0PO5/vO1vpXOZeVit7UW/9WSeHdIO9GrjHh8Lamld9zK2u gyRz+SolEvS3gNNypQ1eFn0bDslzIEM80iJN5BKtERowNwDk19Mi5kDwHVwRNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630077238; a=rsa-sha256; cv=none; b=MAchTMjY9emKoqO/qXk/AV0AD1v5SdXReRR2j68V9oJTtM0IH6GYQJH6ER1oCj82NEblf3 yuV1CP3cqx63yV38NoZKfe7vp4l37cEsNrMfSyVGNNLDdlR6Dk8ngwNWke0FzboCzOGxpf eCZldq423RgCth9hNPtOXAHwwUF2R7jd8ZqgvNmC8J748wP/QYdUF7Kj3cl8KOftck1mzB mlfFkngLPhXy7UVWymyVAJHWiIwUbhkRIwc27PVRzi+mW967tox3hd/LdcsKX/DuprEutE y5cRbaPaINM2joItlKZaBh3PTg3bVIgPHvdJsfpgU2vkVAKpAnRQM6Mze+NbuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 567927C6A X-Spam-Score: 2.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: sgd3vMopqbO2 These patches adjust the Go build system to use Guix's regular native-search-paths mechanism instead of ad-hoc GOPATH trickery. The context is that I needed to hack on a Go package, and was somewhat surprised that my usual workflow of "guix environment PKG" did not work. It still does not work "out of the box", but these patches bring it a step further. Now "all" that is needed is to: $ cd ~/src/go-foo $ guix environment go-example-com-foo $ MYGOPATH="$HOME/tmp/go" $ NAMESPACE="$MYGOPATH/src/example.com/foo" $ mkdir -p $(dirname $NAMESPACE) $ ln -s $PWD $NAMESPACE # or git worktree add $NAMESPACE $ export GOPATH="$MYGOPATH:$GOPATH" $ go build # no 'go get' necessary! I don't know how feasible it is to avoid making a local directory and symlinking the project to the expected namespace. Still a complete Go newbie, but this approach feels more natural and idiomatic Guix-wise. Marius Bakke (3): build-system/go: Use a native-search-path for GOPATH. gnu: hyperledger-fabric: Do not assume GOPATH contains a single entry. gnu: go-gotest-tools-assert: Provide internal inputs with the source. gnu/packages/golang.scm | 49 +++++++++++++++++++++++----------- gnu/packages/hyperledger.scm | 6 ++++- guix/build/go-build-system.scm | 37 +++---------------------- 3 files changed, 43 insertions(+), 49 deletions(-) -- 2.31.1