| Message ID | 20250515081635.575459-1-j@lambda.is |
|---|---|
| Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8E63D27BC4A; Thu, 15 May 2025 09:21:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D6CF227BC4B for <patchwork@mira.cbaines.net>; Thu, 15 May 2025 09:21:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1uFTni-000622-HO; Thu, 15 May 2025 04:18:46 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1uFTn4-0004cp-4z for guix-patches@gnu.org; Thu, 15 May 2025 04:18:10 -0400 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 <Debian-debbugs@debbugs.gnu.org>) id 1uFTn2-0002K9-AE for guix-patches@gnu.org; Thu, 15 May 2025 04:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:In-Reply-To:References:Subject; bh=00V7o43Lj18ypYuGLabg9QeehfjCQkXzgp+BU6YOQ7E=; b=d4QwCGkjj2aDxAPaom3eVue4vLXpWKDArv5dvwn1eW2wDDJyv5hnDD+HDxRSAXKUCa2ocEPIhXhdsEnXUzhf0FGzu9QA3CNXpqZUDQ/3BHUtOFWgBuEMBJPLJ+rcs6XQaPT/LkYykq+JSq7qi4B+3iE/w3cJu/9vZz5HmmtQfXSVApGfn5jfcIXFR38lnEp8P9up2sRJcMHcosf7/wv7k+uWuyOnpWl7/AXEaUZ8SXZySO4nxRjQnHIwTezWWwnKfdNzJHBaA4wnKw82/lbdku0nhxq87UcU3AgKgAscnnnZ6drEC5zcisjAljAkJarflwsYnlbqI2N07y1IrNa3uw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uFTn2-0004rc-0f for guix-patches@gnu.org; Thu, 15 May 2025 04:18:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78404] [PATCH 0/4] Go module aware build system References: <20250513094023.348947-1-j@lambda.is> In-Reply-To: <20250513094023.348947-1-j@lambda.is> Resent-From: =?utf-8?q?J=C3=B8rgen?= Kvalsvik <j@lambda.is> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 May 2025 08:18:03 +0000 Resent-Message-ID: <handler.78404.B78404.174729706318633@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78404 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78404@debbugs.gnu.org Cc: =?utf-8?q?J=C3=B8rgen?= Kvalsvik <j@lambda.is> Received: via spool by 78404-submit@debbugs.gnu.org id=B78404.174729706318633 (code B ref 78404); Thu, 15 May 2025 08:18:03 +0000 Received: (at 78404) by debbugs.gnu.org; 15 May 2025 08:17:43 +0000 Received: from localhost ([127.0.0.1]:50796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1uFTmg-0004qS-V0 for submit@debbugs.gnu.org; Thu, 15 May 2025 04:17:43 -0400 Received: from mx.kolabnow.com ([212.103.80.154]:55428) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <j@lambda.is>) id 1uFTlp-0004nc-Vr for 78404@debbugs.gnu.org; Thu, 15 May 2025 04:16:53 -0400 Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id 52E2420B2770 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:43 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass reason="pass (just generated, assumed good)" header.d=lambda.is DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lambda.is; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim2; t=1747297000; x=1749111401; bh=00V7 o43Lj18ypYuGLabg9QeehfjCQkXzgp+BU6YOQ7E=; b=iigwQeL8Jt2HB/eKaVTP hNhFuHbcdznYCajh6Nsq1TNV6PRyUazOgAemFmLWO1u5q06WoGkmlV9CB4evAIjx RAp/9ABP0Z/FpVk+sCW4pmp6ZQLnRc4T/8fZiE5GUaoIAQebFDk8BGaZrf9Z9KVz cJQqODrSJEvRsaLYMt1ADayUyBUuznzNxWVFZQtymvtjp6g7IVSI9KginxZk5P6v yczX60EwuPOPHbYiAh6qlFe55hYkBVv8jN0MKX19k6rhN2xXBABeXaCNrwAyXmD1 NvXBtSFAgXkDMQWY7M1fkol/wKzh7n+5TSOKNqkIe7aWlCdJJxhBqof/2WB5l8rC RQ== X-Virus-Scanned: amavis at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id DGuM5RDszxDK for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:40 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 554D820B2764 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:40 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id 02402323EF18 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:39 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen?= Kvalsvik <j@lambda.is> Date: Thu, 15 May 2025 10:16:31 +0200 Message-Id: <20250515081635.575459-1-j@lambda.is> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
| Series | Go module aware build system | |
Message
Jørgen Kvalsvik
May 15, 2025, 8:16 a.m. UTC
Hi,
Here's a slightly revised patch series which fixes a couple of issues.
`go build` is now invoked in a loop, which allows specifying both patterns and
specific binaries. I needed this for a test case where a project built
internal/echo-plugin for use in tests. There is no real downside to doing this
in a loop as far as I am aware, and install is uses a loop.
I also fixed cross compiling. I did not test it extensively, but cross
compiling using the go-build-system doesn't seem to work well, because it sets
the GOBIN env var, which makes the compiler error out.
From my x86_64-linux system:
~$ file $(guix build go-ulid --target=x86_64-linux-gnu)/bin/ulid
/gnu/store/i258kcbn5g8s97bz26q2rkic7ar5667d-go-ulid-2.1.0/bin/ulid:
ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked,
Go BuildID=_VaiUxKWsiIAlkWq7ODq/4GeipEcLMBNQHuHSA3kh/kxL5wZXJ8V0hvXEoJaF4/hO3bq-ZKZ51CEH4uY7rc, stripped
~$ file $(guix build go-ulid --target=aarch64-linux-gnu)/bin/ulid
/gnu/store/f4yzrwd198xhk4194xrfvqdk5yqz0nac-go-ulid-2.1.0/bin/ulid:
ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked,
Go BuildID=Z_1o0etV-eeUchVexa3A/bUxxm0FmCf6iLc1enI_T/ET4MK0HAx8OyRYBFV73n/j-RubHuPPW1R02OqsNu9, stripped
~$ file $(guix build go-ulid --target=arm-linux-gnueabihf)/bin/ulid
/gnu/store/q6f1l82bl1lpvrciibkiffjfsxn8vz0x-go-ulid-2.1.0/bin/ulid: ELF
32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked,
Go BuildID=NVoNI56N4Ri60CnAR78t/9bQS_Y8jZabn5Y1v80w-/D1_8mW1gwE0Bdtx-heU-/aU1ZqDUxXoi_ToBSeHUL, stripped
I also added two demos, so it would be easier for you to try and to show the
compatibility between packages using the two build systems. One is an
executable, and one where is a library.
~$ guix build go-github-com-burntsushi-toml go-ulid
Jørgen Kvalsvik (4):
guix: Add downloader for go modules from GOPROXY
guix: Add module-aware build system for go
gnu: Build go-ulid with go-module-build system
gnu: Build with go-module-build-system
Makefile.am | 3 +
gnu/packages/golang-xyz.scm | 13 +-
guix/build-system/go-module.scm | 267 +++++++++++++++
guix/build-system/zig.scm | 4 +-
guix/build/go-module-build-system.scm | 473 ++++++++++++++++++++++++++
guix/go-mod-download.scm | 126 +++++++
6 files changed, 877 insertions(+), 9 deletions(-)
create mode 100644 guix/build-system/go-module.scm
create mode 100644 guix/build/go-module-build-system.scm
create mode 100644 guix/go-mod-download.scm