From patchwork Mon May 2 11:18:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 39050 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 19EE427BBEA; Mon, 2 May 2022 12:27:23 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 6CBD427BBE9 for ; Mon, 2 May 2022 12:27:22 +0100 (BST) Received: from localhost ([::1]:35320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlUD3-0003zL-EB for patchwork@mira.cbaines.net; Mon, 02 May 2022 07:27:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU63-0001gb-2F for guix-patches@gnu.org; Mon, 02 May 2022 07:20:21 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU5z-0005Zp-02 for guix-patches@gnu.org; Mon, 02 May 2022 07:20:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlU5y-0005jR-R9 for guix-patches@gnu.org; Mon, 02 May 2022 07:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 1/4] platform: Introduce new platforms. References: <20220502111715.13500-1-othacehe@gnu.org> In-Reply-To: <20220502111715.13500-1-othacehe@gnu.org> Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 11:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55220@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 55220-submit@debbugs.gnu.org id=B55220.165149036521942 (code B ref 55220); Mon, 02 May 2022 11:20:02 +0000 Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:25 +0000 Received: from localhost ([127.0.0.1]:35010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5M-0005hp-K4 for submit@debbugs.gnu.org; Mon, 02 May 2022 07:19:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5L-0005hZ-38 for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU5F-0005Vk-Qs for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=atjkmY7MuFCpgH0Drkvy3M+CpV/ku/LfXbH4jGEP9f4=; b=fW325wdVSQlqlv uFTPo2gWWt1S/0QT/+wOtGLA0OdRt8ui4JR/IIAjJxKFFNrlAv3chL8zWdvu8reJsqh5POziojF4r 41XfQWkQOcDQ+btfiisWfEzEXhx8h0dnHQMBt8hQJzKMUU5spLRn2RkiiI7KrsqpTE2/d4Ho9yr6a Mpk3OLJItoMJv1TIkc7LgAu4dWPEeErOnW3IZr5nJMJqjlFEE49GPK1tpbpTq9kfudqx7tNq1QvaF IDRfSrcleewEXsD+IlKBc4nOiIO6m2mFmO5TR6OrgAyzgFMZilnZcTDrFcQkTNKdCss0ycKMtSyqR fRDaXB+uhNLXp45LCQOw==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU55-0004xO-MF; Mon, 02 May 2022 07:19:10 -0400 From: Mathieu Othacehe Date: Mon, 2 May 2022 13:18:56 +0200 Message-Id: <20220502111859.13605-1-othacehe@gnu.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/platforms/intel.scm: New file. * gnu/platforms/mips.scm: Ditto. * gnu/platforms/powerpc.scm: Ditto. * gnu/platforms/riscv.scm: Ditto. * gnu/local.mk (GNU_SYSTEM_MODULES): Add them. Signed-off-by: Mathieu Othacehe --- gnu/local.mk | 4 ++++ gnu/platforms/intel.scm | 48 +++++++++++++++++++++++++++++++++++++++ gnu/platforms/mips.scm | 29 +++++++++++++++++++++++ gnu/platforms/powerpc.scm | 36 +++++++++++++++++++++++++++++ gnu/platforms/riscv.scm | 29 +++++++++++++++++++++++ 5 files changed, 146 insertions(+) create mode 100644 gnu/platforms/intel.scm create mode 100644 gnu/platforms/mips.scm create mode 100644 gnu/platforms/powerpc.scm create mode 100644 gnu/platforms/riscv.scm diff --git a/gnu/local.mk b/gnu/local.mk index ad7b0a1480..6dcb143647 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -632,6 +632,10 @@ GNU_SYSTEM_MODULES = \ \ %D%/platforms/arm.scm \ %D%/platforms/hurd.scm \ + %D%/platforms/intel.scm \ + %D%/platforms/mips.scm \ + %D%/platforms/powerpc.scm \ + %D%/platforms/riscv.scm \ \ %D%/services.scm \ %D%/services/admin.scm \ diff --git a/gnu/platforms/intel.scm b/gnu/platforms/intel.scm new file mode 100644 index 0000000000..fb1be04cfc --- /dev/null +++ b/gnu/platforms/intel.scm @@ -0,0 +1,48 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu platforms intel) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (intel32-linux + intel64-linux + intel32-mingw + intel64-mingw)) + +(define intel32-linux + (platform + (target "i686-linux-gnu") + (system "i686-linux") + (linux-architecture "x86"))) + +(define intel64-linux + (platform + (target "x86_64-linux-gnu") + (system "x86_64-linux") + (linux-architecture "x86"))) + +(define intel32-mingw + (platform + (target "i686-w64-mingw32") + (system #f))) + +(define intel64-mingw + (platform + (target "x86_64-w64-mingw32") + (system #f))) diff --git a/gnu/platforms/mips.scm b/gnu/platforms/mips.scm new file mode 100644 index 0000000000..84a492699d --- /dev/null +++ b/gnu/platforms/mips.scm @@ -0,0 +1,29 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu platforms mips) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (mips64-linux)) + +(define mips64-linux + (platform + (target "mips64el-linux-gnu") + (system "mips64el-linux") + (linux-architecture "mips"))) diff --git a/gnu/platforms/powerpc.scm b/gnu/platforms/powerpc.scm new file mode 100644 index 0000000000..8fadfe88de --- /dev/null +++ b/gnu/platforms/powerpc.scm @@ -0,0 +1,36 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu platforms powerpc) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (powerpc-linux + powerpc64le-linux)) + +(define powerpc-linux + (platform + (target "powerpc-linux-gnu") + (system "powerpc-linux") + (linux-architecture "powerpc"))) + +(define powerpc64le-linux + (platform + (target "powerpc64le-linux-gnu") + (system "powerpc64le-linux") + (linux-architecture "powerpc"))) diff --git a/gnu/platforms/riscv.scm b/gnu/platforms/riscv.scm new file mode 100644 index 0000000000..29a34402a2 --- /dev/null +++ b/gnu/platforms/riscv.scm @@ -0,0 +1,29 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu platforms riscv) + #:use-module (gnu platform) + #:use-module (gnu packages linux) + #:use-module (guix records) + #:export (riscv64-linux)) + +(define riscv64-linux + (platform + (target "riscv64-linux-gnu") + (system "riscv64-linux") + (linux-architecture "riscv"))) From patchwork Mon May 2 11:18:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 39053 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DA25B27BBEA; Mon, 2 May 2022 12:29:11 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 911B227BBE9 for ; Mon, 2 May 2022 12:29:11 +0100 (BST) Received: from localhost ([::1]:40564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlUEo-0007jP-Ou for patchwork@mira.cbaines.net; Mon, 02 May 2022 07:29:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU63-0001gc-2H for guix-patches@gnu.org; Mon, 02 May 2022 07:20:21 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU5z-0005Zu-Ge for guix-patches@gnu.org; Mon, 02 May 2022 07:20:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlU5z-0005jZ-BX for guix-patches@gnu.org; Mon, 02 May 2022 07:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 2/4] platform: Add discovery support. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 11:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55220@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 55220-submit@debbugs.gnu.org id=B55220.165149038321980 (code B ref 55220); Mon, 02 May 2022 11:20:03 +0000 Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:43 +0000 Received: from localhost ([127.0.0.1]:35014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5f-0005iP-5k for submit@debbugs.gnu.org; Mon, 02 May 2022 07:19:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5d-0005iB-4u for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU5X-0005YR-Uq for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=FZ4gFvIl1e/fnCuOMWnJZYiycebBzWcidNNNtN37/Pc=; b=b5YVHvl2zcS6+jn5/lyR Rgt1jwNdg79w+1PJcfCN5Urac0t1w6HqCKvQWHDuGkMTZ7JWLq5W5bnG0C0SJmgrqytlUHSwqLdbc eS1+BKyuv97XWN1/fUgNurZNvgeo1btnTKe7pCZ0Ga4cL2ojv5a2endPfnI9G+xaNSg7WeHV/PMbp MbiwqDGj7h5CnRW0mHwIMftgwwyBvtR9ExARszFT/rqjoB4WyXdu3Ht2YsaD3cwRP0lqP1Dov+E0k 5sgx5fKf1S3/orApkk+Jps74TL5Mr7RRX5AmFyuCZVSrhhPNnMA+6RkaidvpS97pSy5uUqS4cAc81 Jprg5wVlAwJhNA==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU5L-0004xO-0o; Mon, 02 May 2022 07:19:26 -0400 From: Mathieu Othacehe Date: Mon, 2 May 2022 13:18:57 +0200 Message-Id: <20220502111859.13605-2-othacehe@gnu.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@gnu.org> References: <20220502111859.13605-1-othacehe@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/platform.scm (platform-modules, systems, targets): New procedures. (%platforms): New variable. Signed-off-by: Mathieu Othacehe --- gnu/platform.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/gnu/platform.scm b/gnu/platform.scm index bb6519c71a..481467086a 100644 --- a/gnu/platform.scm +++ b/gnu/platform.scm @@ -17,22 +17,78 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu platform) + #:use-module (guix discovery) #:use-module (guix records) + #:use-module (guix ui) + #:use-module (srfi srfi-1) #:export (platform platform? platform-target platform-system - platform-linux-architecture)) + platform-linux-architecture + + platform-modules + %platforms + + systems + targets)) ;;; ;;; Platform record. ;;; -;; Description of a platform supported by the GNU system. +;; Description of a platform supported by GNU Guix. +;; +;; The 'target' field must be a valid GNU triplet as defined here: +;; https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Specifying-Target-Triplets.html. +;; It is used for cross-compilation purposes. +;; +;; The 'system' field is the name of the corresponding system as defined in +;; the (gnu packages bootstrap) module. It can be for instance +;; "aarch64-linux" or "armhf-linux". It is used to emulate a different host +;; architecture, for instance i686-linux on x86_64-linux-gnu, or armhf-linux +;; on x86_64-linux, using the QEMU binfmt transparent emulation mechanism. +;; +;; The 'linux-architecture' is only relevant if the kernel is Linux. In that +;; case, it corresponds to the ARCH variable used when building Linux. (define-record-type* platform make-platform platform? (target platform-target) ;"x86_64-linux-gnu" (system platform-system) ;"x86_64-linux" - (linux-architecture platform-linux-architecture ;"amd64" + (linux-architecture platform-linux-architecture ;"x86" (default #f))) + +;;; +;;; Platforms. +;;; + +(define (platform-modules) + "Return the list of platform modules." + (all-modules (map (lambda (entry) + `(,entry . "gnu/platforms")) + %load-path) + #:warn warn-about-load-error)) + +(define %platforms + ;; The list of publically-known platforms. + (delay (fold-module-public-variables (lambda (obj result) + (if (platform? obj) + (cons obj result) + result)) + '() + (platform-modules)))) + + +;;; +;;; Systems & Targets. +;;; + +(define (systems) + "Return the list of supported systems." + (delete-duplicates + (filter-map platform-system (force %platforms)))) + +(define (targets) + "Return the list of supported targets." + (map platform-target (force %platforms))) From patchwork Mon May 2 11:18:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 39054 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 520BF27BBEA; Mon, 2 May 2022 12:29:56 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 0CEF327BBE9 for ; Mon, 2 May 2022 12:29:56 +0100 (BST) Received: from localhost ([::1]:41760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlUFX-00006I-6z for patchwork@mira.cbaines.net; Mon, 02 May 2022 07:29:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU63-0001gd-5Q for guix-patches@gnu.org; Mon, 02 May 2022 07:20:21 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU60-0005Zw-7O for guix-patches@gnu.org; Mon, 02 May 2022 07:20:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlU60-0005jj-2Q for guix-patches@gnu.org; Mon, 02 May 2022 07:20:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 3/4] ci: Do not rely on hardcoded cross-targets lists. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 11:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55220@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 55220-submit@debbugs.gnu.org id=B55220.165149039822014 (code B ref 55220); Mon, 02 May 2022 11:20:03 +0000 Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:19:58 +0000 Received: from localhost ([127.0.0.1]:35018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5u-0005j0-HH for submit@debbugs.gnu.org; Mon, 02 May 2022 07:19:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5t-0005ik-F3 for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU5n-0005Z2-35 for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=wQ7OyDYkad7e/MUysSzkGO6zVsY4n2OvNHNnUnBkXQM=; b=pFosVcFbcvZkTCNGC/ID 3EuYqN4e9GchlWd7yXzoyep4TmLGvme0U/8sCIuH5cy7+2DBNSoXJRtmfhdtNO6DnkAyZIrsRkANq +b26+QxNnHV5d2AikUmn6x0lrTWZrjnGPEt4HA010bRyA9V1ylCrh06QcHdQ1h2X/ud0FZIwgGdkR dB1JFy9HWx6gNq8uFehXKR3VjQdy0wgDApE56NEPRN7ZnfKc3ABNIrxTou26R9xTeUzihwxLrC1oq RO+4Voekdoi7RB79feEfAGQEXXiiNVnt1vn3Fjzx2wXFA4jGRc2dkQt/cbpDddqS1eyBejw6GxPfA RItP61xt4DKRvw==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU5Q-0004xO-ET; Mon, 02 May 2022 07:19:32 -0400 From: Mathieu Othacehe Date: Mon, 2 May 2022 13:18:58 +0200 Message-Id: <20220502111859.13605-3-othacehe@gnu.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@gnu.org> References: <20220502111859.13605-1-othacehe@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/ci.scm (%cross-targets): Remove it ... (cross-jobs): ... and use the targets procedure instead. * etc/release-manifest.scm: Adapt it. Signed-off-by: Mathieu Othacehe --- etc/release-manifest.scm | 4 ++-- gnu/ci.scm | 15 ++------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/etc/release-manifest.scm b/etc/release-manifest.scm index e7e64efda4..1098f491ba 100644 --- a/etc/release-manifest.scm +++ b/etc/release-manifest.scm @@ -23,7 +23,7 @@ (use-modules (gnu packages) (guix packages) (guix profiles) - ((gnu ci) #:select (%cross-targets)) + ((gnu platform) #:select (targets)) ((gnu services xorg) #:select (%default-xorg-modules)) (guix utils) (srfi srfi-1) @@ -144,7 +144,7 @@ (define %cross-manifest %packages-to-cross-build))) ;; XXX: Important bits like libsigsegv and libffi don't support ;; RISCV at the moment, so don't require RISCV support. - (delete "riscv64-linux-gnu" %cross-targets)))) + (delete "riscv64-linux-gnu" (targets))))) (define %cross-bootstrap-manifest (manifest diff --git a/gnu/ci.scm b/gnu/ci.scm index 35fd583f75..9de1b54fc8 100644 --- a/gnu/ci.scm +++ b/gnu/ci.scm @@ -55,6 +55,7 @@ (define-module (gnu ci) #:use-module (gnu packages multiprecision) #:use-module (gnu packages make-bootstrap) #:use-module (gnu packages package-management) + #:use-module (gnu platform) #:use-module (gnu system) #:use-module (gnu system image) #:use-module (gnu system vm) @@ -71,7 +72,6 @@ (define-module (gnu ci) image->job %core-packages - %cross-targets channel-source->package arguments->systems @@ -169,17 +169,6 @@ (define (packages-to-cross-build target) (drop-right %core-packages 6) %core-packages)) -(define %cross-targets - '("mips64el-linux-gnu" - "arm-linux-gnueabihf" - "aarch64-linux-gnu" - "powerpc-linux-gnu" - "powerpc64le-linux-gnu" - "riscv64-linux-gnu" - "i586-pc-gnu" ;aka. GNU/Hurd - "i686-w64-mingw32" - "x86_64-w64-mingw32")) - (define (cross-jobs store system) "Return a list of cross-compilation jobs for SYSTEM." (define (from-32-to-64? target) @@ -221,7 +210,7 @@ (define (either proc1 proc2 proc3) package target system)) (packages-to-cross-build target))) (remove (either from-32-to-64? same? pointless?) - %cross-targets))) + (targets)))) (define* (guix-jobs store systems #:key source commit) "Return a list of jobs for Guix itself." From patchwork Mon May 2 11:18:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 39051 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2DD3B27BBEA; Mon, 2 May 2022 12:27:34 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable 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 F026827BBE9 for ; Mon, 2 May 2022 12:27:32 +0100 (BST) Received: from localhost ([::1]:36228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlUDE-0004b8-3Z for patchwork@mira.cbaines.net; Mon, 02 May 2022 07:27:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU6w-0002GR-Fp for guix-patches@gnu.org; Mon, 02 May 2022 07:21:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU6w-0005ta-4Q for guix-patches@gnu.org; Mon, 02 May 2022 07:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlU6w-0005lw-1E for guix-patches@gnu.org; Mon, 02 May 2022 07:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 4/4] scripts: Add --list-systems and --list-targets options. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 11:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55220@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 55220-submit@debbugs.gnu.org id=B55220.165149040522077 (code B ref 55220); Mon, 02 May 2022 11:21:01 +0000 Received: (at 55220) by debbugs.gnu.org; 2 May 2022 11:20:05 +0000 Received: from localhost ([127.0.0.1]:35024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5z-0005ji-TE for submit@debbugs.gnu.org; Mon, 02 May 2022 07:20:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU5x-0005ir-9K for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:20:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU5s-0005ZM-3C for 55220@debbugs.gnu.org; Mon, 02 May 2022 07:19:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=xNDyzpc95evmgaz/SMlr7TlNAp4rIXXFzEMZ7sFQTjs=; b=c2xF6ZMvqH6xMAhz5KcW N+He1le8vg6B8G2VNLqIcsHOz7UnFjnjrNOhVZsNek7joXq6kX9OjeNebeZslWqO36V5nq/o+UZFG j2sTpvi1KeqAcg+1vtpUncN2pasWQAaiLC6GnuzTUhY3t42oO6beq7DnVceqJFZfmMNGWd3FF+RS9 LW3omkJLa/npeUdQdlsLxvCqrxkbzsguV5ckWofHprCwQap7ZKBITPsXpH+weZ52EpZ6d7hEPu2lo 8yxLTgpTCkhL24SykFbeJHEuhL7tnlILhYFpC0FrUt2whlJwmr/dN67mc19XqUf5urE1R5WqfTpcd P0ec+bqUTi5wTQ==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33768 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU5f-0004xO-QN; Mon, 02 May 2022 07:19:46 -0400 From: Mathieu Othacehe Date: Mon, 2 May 2022 13:18:59 +0200 Message-Id: <20220502111859.13605-4-othacehe@gnu.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220502111859.13605-1-othacehe@gnu.org> References: <20220502111859.13605-1-othacehe@gnu.org> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Also factorize the --system and --target build options. Check that the passed system and target arguments are known platforms. * doc/guix.texi (Additional Build Options): Document the new --list-systems and --list-targets options. * guix/scripts/build.scm (show-cross-build-options-help, show-emulated-build-options-help, list-systems, list-targets): New procedures. (%standard-cross-build-options, %standard-emulated-build-options): New variables. (show-help): Remove --system and --target entries and use show-cross-build-options-help and show-emulated-build-options-help procedures instead. (%options): Remove --system and --target entries and use %standard-cross-build-options and %standard-emulated-build-options variables instead. * guix/scripts/archive.scm (show-help, %options): Adapt them. * guix/scripts/environment.scm: Ditto. * guix/scripts/graph.scm: Ditto. * guix/scripts/pack.scm: Ditto. * guix/scripts/pull.scm: Ditto. * guix/scripts/size.scm: Ditto. * guix/scripts/weather.scm: Ditto. Signed-off-by: Mathieu Othacehe --- doc/guix.texi | 8 ++++ guix/scripts/archive.scm | 20 +++------ guix/scripts/build.scm | 84 ++++++++++++++++++++++++++++++------ guix/scripts/environment.scm | 11 ++--- guix/scripts/graph.scm | 15 +++---- guix/scripts/pack.scm | 20 +++------ guix/scripts/pull.scm | 12 +++--- guix/scripts/size.scm | 13 +++--- guix/scripts/weather.scm | 11 +++-- 9 files changed, 120 insertions(+), 74 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5399584cb0..22a8ee7d2d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -12025,6 +12025,14 @@ Cross-build for @var{triplet}, which must be a valid GNU triplet, such as @code{"aarch64-linux-gnu"} (@pxref{Specifying Target Triplets, GNU configuration triplets,, autoconf, Autoconf}). +@item --list-systems +List all the supported systems, than can be passed as @var{system} +argument. + +@item --list-targets +List all the supported targets, than can be passed as @var{target} +argument. + @anchor{build-check} @item --check @cindex determinism, checking diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index f8678aa5f9..991919773a 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -93,14 +93,14 @@ (define (show-help) (display (G_ " -S, --source build the packages' source derivations")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " - --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) - (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) (newline) (show-build-options-help) + (newline) + (show-cross-build-options-help) + (newline) + (show-emulated-build-options-help) (newline) (display (G_ " @@ -166,14 +166,6 @@ (define %options (option '(#\S "source") #f #f (lambda (opt name arg result) (alist-cons 'source? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) - (option '("target") #t #f - (lambda (opt name arg result) - (alist-cons 'target arg - (alist-delete 'target result eq?)))) (option '(#\e "expression") #t #f (lambda (opt name arg result) (alist-cons 'expression arg result))) @@ -186,7 +178,9 @@ (define %options (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) - %standard-build-options)) + (append %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options))) (define (derivation-from-expression store str package-derivation system source?) diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index d9cdb6e5e0..9aa0bd2f53 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -47,6 +47,7 @@ (define-module (guix scripts build) #:use-module (srfi srfi-35) #:use-module (srfi srfi-37) #:use-module (gnu packages) + #:use-module (gnu platform) #:use-module ((guix status) #:select (with-status-verbosity)) #:use-module ((guix progress) #:select (current-terminal-columns)) #:use-module ((guix build syscalls) #:select (terminal-columns)) @@ -54,9 +55,15 @@ (define-module (guix scripts build) #:export (log-url %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options + set-build-options-from-command-line set-build-options-from-command-line* + show-build-options-help + show-cross-build-options-help + show-emulated-build-options-help guix-build register-root @@ -184,6 +191,18 @@ (define (show-build-options-help) (display (G_ " --debug=LEVEL produce debugging output at LEVEL"))) +(define (show-cross-build-options-help) + (display (G_ " + --list-targets list available targets")) + (display (G_ " + --target=TRIPLET cross-build for TRIPLET--e.g., \"aarch64-linux-gnu\""))) + +(define (show-emulated-build-options-help) + (display (G_ " + --list-systems list available systems")) + (display (G_ " + -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\""))) + (define (set-build-options-from-command-line store opts) "Given OPTS, an alist as returned by 'args-fold' given '%standard-build-options', set the corresponding build options on STORE." @@ -319,6 +338,52 @@ (define %standard-build-options (leave (G_ "not a number: '~a' option argument: ~a~%") name arg))))))) +(define (list-systems) + "Print the available systems." + (display (G_ "The available systems are:\n")) + (newline) + (format #t "~{ - ~a ~%~}" + (sort (systems) stringthings-to-build opts) "Read the arguments from OPTS and return a list of high-level objects to diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 07b54cd89b..51dab27767 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -96,8 +96,6 @@ (define (show-environment-options-help) (display (G_ " --search-paths display needed environment variable definitions")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " -r, --root=FILE make FILE a symlink to the result, and register it as a garbage collector root")) (display (G_ " @@ -145,6 +143,8 @@ (define (show-help) (newline) (show-build-options-help) (newline) + (show-emulated-build-options-help) + (newline) (show-transformation-options-help) (newline) (display (G_ " @@ -226,10 +226,6 @@ (define %options (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '(#\C "container") #f #f (lambda (opt name arg result) (alist-cons 'container? #t result))) @@ -273,7 +269,8 @@ (define %options (alist-cons 'bootstrap? #t result))) (append %transformation-options - %standard-build-options))) + %standard-build-options + %standard-emulated-build-options))) (define (pick-all alist key) "Return a list of values in ALIST associated with KEY." diff --git a/guix/scripts/graph.scm b/guix/scripts/graph.scm index 535875c858..c61504ac9d 100644 --- a/guix/scripts/graph.scm +++ b/guix/scripts/graph.scm @@ -39,7 +39,9 @@ (define-module (guix scripts graph) options->transformation %transformation-options)) #:use-module ((guix scripts build) - #:select (%standard-build-options)) + #:select (%standard-build-options + %standard-emulated-build-options + show-emulated-build-options-help)) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) @@ -504,10 +506,6 @@ (define %options (option '(#\e "expression") #t #f (lambda (opt name arg result) (alist-cons 'expression arg result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (find (lambda (option) (member "load-path" (option-names option))) %standard-build-options) @@ -519,7 +517,8 @@ (define %options (lambda args (show-version-and-exit "guix graph"))) - %transformation-options)) + (append %transformation-options + %standard-emulated-build-options))) (define (show-help) ;; TRANSLATORS: Here 'dot' is the name of a program; it must not be @@ -540,8 +539,6 @@ (define (show-help) --path display the shortest path between the given nodes")) (display (G_ " -e, --expression=EXPR consider the package EXPR evaluates to")) - (display (G_ " - -s, --system=SYSTEM consider the graph for SYSTEM--e.g., \"i686-linux\"")) (newline) (display (G_ " -L, --load-path=DIR prepend DIR to the package module search path")) @@ -553,6 +550,8 @@ (define (show-help) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %default-options diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 32f0d3abb1..ee42c9bf73 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -1244,17 +1244,9 @@ (define %options (option '(#\m "manifest") #t #f (lambda (opt name arg result) (alist-cons 'manifest arg result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '("entry-point") #t #f (lambda (opt name arg result) (alist-cons 'entry-point arg result))) - (option '("target") #t #f - (lambda (opt name arg result) - (alist-cons 'target arg - (alist-delete 'target result eq?)))) (option '(#\C "compression") #t #f (lambda (opt name arg result) (alist-cons 'compressor (lookup-compressor arg) @@ -1305,13 +1297,19 @@ (define %options (append %deb-format-options %transformation-options - %standard-build-options))) + %standard-build-options + %standard-cross-build-options + %standard-emulated-build-options))) (define (show-help) (display (G_ "Usage: guix pack [OPTION]... PACKAGE... Create a bundle of PACKAGE.\n")) (show-build-options-help) (newline) + (show-cross-build-options-help) + (newline) + (show-emulated-build-options-help) + (newline) (show-transformation-options-help) (newline) (show-deb-format-options) @@ -1325,10 +1323,6 @@ (define (show-help) (display (G_ " -e, --expression=EXPR consider the package EXPR evaluates to")) (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) - (display (G_ " - --target=TRIPLET cross-build for TRIPLET--e.g., \"armel-linux-gnu\"")) - (display (G_ " -C, --compression=TOOL compress using TOOL--e.g., \"lzip\"")) (display (G_ " -S, --symlink=SPEC create symlinks to the profile according to SPEC")) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 7402782ff3..8aba3e1e37 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -118,12 +118,13 @@ (define (show-help) -p, --profile=PROFILE use PROFILE instead of ~/.config/guix/current")) (display (G_ " -v, --verbosity=LEVEL use the given verbosity LEVEL")) - (display (G_ " - -s, --system=SYSTEM attempt to build for SYSTEM--e.g., \"i686-linux\"")) (display (G_ " --bootstrap use the bootstrap Guile to build the new Guix")) (newline) (show-build-options-help) + (newline) + (show-emulated-build-options-help) + (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " @@ -184,10 +185,6 @@ (define %options (lambda (opt name arg result) (alist-cons 'profile (canonicalize-profile arg) result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) (option '(#\n "dry-run") #f #f (lambda (opt name arg result) (alist-cons 'dry-run? #t result))) @@ -208,7 +205,8 @@ (define %options (lambda args (show-version-and-exit "guix pull"))) - %standard-build-options)) + (append %standard-build-options + %standard-emulated-build-options))) (define (warn-about-backward-updates channel start commit relation) "Warn about non-forward updates of CHANNEL from START to COMMIT, without diff --git a/guix/scripts/size.scm b/guix/scripts/size.scm index e46983382a..e3e64b4fcb 100644 --- a/guix/scripts/size.scm +++ b/guix/scripts/size.scm @@ -235,8 +235,6 @@ (define (show-help) (display (G_ " --substitute-urls=URLS fetch substitute from URLS if they are authorized")) - (display (G_ " - -s, --system=SYSTEM consider packages for SYSTEM--e.g., \"i686-linux\"")) ;; TRANSLATORS: "closure" and "self" must not be translated. (display (G_ " --sort=KEY sort according to KEY--\"closure\" or \"self\"")) @@ -251,15 +249,13 @@ (define (show-help) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %options ;; Specifications of the command-line options. - (list (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg - (alist-delete 'system result eq?)))) - (option '("substitute-urls") #t #f + (cons* (option '("substitute-urls") #t #f (lambda (opt name arg result . rest) (apply values (alist-cons 'substitute-urls @@ -287,7 +283,8 @@ (define %options (exit 0))) (option '(#\V "version") #f #f (lambda args - (show-version-and-exit "guix size"))))) + (show-version-and-exit "guix size"))) + %standard-emulated-build-options)) (define %default-options `((system . ,(%current-system)) diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index adba614b8c..b51bd40a17 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -40,6 +40,7 @@ (define-module (guix scripts weather) #:use-module (guix ci) #:use-module (guix sets) #:use-module (guix graph) + #:use-module (guix scripts build) #:autoload (guix scripts graph) (%bag-node-type) #:use-module (gnu packages) #:use-module (web uri) @@ -339,18 +340,18 @@ (define (show-help) COUNT dependents")) (display (G_ " --display-missing display the list of missing substitutes")) - (display (G_ " - -s, --system=SYSTEM consider substitutes for SYSTEM--e.g., \"i686-linux\"")) (newline) (display (G_ " -h, --help display this help and exit")) (display (G_ " -V, --version display version information and exit")) (newline) + (show-emulated-build-options-help) + (newline) (show-bug-report-information)) (define %options - (list (option '(#\h "help") #f #f + (cons* (option '(#\h "help") #f #f (lambda args (show-help) (exit 0))) @@ -380,9 +381,7 @@ (define %options (option '("display-missing") #f #f (lambda (opt name arg result) (alist-cons 'display-missing? #t result))) - (option '(#\s "system") #t #f - (lambda (opt name arg result) - (alist-cons 'system arg result))))) + %standard-emulated-build-options)) (define %default-options `((substitute-urls . ,%default-substitute-urls)))