From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id WM+MNy2JomXcEgAAkFu2QA (envelope-from ) for ; Sat, 13 Jan 2024 13:59:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id mOT5My2JomVqpAAA62LTzQ (envelope-from ) for ; Sat, 13 Jan 2024 13:59:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JSkL0kXz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1705150765; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=wN7tMhPg1MZbzuUTKaKkgpAe3Vv82+sFWbdqoxHhp9M=; b=MfCpnyDGoaopgRwhEN9YMUWwSjgx/8Pyy7Pdfd93QLKoObOkmWxywt2Lpc5m3+O0tN4EF5 9/2qfirWTO5NpMux4A7pshtoDilc9zEkDmvJbPS0fiyLc2+BMwPfj51CntAT2DRLGAeEXM c/eWZnEGR8DzcKext0bCGozTzs806mgU4GfLjZp4J013pwZwwKK00T1MiA8zY33ibMNxiQ QZWUDYHaoyDgxfFogpqW89jS0FetXvy62HHkoeEbqbjziXkm8ujCOwNem8wBGAuhFJrbCK PK+qK8qnVp8euOA1VNX3bmEjqVzuo8uyH9LgXqq+c9LYYpvmcQcQnP+APR/TQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JSkL0kXz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705150765; a=rsa-sha256; cv=none; b=hlP0O7KVZ44t7ermEBy+W9EX1K6Kn7doCqnHB4jI0QsjUAhRBIoTZF4z1Gx4tRhfBqn/nV L/WSMMEzS9qXX96CG/3EpZHUipYuJdlBjKGmzT8JqNONlUX6fV9FRJWmrUY3XUqVApRmpj SxBeAcIigp096/Wx9Sq6lbT4Uuy8o731fStK3djKOKON6LCHIAPsYZnA+APNUw/uai2sm1 adETIuy0mO/p87RAm2wV2QlMBydKSIBB5ZWSbUblV/+xRjLCCRewzcVlQi4RTx5P05wjCe 12hMjCPtk4SGLUST2XbRKPsyJZZGHd/nTwd9cgsckX/ACg/aq/2v/vIK7z1GOA== 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 486B733E6D for ; Sat, 13 Jan 2024 13:59:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOdbN-0001zG-9D; Sat, 13 Jan 2024 07:59:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOdbL-0001yr-PI for guix-patches@gnu.org; Sat, 13 Jan 2024 07:59:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rOdbL-0003Ha-Fr for guix-patches@gnu.org; Sat, 13 Jan 2024 07:59:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOdbK-0006xR-05 for guix-patches@gnu.org; Sat, 13 Jan 2024 07:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68423] [PATCH] guix: go-build-system: use trimpath go flag Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Jan 2024 12:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68423 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ekaitz Zarraga Cc: 68423@debbugs.gnu.org, Picnoir , Katherine Cox-Buday Received: via spool by 68423-submit@debbugs.gnu.org id=B68423.170515073526724 (code B ref 68423); Sat, 13 Jan 2024 12:59:01 +0000 Received: (at 68423) by debbugs.gnu.org; 13 Jan 2024 12:58:55 +0000 Received: from localhost ([127.0.0.1]:38701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOdbC-0006wx-9v for submit@debbugs.gnu.org; Sat, 13 Jan 2024 07:58:55 -0500 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:50561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOdb9-0006wh-Ko for 68423@debbugs.gnu.org; Sat, 13 Jan 2024 07:58:53 -0500 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50e7ddd999bso8109889e87.1 for <68423@debbugs.gnu.org>; Sat, 13 Jan 2024 04:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705150727; x=1705755527; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wN7tMhPg1MZbzuUTKaKkgpAe3Vv82+sFWbdqoxHhp9M=; b=JSkL0kXzGxd8EcrSE2tdYR2IjvXOhI7mDiL3bWGcr4ecG0RfX4HLFyusBshlVZjPFI ajCb7sJUa16KHjCckoKOB7xQptD5CMvexUxyP7WslJ+YsibIhsgxZsuqwZ4WR5xdYAkQ wqzzkliaLhC04Roft8x1cHBN3NiL33CmhPb+KGBsFf3K4OQvCxagpzL8QKlhGy2TodY2 ULn//4OdDIWniFe0rwsdsaJ0ctxaP/0mVPtcEhM5dYzZfe5WcMoQH97wDeFb1WGK/NgI j4o5dUwzRiRL3WPinLjQBGdnhZ+BxrEsfoNWwXaqnhKMjKE4ZrsGE+pG/GsCihiR+8l3 KldQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705150727; x=1705755527; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wN7tMhPg1MZbzuUTKaKkgpAe3Vv82+sFWbdqoxHhp9M=; b=u1gTQy068K3+6uaMQxWxSXSg+MKefnn/TQmbMk8VoXYSJmv+25gqlTWdJgKdmyYWyk iadugsrFtIizyiob+qFDTL+9daRBCimqawFmza11pKbFkpEOhmfjtRxhQkn5kO4vQFXq HBLF/GCmUTlqjtUmxfmcgtDC7sncBeBzr5Ln65NS3e95SElWzkmEIZrHLy+hWYWScXV3 qA15xiCvvqeHAxtvujMEjkPYL+Hq7H4XGd2UDR3hL9PvEGRo38VrupxOhksrs1MSsC4S SJrtC0ytzbjQrdv8sYtNTOtJsERx78TEN5lXqrEf6x7CMxO12hAgEMwuqkE1jWT89IAW HLww== X-Gm-Message-State: AOJu0Yz/gecnrsMS581PbxzJ3TNbdYzaxoxYcdJSjtTaIDFBmS++phO8 KG/ZEptm7nqhO6goIgMHz1z9gD2Gl1mrFcoWDBw= X-Google-Smtp-Source: AGHT+IFFV1/NsctKc5sSG5jk0uuWkc21Vlzk4pvCWmInSF/fBDiOryg5M4sAj4AbIf9iFkw4wD30Xkpm91x0lJ5dcfI= X-Received: by 2002:ac2:548e:0:b0:50e:59cf:e548 with SMTP id t14-20020ac2548e000000b0050e59cfe548mr1129685lfk.94.1705150726603; Sat, 13 Jan 2024 04:58:46 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sharlatan Hellseher Date: Sat, 13 Jan 2024 12:58:34 +0000 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005907cc060ed357b1" 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.80 X-Spam-Score: 3.80 X-Migadu-Queue-Id: 486B733E6D X-Migadu-Scanner: mx12.migadu.com X-TUID: dvaKkVK+Heoz --0000000000005907cc060ed357b1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ekaitz, Thanks for the patch. I think this is more suitable for core updates brunch as triggers rebuild the world for all golang packages as far as I see. Regards, Oleg On Sat, 13 Jan 2024, 11:48 Ekaitz Zarraga, wrote: > Go 1.13 introduced[1] a new "trimpath" flag in charge of removing the > references to the go toolchain in the produced ELFs. We used to remove > these references using the "remove-go-reference" function. This function > was executed after go install. By using this new trimpath flag, we don't > have to remove any store path from the ELFs produced by go install. > > We're not using any go older than 1.13 anymore, it's safe to remove > these functions. > > [1] https://go.dev/doc/go1.13 > > -trimpath > remove all file system paths from the resulting executable. > Instead of absolute file system paths, the recorded file names > will begin either a module path@version (when using modules), > or a plain import path (when using the standard library, or > GOPATH). > > * guix/build/go-build-system.scm (build): Add -trimpath > (%standard-phases): Remove remove-go-references. > (remove-go-references): Remove. > > Change-Id: Idcae366d226da5ce095693f81fd33133fd1d70d6 > Co-authored-by: Picnoir > --- > guix/build/go-build-system.scm | 59 +++------------------------------- > 1 file changed, 4 insertions(+), 55 deletions(-) > > diff --git a/guix/build/go-build-system.scm > b/guix/build/go-build-system.scm > index 7f25e05d0d..70ddcd07cd 100644 > --- a/guix/build/go-build-system.scm > +++ b/guix/build/go-build-system.scm > @@ -6,6 +6,8 @@ > ;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka > ;;; Copyright =C2=A9 2020, 2021 Efraim Flashner > ;;; Copyright =C2=A9 2021 Sarah Morgensen > +;;; Copyright =C2=A9 2024 Ekaitz Zarraga > +;;; Copyright =C2=A9 2024 Picnoir > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -90,7 +92,6 @@ (define-module (guix build go-build-system) > ;; * Use Go modules [4] > ;; * Re-use compiled packages [5] > ;; * Avoid the go-inputs hack > -;; * Stop needing remove-go-references (-trimpath ? ) > ;; * Remove module packages, only offering the full Git repos? This is > ;; more idiomatic, I think, because Go downloads Git repos, not modules. > ;; What are the trade-offs? > @@ -265,6 +266,7 @@ (define* (build #:key import-path build-flags > #:allow-other-keys) > ;; Respectively, strip the symbol table and debug > ;; information, and the DWARF symbol table. > "-ldflags=3D-s -w" > + "-trimpath" > `(,@build-flags ,import-path))) > (lambda (key . args) > (display (string-append "Building '" import-path "' failed.\n" > @@ -304,58 +306,6 @@ (define* (install-license-files #:key unpack-path > unpack-path)) > (apply (assoc-ref gnu:%standard-phases 'install-license-files) args)= )) > > -(define* (remove-store-reference file file-name > - #:optional (store (%store-directory))) > - "Remove from FILE occurrences of FILE-NAME in STORE; return #t when > FILE-NAME > -is encountered in FILE, #f otherwise. This implementation reads FILE one > byte at > -a time, which is slow. Instead, we should use the Boyer-Moore string > search > -algorithm; there is an example in (guix build grafts)." > - (define pattern > - (string-take file-name > - (+ 34 (string-length (%store-directory))))) > - > - (with-fluids ((%default-port-encoding #f)) > - (with-atomic-file-replacement file > - (lambda (in out) > - ;; We cannot use `regexp-exec' here because it cannot deal with > - ;; strings containing NUL characters. > - (format #t "removing references to `~a' from `~a'...~%" file-nam= e > file) > - (setvbuf in 'block 65536) > - (setvbuf out 'block 65536) > - (fold-port-matches (lambda (match result) > - (put-bytevector out (string->utf8 store)) > - (put-u8 out (char->integer #\/)) > - (put-bytevector out > - (string->utf8 > - > "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-")) > - #t) > - #f > - pattern > - in > - (lambda (char result) > - (put-u8 out (char->integer char)) > - result)))))) > - > -(define* (remove-go-references #:key allow-go-reference? > - inputs outputs #:allow-other-keys) > - "Remove any references to the Go compiler from the compiled Go > executable > -files in OUTPUTS." > -;; We remove this spurious reference to save bandwidth when installing G= o > -;; executables. It would be better to not embed the reference in the fir= st > -;; place, but I'm not sure how to do that. The subject was discussed at: > -;; > - (if allow-go-reference? > - #t > - (let ((go (assoc-ref inputs "go")) > - (bin "/bin")) > - (for-each (lambda (output) > - (when (file-exists? (string-append (cdr output) > - bin)) > - (for-each (lambda (file) > - (remove-store-reference file go)) > - (find-files (string-append (cdr output) > bin))))) > - outputs) > - #t))) > > (define %standard-phases > (modify-phases gnu:%standard-phases > @@ -367,8 +317,7 @@ (define %standard-phases > (replace 'build build) > (replace 'check check) > (replace 'install install) > - (replace 'install-license-files install-license-files) > - (add-after 'install 'remove-go-references remove-go-references))) > + (replace 'install-license-files install-license-files))) > > (define* (go-build #:key inputs (phases %standard-phases) > #:allow-other-keys #:rest args) > > base-commit: c0b303aaa3d6154acbe054120d11467eb98e6d33 > -- > 2.41.0 > > > > --0000000000005907cc060ed357b1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ekaitz,

T= hanks for the patch.

I t= hink this is more suitable for core updates brunch as triggers rebuild the = world for all golang packages as far as I see.

<= /div>
Regards,
Oleg

=
On Sat, 13= Jan 2024, 11:48 Ekaitz Zarraga, <ekaitz@elenq.tech> wrote:
=
Go 1.13 introduced[1] a new "trimpath&q= uot; flag in charge of removing the
references to the go toolchain in the produced ELFs. We used to remove
these references using the "remove-go-reference" function. This f= unction
was executed after go install. By using this new trimpath flag, we don'= t
have to remove any store path from the ELFs produced by go install.

We're not using any go older than 1.13 anymore, it's safe to remove=
these functions.

[1] https://go.dev/doc/go1.13

=C2=A0 =C2=A0 -trimpath
=C2=A0 =C2=A0 =C2=A0 =C2=A0 remove all file system paths from the resulting= executable.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Instead of absolute file system paths, the reco= rded file names
=C2=A0 =C2=A0 =C2=A0 =C2=A0 will begin either a module path@version (when u= sing modules),
=C2=A0 =C2=A0 =C2=A0 =C2=A0 or a plain import path (when using the standard= library, or
=C2=A0 =C2=A0 =C2=A0 =C2=A0 GOPATH).

* guix/build/go-build-system.scm (build): Add -trimpath
(%standard-phases): Remove remove-go-references.
(remove-go-references): Remove.

Change-Id: Idcae366d226da5ce095693f81fd33133fd1d70d6
Co-authored-by: Picnoir <picnoir@alternativebit.fr>
---
=C2=A0guix/build/go-build-system.scm | 59 +++------------------------------= -
=C2=A01 file changed, 4 insertions(+), 55 deletions(-)

diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.sc= m
index 7f25e05d0d..70ddcd07cd 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -6,6 +6,8 @@
=C2=A0;;; Copyright =C2=A9 2020 Jakub K=C4=85dzio=C5=82ka <kuba@kadziolk= a.net>
=C2=A0;;; Copyright =C2=A9 2020, 2021 Efraim Flashner <efraim@flashne= r.co.il>
=C2=A0;;; Copyright =C2=A9 2021 Sarah Morgensen <iskarian@mgsn.dev>= ;
+;;; Copyright =C2=A9 2024 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright =C2=A9 2024 Picnoir <picnoir@alternativebit.fr= >
=C2=A0;;;
=C2=A0;;; This file is part of GNU Guix.
=C2=A0;;;
@@ -90,7 +92,6 @@ (define-module (guix build go-build-system)
=C2=A0;; * Use Go modules [4]
=C2=A0;; * Re-use compiled packages [5]
=C2=A0;; * Avoid the go-inputs hack
-;; * Stop needing remove-go-references (-trimpath ? )
=C2=A0;; * Remove module packages, only offering the full Git repos? This i= s
=C2=A0;; more idiomatic, I think, because Go downloads Git repos, not modul= es.
=C2=A0;; What are the trade-offs?
@@ -265,6 +266,7 @@ (define* (build #:key import-path build-flags #:allow-o= ther-keys)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Respectively, str= ip the symbol table and debug
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; information, and = the DWARF symbol table.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"-ldflags=3D-s = -w"
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "-trimpath"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0`(,@build-flags ,imp= ort-path)))
=C2=A0 =C2=A0 =C2=A0(lambda (key . args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0(display (string-append "Building '&quo= t; import-path "' failed.\n"
@@ -304,58 +306,6 @@ (define* (install-license-files #:key unpack-path
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unpack-path))
=C2=A0 =C2=A0 =C2=A0(apply (assoc-ref gnu:%standard-phases 'install-lic= ense-files) args)))

-(define* (remove-store-reference file file-name
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #:optional (store (%store-dir= ectory)))
-=C2=A0 "Remove from FILE occurrences of FILE-NAME in STORE; return #t= when FILE-NAME
-is encountered in FILE, #f otherwise. This implementation reads FILE one b= yte at
-a time, which is slow. Instead, we should use the Boyer-Moore string searc= h
-algorithm; there is an example in (guix build grafts)."
-=C2=A0 (define pattern
-=C2=A0 =C2=A0 (string-take file-name
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(+ 34 (strin= g-length (%store-directory)))))
-
-=C2=A0 (with-fluids ((%default-port-encoding #f))
-=C2=A0 =C2=A0 (with-atomic-file-replacement file
-=C2=A0 =C2=A0 =C2=A0 (lambda (in out)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; We cannot use `regexp-exec' here becaus= e it cannot deal with
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; strings containing NUL characters.
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (format #t "removing references to `~a= 9; from `~a'...~%" file-name file)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setvbuf in 'block 65536)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setvbuf out 'block 65536)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 (fold-port-matches (lambda (match result)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put-bytevector out (string->utf8 store))=
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put-u8 out (char->integer #\/))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put-bytevector out
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0(string->utf8
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-"))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0#t)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0#f
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0pattern
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0in
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0(lambda (char result)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(put-u8 out (char->integer char))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0result))))))
-
-(define* (remove-go-references #:key allow-go-reference?
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0inputs outputs #:allow-other-keys) -=C2=A0 "Remove any references to the Go compiler from the compiled Go= executable
-files in OUTPUTS."
-;; We remove this spurious reference to save bandwidth when installing Go<= br> -;; executables. It would be better to not embed the reference in the first=
-;; place, but I'm not sure how to do that. The subject was discussed a= t:
-;; <https://lists.= gnu.org/archive/html/guix-devel/2017-10/msg00207.html>
-=C2=A0 (if allow-go-reference?
-=C2=A0 =C2=A0 #t
-=C2=A0 =C2=A0 (let ((go (assoc-ref inputs "go"))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bin "/bin"))
-=C2=A0 =C2=A0 =C2=A0 (for-each (lambda (output)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (file= -exists? (string-append (cdr output)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bin))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (for= -each (lambda (file)
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (remove-store-reference file go)) -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (find-files (string-append (cdr output) bin= )))))
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 outputs)
-=C2=A0 =C2=A0 =C2=A0 #t)))

=C2=A0(define %standard-phases
=C2=A0 =C2=A0(modify-phases gnu:%standard-phases
@@ -367,8 +317,7 @@ (define %standard-phases
=C2=A0 =C2=A0 =C2=A0(replace 'build build)
=C2=A0 =C2=A0 =C2=A0(replace 'check check)
=C2=A0 =C2=A0 =C2=A0(replace 'install install)
-=C2=A0 =C2=A0 (replace 'install-license-files install-license-files) -=C2=A0 =C2=A0 (add-after 'install 'remove-go-references remove-go-= references)))
+=C2=A0 =C2=A0 (replace 'install-license-files install-license-files)))=

=C2=A0(define* (go-build #:key inputs (phases %standard-phases)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0#:allow-other-keys #:rest args)

base-commit: c0b303aaa3d6154acbe054120d11467eb98e6d33
--
2.41.0



--0000000000005907cc060ed357b1--