From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KJefBW8LmGFtgQEAgWs5BA (envelope-from ) for ; Fri, 19 Nov 2021 21:39:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id hkYTAW8LmGEVCwAAbx9fmQ (envelope-from ) for ; Fri, 19 Nov 2021 20:39:11 +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 9CA8EA45C for ; Fri, 19 Nov 2021 21:39:10 +0100 (CET) Received: from localhost ([::1]:47790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moAf7-0007Y0-7A for larch@yhetil.org; Fri, 19 Nov 2021 15:39:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moAf0-0007Xr-6E for guix-patches@gnu.org; Fri, 19 Nov 2021 15:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moAez-0000T4-Sz for guix-patches@gnu.org; Fri, 19 Nov 2021 15:39:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moAez-0006fq-O6 for guix-patches@gnu.org; Fri, 19 Nov 2021 15:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51981] [PATCH 1/1] build: Fix cross compilation for go-build-system References: <87bl2f6gti.fsf@rekahsoft.ca> In-Reply-To: <87bl2f6gti.fsf@rekahsoft.ca> Resent-From: "Collin J. Doering" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Nov 2021 20:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51981 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 51981@debbugs.gnu.org Received: via spool by 51981-submit@debbugs.gnu.org id=B51981.163735428825577 (code B ref 51981); Fri, 19 Nov 2021 20:39:01 +0000 Received: (at 51981) by debbugs.gnu.org; 19 Nov 2021 20:38:08 +0000 Received: from localhost ([127.0.0.1]:40625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moAe7-0006eT-Ky for submit@debbugs.gnu.org; Fri, 19 Nov 2021 15:38:07 -0500 Received: from mail-qv1-f42.google.com ([209.85.219.42]:38759) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moAe6-0006e0-Oe for 51981@debbugs.gnu.org; Fri, 19 Nov 2021 15:38:07 -0500 Received: by mail-qv1-f42.google.com with SMTP id a24so7942096qvb.5 for <51981@debbugs.gnu.org>; Fri, 19 Nov 2021 12:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca; s=google; h=user-agent:from:to:subject:date:message-id:mime-version; bh=lpVfeW0sCsA8Kz2dra1X63GLrzo+ZGZs7Crh8ktfZDQ=; b=jMb7nuZ+ymebVhdneh95/QFvFNjUVi9Ii6PIyMcb69TTBsfMTbfE+fljFDzt5iVIY+ ikCtC3Udtl9B5Yx/ePgQsUngLfowdWSJnZMOdQ5K3D6kusEYLGB5I2IXZp2De69odFrk fBlxMUMUVlzQ3cEplkj7BnaAaKX6s3Y01ua44SlWHbnrOZqQehIkPQ8IDMmzay/eVfgV 8EDf9yQvezacCOMH3qcM8APHfnTbhK6GTfrs+b308K6bTmn/GaLYXs0wEKcMBZcOH9yd YYapiqM9z34bn/n11ubW9FWAgUQWcA5G31YlcSFb2HR1Ht04zp3ECRT4pc/EaIDdYup7 ouKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version; bh=lpVfeW0sCsA8Kz2dra1X63GLrzo+ZGZs7Crh8ktfZDQ=; b=ee1kwt/aiFtOFJjkmZdof7VDzVfUEjAs0KE7uUdYR6Kjis8U6pqgaMjXVpQTMfqXBB VVxy1PcUCgS2zvM+VJNHrYSYcE0X7tXr8zYpgOOLSqLABPGADExIcJUstT4WzOaUf4PI CGItV4icJ6hrORx5+3N4fjUuJcSQVGsUAvI14ozXRx7m/s24+tK+nhncPTQkfwSRn5mP oqEmEc70I529EyZrHJu8sc1Xl/0EEwvhkLpUaDbPTD3fwhoAJlhHpdUIpJ7NUw42m1pL i9QXK1nPxd/MEvBl9I0fJIdZX6qU8J8mO4ytYJlLAyaGAkzeEk3ZiVSeTuJeiSZuEOpF u2Yw== X-Gm-Message-State: AOAM533DTi6h+1iV7M8GFlSuF976DBTs0jj2EVKTczCpQYtD3Jwzr2Oo Ny26xRkLKedfBGP6PNCUJuHcJ9MM+UdyoA== X-Google-Smtp-Source: ABdhPJwCpEc3w9BHyW77Kf9ppZq2Gbmh6TY3xmUMjw45N38iEdMVHVdL6RarQGiw2eE2qk6ThURcXA== X-Received: by 2002:ad4:5aa1:: with SMTP id u1mr78360148qvg.44.1637354280819; Fri, 19 Nov 2021 12:38:00 -0800 (PST) Received: from rekahsoft-work (cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com. [99.255.210.233]) by smtp.gmail.com with ESMTPSA id o5sm368676qkl.50.2021.11.19.12.38.00 for <51981@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Nov 2021 12:38:00 -0800 (PST) User-agent: mu4e 1.6.10; emacs 27.2 From: "Collin J. Doering" Date: Fri, 19 Nov 2021 15:37:34 -0500 Message-ID: <877dd36fvc.fsf@rekahsoft.ca> MIME-Version: 1.0 Content-Type: text/plain 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 X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637354350; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=lpVfeW0sCsA8Kz2dra1X63GLrzo+ZGZs7Crh8ktfZDQ=; b=SBgAlOxHhXktRB5Z5o/5yw5f0FfCWuOBVDs874rcwbdA7fgVCt3ueJvVZAjL+Cn0hA99Ui mUlJkhi31Bo0ywiDZJGI7yT5vqXgMwUovF1/ofs01+8iu3Hyc/N/PuPpquqc4q/NyQP0tJ JjcCyThMOBGvbeizXlFBLZV7y5QFaBgfZN52bSGO6EADjYqYjGfO6QrMdCK8YTC51Fu/i5 qE6fIJsYUR6Q3ykp0N3Bpa6YliYKF9bddemTnEnNY20C5iiHK2A8t5I4v1nfGc69DQDvtN SLo7WF7o7K9azJ6KCo3tinNxYnXroNF7Dphfx8QNg0JXJL1XGrv/lT2cYHxF8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637354350; a=rsa-sha256; cv=none; b=YDkSQL890ElZLv7EnvDoIhK4KO4LkiC36mnXq2xeEvQ6DJl2LF9aU88DouPlySdTncWeXt TgSzhnDxvLEok5NukKFZf6siHXS8PBp851TxNJjctgyqGt7a+nbXH7fzS4ftCrZJhFfo8f nc29RuUQafdTL/b6FMmuRX8vqbhHvHYP42mtcLLAe72ronMHTiFDa1XBuMgi0FlrNBMayZ pWIpg5drwE7gdLUE+vtqaYMONFUMOmKHH2XvJ4HklJxQpyqhk7Ehna93veCZc2ps1BOkvz eVcDJ/QXDaTAR19RfjheuC28w1JTccE8w8mYwwhKxZcNT4nFvqSGrPlYSceGSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rekahsoft.ca header.s=google header.b=jMb7nuZ+; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rekahsoft.ca header.s=google header.b=jMb7nuZ+; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9CA8EA45C X-Spam-Score: -1.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: g6wtd/8xCRBd --- guix/build/go-build-system.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index 4768ee8562..f36e98f47a 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -148,7 +148,6 @@ (define* (setup-go-environment #:key inputs outputs goos goarch #:allow-other-ke ;; currently support modules, so turn modules off to continue using the old ;; GOPATH behavior. (setenv "GO111MODULE" "off") - (setenv "GOBIN" (string-append (assoc-ref outputs "out") "/bin")) ;; Make sure we're building for the correct architecture and OS targets ;; that Guix targets. @@ -234,14 +233,19 @@ (define (go-inputs inputs) (_ #f)) inputs)))) -(define* (build #:key import-path build-flags #:allow-other-keys) +(define* (build #:key outputs import-path build-flags #:allow-other-keys) "Build the package named by IMPORT-PATH." (with-throw-handler #t (lambda _ - (apply invoke "go" "install" + (apply invoke "go" "build" "-v" ; print the name of packages as they are compiled "-x" ; print each command as it is invoked + ;; Set the output path for the build + (string-append "-o=" + (assoc-ref outputs "out") "/bin/" + (package-name->name+version + (strip-store-file-name (assoc-ref outputs "out")))) ;; Respectively, strip the symbol table and debug ;; information, and the DWARF symbol table. "-ldflags=-s -w" -- 2.33.1 -- Collin J. Doering http://rekahsoft.ca http://blog.rekahsoft.ca http://git.rekahsoft.ca