From patchwork Sun Feb 27 02:34:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 550 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 823D127BBEC; Sun, 27 Feb 2022 02:37:12 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 3E42127BBEA for ; Sun, 27 Feb 2022 02:37:11 +0000 (GMT) Received: from localhost ([::1]:37408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Qs-0005R2-Dv for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:37:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Qk-0005Ql-4h for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34402) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Qj-0006Ce-Ro for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Qj-0004Av-PP for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 01/24] gnu: Use license prefix in (gnu packages racket). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592937015939 (code B ref 53878); Sun, 27 Feb 2022 02:37:01 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:10 +0000 Received: from localhost ([127.0.0.1]:56522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Pu-000490-1r for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:10 -0500 Received: from mail-qv1-f49.google.com ([209.85.219.49]:43844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Ps-00048l-JJ for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:09 -0500 Received: by mail-qv1-f49.google.com with SMTP id c14so4981308qvk.10 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=im2eB4m2cw9htGdEwc+CW/YqzVpAKz+5GUbS5TUWUbs=; b=FxcuJwzjOPe9i0MYOx77iiv0/7P5cm+amd/JRO6g0v21tXidN2JdbpE5KMbqrkZB93 zyfdoFspyoVu0UcnzxtyjFaMhob1OAU4VGQFnbDw9xHU38AN46b7Xu7x/YZfgY8SiLcr 7VtpPwmCroIPkSGqRoQIGm/RJutkVFJ57CaUE3EdO5m40xAYDSp0A8mONDvP9fVKFcDM deFeGU6Mc4U3Ta1TmWxfzcF6kUoZqPqZmf4E5rtwHMSnln1iUId+Kc1jJrr9m6TUmbwa ySyu8vAevpgJiEakWH2i4+oEM9FdrEzn3yJRbfGeZsmn01XNGWYDjAhQuJBQi0/WgAkH xJOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=im2eB4m2cw9htGdEwc+CW/YqzVpAKz+5GUbS5TUWUbs=; b=2tAmZjooQyOW6C+Og3/wt0J5cABuyK3deLcHCWKEAPKYJUvEySeH+PpqhaTRQ2dcRZ BepLAWG0N5PRr3tuznyOj1XNE5AtXcdZXGyK6g/mOY2roqK5QSA+Qp8d1m95i0JxzQ4+ Dux+ASmLlenMFJjT1pE4+tKTj4zkLgxW5gvPHSL8wVLAe3Wrdg7BoVFW+cCF5KPiNe8Z XEV2aSgT4ipvrN4yY+4pNGOZgYkpyAnUUgolfGgOQ1P+sBpSMPjGeOskfHqpbe86ZFK8 Cp7yhcstQG00toM7LLmMQ9B0d6An8/1JdHYr9GgX81klN0JtlBAPvig26ViJbkv3tBZL KT8A== X-Gm-Message-State: AOAM532fWBRIheYn1nN9NS+HreVaI9KP4GEarVUZAEzUP/VUGEtbLuoV KvTaz/65gvhpGk2w6yii36kAkfnHRdouibkxSSg= X-Google-Smtp-Source: ABdhPJy4dreQVWSX4vqmFvrdkiSHEddY4OtklRVwJd0QU/AtQq+FAEZiXcMM3jC9FXx/8QxPTtHqUg== X-Received: by 2002:ad4:4ea7:0:b0:42c:b235:aa7 with SMTP id ed7-20020ad44ea7000000b0042cb2350aa7mr10610157qvb.19.1645929362908; Sat, 26 Feb 2022 18:36:02 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id o1-20020a37be01000000b00648eadafd9bsm3269463qkf.24.2022.02.26.18.35.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:36:02 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:27 -0500 Message-Id: <20220227023450.1877215-2-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-minimal, racket-minimal-bc-3m, racket-bootstrap-chez-bootfiles): Use license prefix. --- gnu/packages/racket.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index d0a5ca494b..ec9e836a4c 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -21,8 +21,6 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages racket) - #:use-module ((guix licenses) - #:select (asl2.0 expat lgpl3+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -47,7 +45,8 @@ (define-module (gnu packages racket) #:use-module (gnu packages multiprecision) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module ((guix licenses) #:prefix license:)) ;; Commentary: ;; @@ -254,7 +253,7 @@ (define (write-racket-hash alist) DrRacket IDE, are not included.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list asl2.0 expat)))) + (license (list license:asl2.0 license:expat)))) (define-public racket-minimal-bc-3m @@ -295,7 +294,7 @@ (define-public racket-minimal-bc-3m collector, 3M (``Moving Memory Manager'').") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list lgpl3+ asl2.0 expat))))) + (license (list license:lgpl3+ license:asl2.0 license:expat))))) (define-public racket-minimal-bc-cgc @@ -372,7 +371,7 @@ (define-public racket-bootstrap-chez-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream Chez Scheme.") - (license (list asl2.0))))) + (license (list license:asl2.0))))) (define %installer-mirrors From patchwork Sun Feb 27 02:34:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 551 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 B7FF527BBE9; Sun, 27 Feb 2022 02:37:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 6B76D27BBEB for ; Sun, 27 Feb 2022 02:37:12 +0000 (GMT) Received: from localhost ([::1]:37424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Qt-0005Ry-Ii for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:37:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Qk-0005Qt-GQ for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34403) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Qk-0006Cj-7p for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Qk-0004B2-5j for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 02/24] gnu: racket: Update to 8.4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592939715986 (code B ref 53878); Sun, 27 Feb 2022 02:37:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:37 +0000 Received: from localhost ([127.0.0.1]:56526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9QA-00049Y-E9 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:36 -0500 Received: from mail-qk1-f177.google.com ([209.85.222.177]:39765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Q5-00049F-Kq for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:25 -0500 Received: by mail-qk1-f177.google.com with SMTP id t21so7814228qkg.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z0pcZSlzKw/cUO7uj/U8mdQ+2/FnmZU2cO/RKK1LnLk=; b=Wa35XZjEZem08focqe0Ut7w/dEkavHRD/sRPtIo3CeKYX90fJXNlVjeiehdDVaaGyv 4CxgwfaK4T8Ndsfwb1WiDOF9C1DyUz7gZ2EpbthTVQ9LAKvn02WdPQerauWK+6NDwsaw GKAhjHuM0J+X9Xyfz7qCWiBGJkY9os2QeiDG9k2LEdXEfTOypo4J5Rwzxdl+GQ9bsZRp nKi9pFJ9czk4qNA1nLnK4+544r6f4SgUEvFKW8BpCsxJst0k16WgRF+Lzk/3hjuUchRt ljE51ZaZNmqbE3mJWOCcXXqbu5qRbIF+6/qgSpB7QNdFD7ihYASU8cp6+OJDXU5kBChZ vLYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z0pcZSlzKw/cUO7uj/U8mdQ+2/FnmZU2cO/RKK1LnLk=; b=Eln86fAz7m+YtwfZXsGo3IjkVWwEL2nZep9EgQHabnO9Kn8m3V6Ar0K7rgeEt30LR4 oM7s5b0owdeiXfzZ8lpjPUWupTvilNq3pSrm6W36PoiHp1ACdURzwYbCvYpi9gA6F9xT ipYpDKWMyST2fTfWOWazYu97Ac4amjthN4DQ54hQSWqgFrittIZzsRRh/cUc09RsBUzI rJDJmcSdd8xN9cW4i/sn2oOziu7twNHw3Okh4StoPYdfh1zhjr9Aiaf5k015zLUeJtqz 079yiEb6/8CQadsmVCHqmTPHkpjPUgSCQTbPI2S5f18imdWupCrk+WmV/oEN3BflBKZk si9A== X-Gm-Message-State: AOAM530HMWAhQaRZzzNlxHk/2Vk6Z2szhXDmRjJ0WsouMvJzNdz1MbXf teVpJUN218cTqgc3Z5hBCkDflyCw31dXbZD7oms= X-Google-Smtp-Source: ABdhPJz8sqXUcvQiDISwbnTVOQlVfP+JMnvgzWygB25fVHy9t7OPdnK9EtzL2k5JzE8zY3WcR590YA== X-Received: by 2002:a05:620a:2981:b0:649:68a4:e4ea with SMTP id r1-20020a05620a298100b0064968a4e4eamr7672506qkp.462.1645929375445; Sat, 26 Feb 2022 18:36:15 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id v26-20020a05620a0a9a00b00605c6dbe40asm3167325qkg.87.2022.02.26.18.36.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:36:15 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:28 -0500 Message-Id: <20220227023450.1877215-3-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/patches/racket-enable-scheme-backport.patch, gnu/packages/patches/racket-gui-tethered-launcher-backport.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%racket-version): New variable. (%racket-commit): New variable. (%racket-origin): New variable. [patches]: Add "racket-enable-scheme-backport.patch". (racket-minimal): Update to 8.4. [version]: Use '%racket-version'. [source]: Use '%racket-origin'. [inputs]: Add 'ncurses'. Remove 'zlib:static' and 'lz4:static'. (racket-minimal-bc-3m)[inputs]: Adjust accordingly. (racket-bootstrap-chez-bootfiles)[version]: Use Chez Scheme's '(scheme-fork-version-number)'. (racket)[version]: Use '%racket-version'. [native-inputs]: Use '%racket-origin'. [source]: Update to 8.4. : Use "racket-gui-tethered-launcher-backport.patch". : Remove "srfi-doc-nonfree". --- gnu/local.mk | 4 +- .../racket-enable-scheme-backport.patch | 465 ++++++++++++++++++ ...acket-gui-tethered-launcher-backport.patch | 26 + gnu/packages/racket.scm | 99 ++-- 4 files changed, 557 insertions(+), 37 deletions(-) create mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch create mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch diff --git a/gnu/local.mk b/gnu/local.mk index 98f2d4ac30..cf34905431 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -41,7 +41,7 @@ # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling # Copyright © 2021 Greg Hogan -# Copyright © 2021 Philip McGrath +# Copyright © 2021, 2022 Philip McGrath # Copyright © 2021 Arun Isaac # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov @@ -1749,6 +1749,8 @@ dist_patch_DATA = \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ + %D%/packages/patches/racket-enable-scheme-backport.patch \ + %D%/packages/patches/racket-gui-tethered-launcher-backport.patch \ %D%/packages/patches/racket-minimal-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch new file mode 100644 index 0000000000..3a5a4a3d82 --- /dev/null +++ b/gnu/packages/patches/racket-enable-scheme-backport.patch @@ -0,0 +1,465 @@ +From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 10:36:09 -0700 +Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=` + +(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5) + +(Fixed conflicts by dropping pbchunks and pbarch changes.) +--- + racket/src/ChezScheme/configure | 15 ++++++++++++++- + racket/src/ChezScheme/s/Mf-base | 4 ++-- + racket/src/ChezScheme/s/Mf-cross | 4 +++- + 3 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index 4515ffc105..0098829091 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -45,6 +45,7 @@ threads=yes + nothreads=no + temproot="" + help=no ++forceworkarea=no + gzipmanpages=yes + installowner="" + installgroup="" +@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do + --pb) + pb=yes + ;; ++ --force) ++ forceworkarea=yes ++ ;; + --installprefix=*) + installprefix=`echo $1 | sed -e 's/^--installprefix=//'` + ;; +@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then + echo " --toolprefix= prefix tool (compiler, linker, ...) names" + echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)" + echo " --workarea= build directory ($w)" ++ echo " --force configure even without boot files" + echo " CC= C compiler" + echo " CPPFLAGS= C preprocessor flags" + echo " CFLAGS= C compiler flags" +@@ -721,8 +726,16 @@ case "${flagsmuni}" in + ;; + esac + ++if [ "$w" = "$m" ] ; then ++ configuringin="" ++else ++ configuringin=" in $w" ++fi ++ + if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then +- echo "Configuring for $m" ++ echo "Configuring for $m$configuringin" ++elif [ "$forceworkarea" = yes ] ; then ++ echo "Configuring for $m$configuringin despite missing boot files" + else + if [ "$m" = "" ] ; then + maybem="" +diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base +index cc6178c973..1f4a967998 100644 +--- a/racket/src/ChezScheme/s/Mf-base ++++ b/racket/src/ChezScheme/s/Mf-base +@@ -94,7 +94,7 @@ endif + # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme + # implementation + Scheme = ../bin/$m/scheme${ExeSuffix} +-export SCHEMEHEAPDIRS=../boot/%m ++export SCHEMEHEAPDIRS=../boot/$m + export CHEZSCHEMELIBDIRS=. + + # Define the libdirs separator character +@@ -691,4 +691,4 @@ reset-one: + + .PHONY: run + run: +- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS) ++ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS) +diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross +index d796cbb459..397af59a28 100644 +--- a/racket/src/ChezScheme/s/Mf-cross ++++ b/racket/src/ChezScheme/s/Mf-cross +@@ -43,5 +43,7 @@ x$(xm).$(m): + $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch + mv xpatch x$(xm).$(m) + ++ifneq ($(SCHEMEHEAPDIRS),:) + # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed +-nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++endif +-- +2.32.0 + + +From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 11:03:30 -0700 +Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable + +When the same Chez Scheme version as used by Racket is already +available, then `--enable-scheme=...` can supply an executable. For +cross builds, `--enable-scheme=...` can still supply a build +directory, instead, as before. + +(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f) +--- + racket/src/ChezScheme/makefiles/Makefile.in | 3 ++ + racket/src/README.txt | 30 +++++++++++--- + racket/src/configure | 8 +++- + racket/src/cs/README.txt | 6 ++- + racket/src/cs/c/Makefile.in | 44 ++++++++++++++++----- + racket/src/cs/c/configure | 24 +++++++++-- + racket/src/cs/c/configure.ac | 21 ++++++++-- + 7 files changed, 112 insertions(+), 24 deletions(-) + +diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in +index c396efc851..3998ef9ccd 100644 +--- a/racket/src/ChezScheme/makefiles/Makefile.in ++++ b/racket/src/ChezScheme/makefiles/Makefile.in +@@ -59,6 +59,9 @@ reset: + %.boot: + (cd $(workarea) && $(MAKE) $*.boot) + ++auto.boot: ++ (cd $(workarea) && $(MAKE) $(defaultm).boot) ++ + # .bootquick to build boot files for + # with o=3 d=0 for the cross compiler, and only after + # building the kernel for the configured machine +diff --git a/racket/src/README.txt b/racket/src/README.txt +index 98647aebce..d77310b4a4 100644 +--- a/racket/src/README.txt ++++ b/racket/src/README.txt +@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of + ======================================================================== + + Cross-compilation requires at least two flags to `configure`: ++`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS) ++`--enable-scheme-SCHEME`. ++ ++More information: + + * `--host=OS`, where OS is something like `i386-gnu-linux` to + indicate the target platform. +@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`: + run `configure` again (with no arguments) in a "local" subdirectory + to create a build for the current platform. + +-An additional flag is needed for building Racket CS, unless the flag +-`--enable-racket=auto` is used: +- +- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme" +- directory where Chez Scheme is built for the host system. ++ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable ++ executable that runs on the build platform; the executable must be ++ the same version as used in Racket built for the target platform. ++ ++ Supplying `--enable-scheme=DIR` is also supported in cross-build ++ mode, where DIR is a path that has a "ChezScheme" directory where ++ Chez Scheme is built for the host system. ++ ++The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are ++allowed for non-cross builds, too: ++ ++ * For Racket CS, supplying either selects a Racket or Chez Scheme ++ implementation used to create boot files to the build platform. ++ Suppling Chez Scheme is a much more direct path, but when Racket is ++ supplied, its version does not have to match the version being ++ built. ++ ++ * For Racket BC, `--enable-racket=RACKET` selects a Racket for ++ prepare C sources to cooperate with garbage collection. Its version ++ needs to be close to the one being built, and potentially exactly ++ the same version. + + Some less commonly needed `configure` flags are for Racket BC: + +diff --git a/racket/src/configure b/racket/src/configure +index c9f3ba4419..1b53ec7ce2 100755 +--- a/racket/src/configure ++++ b/racket/src/configure +@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb" + use_cs=maybe + use_bc=maybe + supplied_racket=no ++supplied_scheme=no + enable_boothelp= + + # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`, +@@ -34,6 +35,9 @@ for arg in $*; do + --enable-racket=*) + supplied_racket=yes + ;; ++ --enable-scheme=*) ++ supplied_scheme=yes ++ ;; + --help | -h) + echo $0: + echo see --help-bc or --help-cs, since the Racket CS build and the +@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then + fi + + if test "$use_cs" = "yes" ; then +- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then +- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly ++ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then ++ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly + exit 1 + fi + +diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt +index 2ece417b78..8e6fc57b74 100644 +--- a/racket/src/cs/README.txt ++++ b/racket/src/cs/README.txt +@@ -39,6 +39,11 @@ build: + installed in the "../ChezScheme/boot/pb" directory as described by + "../ChezScheme/BUILDING". + ++ Supplying `--enable-scheme=...` is also an option if you alerady ++ have the same version of Chez Scheme built on the current platform. ++ Another build will be created, anyway, but more quickly than ++ without Chez Scheme. ++ + * Racket is needed to generate the files in the "schemified" + directory from the sources in sibling directories like "../io". The + Racket version must be practically the same as the current Racket +@@ -48,7 +53,6 @@ build: + Unlike Chez Scheme boot files, the files generated in "schemified" + are human-readable and -editable Scheme code. That provides a way + out of bootstrapping black holes, even without BC. +- + + + ======================================================================== +diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in +index 54a644a1d9..d73993f0fc 100644 +--- a/racket/src/cs/c/Makefile.in ++++ b/racket/src/cs/c/Makefile.in +@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@ + SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA) + SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme + SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH) +-SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_existing = @MAKE_SCHEME_SCHEME@ ++SCHEME = $(SCHEME@USE_SCHEME_MODE@) + + TARGET_MACH = @TARGET_MACH@ + SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH) +@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../.. + @INCLUDEDEP@ @srcdir@/../../version/version.mak + + cs: +- $(MAKE) scheme@T_CROSS_MODE@ ++ $(MAKE) scheme@MAKE_SCHEME_MODE@ + $(MAKE) racket-so + cd rktio; $(MAKE) + $(MAKE) racketcs +@@ -121,9 +123,13 @@ racket-so: + + RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@ + ++TARGET_MACH_built = $(TARGET_MACH) ++TARGET_MACH_existing = xc-$(TARGET_MACH) ++XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch ++ + CS_PROGS = SCHEME="$(SCHEME)" + CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@ +-CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch" ++CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)" + PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot" + + build-racket-so: +@@ -163,6 +169,15 @@ pb-bootquick: + cd $(SCHEME_WORKAREA) && $(MAKE) reset + $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA) + ++scheme-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot ++ $(MAKE) mach-make ++ ++$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot: ++ mkdir -p $(SCHEME_WORKAREA) ++ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force" ++ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all ++ + mach-make: + $(MAKE) config-scheme + cd $(SCHEME_WORKAREA) && $(MAKE) +@@ -182,24 +197,33 @@ config-scheme: + + scheme-cross: + env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt ++ $(MAKE) finish-scheme-cross ++ ++finish-scheme-cross: + $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA) + cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS) + cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t +- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch ++ $(MAKE) $(XPATCH_FILE) ++ ++scheme-cross-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH) ++ $(MAKE) finish-scheme-cross + + # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older +-# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files +-XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ +- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot ++# than the build- use as Racket for build; or "auto" to create +- --enable-scheme= use as host's build directory for cross ++ --enable-scheme= use as host build for cross + --enable-mach= use Chez Scheme machine type + --enable-target= cross-build for Chez Scheme machine type + --enable-portable prefer portable to host-specific +@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style" + show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib' + + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + show_explicitly_enabled "${enable_portable}" "portable" +@@ -4745,9 +4748,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags + + + ++ ++ ++ + + + +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 464ebe1760..aaee88156d 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev + AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files]) + m4_include(../ac/path_arg.m4) + AC_ARG_ENABLE(racket, [ --enable-racket= use as Racket for build; or "auto" to create]) +-AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host's build directory for cross]) ++AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host build for cross]) + AC_ARG_ENABLE(mach, [ --enable-mach= use Chez Scheme machine type ]) + AC_ARG_ENABLE(target, [ --enable-target= cross-build for Chez Scheme machine type ]) + m4_include(../ac/portable_arg.m4) +@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files" + show_explicitly_enabled "${enable_xonx}" "Unix style" + m4_include(../ac/path_show.m4) + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + m4_include(../ac/portable_show.m4) +@@ -504,9 +504,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH) + AC_SUBST(CROSS_MODE) + AC_SUBST(T_CROSS_MODE) + AC_SUBST(TT_CROSS_MODE) ++AC_SUBST(MAKE_SCHEME_MODE) ++AC_SUBST(MAKE_SCHEME_SCHEME) ++AC_SUBST(USE_SCHEME_MODE) + AC_SUBST(SETUP_BOOT_MODE) + AC_SUBST(OSX) + AC_SUBST(NOT_OSX) +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch new file mode 100644 index 0000000000..abf253486f --- /dev/null +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -0,0 +1,26 @@ +From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Mon, 31 Jan 2022 15:31:22 -0700 +Subject: [PATCH] fix creation of tethered launchers + +Related to racket/racket#4133 + +(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) +--- + share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt +index b1691472..9ef06c53 100644 +--- a/share/pkgs/gui-lib/mred/installer.rkt ++++ b/share/pkgs/gui-lib/mred/installer.rkt +@@ -72,4 +72,5 @@ + (list "-A" (path->string (find-system-path 'addon-dir))))) + + (define (config-flags) +- (list "-G" (path->string (find-config-dir)))) ++ (list "-X" (path->string (find-collects-dir)) ++ "-G" (path->string (find-config-dir)))) +-- +2.32.0 + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index ec9e836a4c..00ec587eeb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -43,6 +43,7 @@ (define-module (gnu packages racket) #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages xorg) @@ -95,6 +96,41 @@ (define-module (gnu packages racket) ;; ;; Code: +(define %racket-version "8.4") +;; ^ Remember to update racket-bootstrap-chez-bootfiles! +(define %racket-commit + (string-append "v" %racket-version)) +(define %racket-origin + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit %racket-commit))) + (sha256 + (base32 "1vpl66gdgc8rnldmn8rmb7ar9l057jqjvgpfn29k57i3c5skr8s6")) + (file-name (git-file-name "racket" %racket-version)) + (patches (search-patches "racket-minimal-sh-via-rktio.patch" + ;; Remove by Racket 8.5: + "racket-enable-scheme-backport.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + (use-modules (guix build utils)) + ;; Unbundle Chez submodules. + (with-directory-excursion "racket/src/ChezScheme" + ;; TODO: consider putting this in a (guix ...) or (guix build ...) + ;; module so it can be shared with the upstream Chez Scheme origin + ;; without cyclic issues. + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib"))) + ;; Unbundle libffi. + (delete-file-recursively "racket/src/bc/foreign/libffi"))))) + (define cfg-flag:sh-for-rktio `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" (assoc-ref %build-inputs "sh") @@ -128,41 +164,17 @@ (define src (define-public racket-minimal (package (name "racket-minimal") - (version "8.3") ; note: remember to also update racket! - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/racket/racket") - (commit (string-append "v" version)))) - (sha256 - "1i1jnv1wb0kanfg47hniafx2vhwjc33qqx66lq7wkf5hbmgsyws3") - (file-name (git-file-name name version)) - (patches (search-patches "racket-minimal-sh-via-rktio.patch")) - (modules '((guix build utils))) - (snippet - (with-imported-modules '((guix build utils)) - #~(begin - ;; Unbundle Chez submodules. - (with-directory-excursion "racket/src/ChezScheme" - ;; Remove bundled libraries (copied from 'chez-scheme'). - (for-each delete-file-recursively - '("stex" - "nanopass" - "lz4" - "zlib"))) - ;; Unbundle libffi. - (delete-file-recursively "racket/src/bc/foreign/libffi")))))) + (version %racket-version) + (source %racket-origin) (inputs `(;; common to all racket-minimal variants: ("openssl" ,openssl) ("sqlite" ,sqlite) - ("sh" ,bash-minimal) + ("sh" ,bash-minimal) ;; <- for `system` + ("ncurses" ,ncurses) ;; <- for #%terminal ;; only for CS ("zlib" ,zlib) - ("zlib:static" ,zlib "static") - ("lz4" ,lz4) - ("lz4:static" ,lz4 "static"))) + ("lz4" ,lz4))) (native-inputs `(("bootfiles" ,racket-bootstrap-chez-bootfiles) ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) @@ -263,9 +275,8 @@ (define-public racket-minimal-bc-3m (name "racket-minimal-bc-3m") (inputs (modify-inputs (package-inputs racket-minimal) - (delete "zlib" "zlib:static" "lz4" "lz4:static") - (prepend libffi ;; <- only for BC variants - ))) + (prepend libffi) ;; <- only for BC variants + (delete "zlib" "lz4"))) (native-inputs `(("libtool" ,libtool) ("racket" ,(if (%current-target-system) @@ -327,6 +338,11 @@ (define-public racket-bootstrap-chez-bootfiles (package (inherit racket-minimal) (name "racket-bootstrap-chez-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. (inputs `()) (native-inputs `(("racket" ,(if (%current-target-system) @@ -416,7 +432,7 @@ (define-public racket (package (inherit racket-minimal) (name "racket") - (version (package-version racket-minimal)) ; needed for origin uri to work + (version %racket-version) (source (origin (method url-fetch) @@ -425,7 +441,11 @@ (define-public racket %installer-mirrors)) (sha256 (base32 - "0jdr0y7scvv2a3sq456ifrgq0yfsbiwavdf2m86zmrapp481mby4")) + "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) (snippet #~(begin (use-modules (guix build utils) @@ -442,7 +462,14 @@ (define-public racket (with-directory-excursion "share/pkgs" (for-each delete-file-recursively '#+%main-repo-main-distribution-pkgs)) - #t)))) + ;; Minimal workaround for FSDG issue: + ;; see . + ;; We will backport a better fix once we use Git + ;; origins for Racket packages. + (delete-file-recursively "share/pkgs/srfi-doc-nonfree") + (substitute* "share/pkgs/srfi/info.rkt" + (("\"srfi-doc-nonfree\"") + "")))))) (inputs `(("cairo" ,cairo) ("fontconfig" ,fontconfig) @@ -461,7 +488,7 @@ (define-public racket (native-inputs `(("racket" ,racket-minimal) ("extend-layer" ,extend-layer) - ("main-repo" ,(package-source racket-minimal)))) + ("main-repo" ,%racket-origin))) (arguments `(#:phases (modify-phases %standard-phases From patchwork Sun Feb 27 02:34:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 552 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 2784F27BBEB; Sun, 27 Feb 2022 02:37:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 9BAD227BBEA for ; Sun, 27 Feb 2022 02:37:17 +0000 (GMT) Received: from localhost ([::1]:37816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Qy-0005ic-PP for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:37:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Qk-0005R1-T4 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Qk-0006Cs-Kk for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Qk-0004BA-IE for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 03/24] gnu: racket: Use Git origins for Racket packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592940516006 (code B ref 53878); Sun, 27 Feb 2022 02:37:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:45 +0000 Received: from localhost ([127.0.0.1]:56529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9QN-00049z-0U for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:45 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:33651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9QK-00049f-KJ for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:38 -0500 Received: by mail-qt1-f171.google.com with SMTP id bt3so6087878qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P8SOnIgvEN/0r3Bf4tS0jhH2DUB199lAJxBXeywbOYA=; b=QNzIQ6xrG0BCSr6/2YJFKMaibAV54UNhUzHaeih3zScK3qLjjjwLK/N9KQfu9AIU3t X+HvOJrQJTlhE0Bg+zUPbyP8kO9J6v8sDYHlqiRYlBe6Ld0UfkFsPHu60Ow9g1/bQOfu +JY0pX9ssksbZ2DAtT8nBAHvMb09iZ68FmPc2BmV+wH4k/Vq3l4KDfuhb5NNm64tQEC2 8xP0BLorbcBmemGzsJC5Xjbzn8B0n5A0u2Kq0ABknH6Iv9U4QTohZWAvzxL0vIxYwrgU JaMFwSsdpx6baK0LYxCSOGaWVA1yusTjqPGgn0vkbExmyXK2ld34Y+1nIB5hLXWUQfIX Hx1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P8SOnIgvEN/0r3Bf4tS0jhH2DUB199lAJxBXeywbOYA=; b=PDCKKi4qfVpmqbwmj2s8mr6K19GfMXM38neJETcZwuQJCe25vFCoF7zWVxTm5tcBg4 Do3eulkSx1a8IANcZQKtw6nj/cy0XeivqbIGkAswgpc1toz3Z85zY/g7sNFRUmhK13Z+ EIMyiqt6k40tmSwRCvKYwgzdwUu0fQ6XfK1hVbotOKZqCWuwKip/lRcMrXhMIKahzsea zwCI6H1tqQ43Ur3nHjBx18IUZkJE1wrh2ufb4S61c6T33XGk3By5ywr8HK/c2gXRoxMw NBPeBo5VNw+MHB+bqa9hWkjXfPt9sSXq8iXfmsOe5eaPqBy2zXro29mOWENMCHNlHgSK 9IOA== X-Gm-Message-State: AOAM530s45ZTg/C32scISSND8Q4aw+BUJV8WVXSXEQYGcdUT43+1PM24 XFV9KcH+/d4P5x15YbmdmvJYw3UC7wYHwqn/fz4= X-Google-Smtp-Source: ABdhPJykVMOsCAmUVcMcO+Sd0rWRBW3Bvrtrz0W6hq0lW2MxNYFFgPwkcRU70VnhApfxuCheLs3KgQ== X-Received: by 2002:a05:622a:314:b0:2de:766:edf4 with SMTP id q20-20020a05622a031400b002de0766edf4mr12197949qtw.651.1645929390584; Sat, 26 Feb 2022 18:36:30 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 20-20020ac84e94000000b002de8f564305sm4561744qtp.1.2022.02.26.18.36.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:36:30 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:29 -0500 Message-Id: <20220227023450.1877215-4-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/patches/racket-gui-tethered-launcher-backport.patch: Adjust path. * gnu/packages/racket.scm (racket-packages-origin, simple-racket-origin): New procedures. (extend-layer): Rename to ... (configure-layer.rkt): ... this variable. Tweak command-line arguments. Adapt to 'config-tethered-apps-dir'. (racket): Stop inheriting from 'racket-minimal'. [version]: Use '%racket-version'. [source]: Stop using bundled tarball. [inputs]: Remove labels. Add 'racket-minimal' and package sources. [native-inputs]: Remove, since cross-compilation doesn't work yet. [arguments]: Rewrite to use G-expressions, package sources from 'inputs', an explicit 'install' phase, and the revised 'configure-layer.rkt'. --- ...acket-gui-tethered-launcher-backport.patch | 6 +- gnu/packages/racket.scm | 714 +++++++++++++----- 2 files changed, 539 insertions(+), 181 deletions(-) diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch index abf253486f..1e018eaa79 100644 --- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -7,13 +7,13 @@ Related to racket/racket#4133 (cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) --- - share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + gui-lib/mred/installer.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt index b1691472..9ef06c53 100644 ---- a/share/pkgs/gui-lib/mred/installer.rkt -+++ b/share/pkgs/gui-lib/mred/installer.rkt +--- a/gui-lib/mred/installer.rkt ++++ b/gui-lib/mred/installer.rkt @@ -72,4 +72,5 @@ (list "-A" (path->string (find-system-path 'addon-dir))))) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 00ec587eeb..c4e5ee1311 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -28,7 +28,9 @@ (define-module (gnu packages racket) #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (ice-9 match) + #:use-module (ice-9 exceptions) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) @@ -389,172 +391,504 @@ (define-public racket-bootstrap-chez-bootfiles Chez Scheme.") (license (list license:asl2.0))))) +(define (racket-packages-origin name origin spec0 . spec*) + "Extract from ORIGIN the sources for the Racket packages specified by SPEC0 +and any additional arguments SPEC*. In the resulting file-like object, each +package's source will be in the directory \"/share/racket/pkgs/PKG/\", where +PKG is the Racket name for the package. The NAME will be used in the store +file name for the resulting file-like object. -(define %installer-mirrors - ;; Source: - ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58 - ;; Matthew Flatt says: "note that many are commented out" - ;; INVARIANT: End with a trailing "/"! - '("https://mirror.racket-lang.org/installers/" - "https://www.cs.utah.edu/plt/installers/" - "https://plt.cs.northwestern.edu/racket-mirror/" - "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/" - ;; Universität Tübingen is using a self-signed HTTPS certificate: - "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" - "https://racket.infogroep.be/" - )) +A package specification is a list of the form: -(define %main-repo-main-distribution-pkgs - ;; These are the packages developed in the main Racket Git repository - ;; that are part of the main distribution. - '("at-exp-lib" - "base" - "compiler-lib" - ;; NOT "compiler-test" - "compiler" - "net-doc" - "net-lib" - ;; NOT "net-test" - "net" - ;; NOT "plt-services" - ;; NOT "racket-benchmarks" - ;; NOT "racket-build-guide" - "racket-doc" - "racket-index" - "racket-lib" - ;; NOT "racket-test-core" - ;; NOT "racket-test-extra" - ;; NOT "racket-test" - "zo-lib")) + (PKG PATH) +where PATH is the path to the package source relative to ORIGIN---possibly +\".\". As a special case, a package specification may also be a string, which +is equivalent to: + + (PKG PKG) + +Examples: + +- \"expeditor\" +- (\"main-distribution\" \".\") +- (\"racket-lib\" \"pkgs/racket-lib\")" + (computed-file + (string-append "racket-pkg-" name "-sources") + (with-imported-modules `((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p (string-append #$output "/share/racket/pkgs")) + (chdir (string-append #$output "/share/racket/pkgs")) + #$@(map (match-lambda + ((? string? name) + #~(copy-recursively #$(file-append origin (string-append "/" name)) + #$name)) + ((name ".") + #~(copy-recursively #$origin #$name)) + ((name path) + #~(copy-recursively #$(file-append origin (string-append "/" path)) + #$name))) + (cons spec0 spec*)))))) + +(define (simple-racket-origin repo hash spec0 . spec*) + "Like 'racket-packages-origin', but specialized for packages hosted at +\"https://github.com/racket/REPO\" with sha256 checksum HASH. REPO is also +used to build the name of the resulting store item." + (apply racket-packages-origin + repo + (origin + (method git-fetch) + (uri (git-reference + (url (format #f "https://github.com/racket/~a" repo)) + (commit %racket-commit))) + (sha256 hash) + (file-name (git-file-name (string-append "racket-" repo) + %racket-version))) + spec0 + spec*)) (define-public racket (package - (inherit racket-minimal) (name "racket") (version %racket-version) - (source - (origin - (method url-fetch) - (uri (map (lambda (base) - (string-append base version "/racket-src.tgz")) - %installer-mirrors)) - (sha256 - (base32 - "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) - (patches - ;; remove in Racket 8.5 - ;; see https://github.com/racket/racket/issues/4133 - (search-patches "racket-gui-tethered-launcher-backport.patch")) - (snippet - #~(begin - (use-modules (guix build utils) - (ice-9 match) - (ice-9 regex)) - ;; unbundle minimal Racket - (for-each delete-file-recursively - '("collects" - "doc" - "etc" - "README" - "src")) - ;; unbundle package sources included elsewhere - (with-directory-excursion "share/pkgs" - (for-each delete-file-recursively - '#+%main-repo-main-distribution-pkgs)) - ;; Minimal workaround for FSDG issue: - ;; see . - ;; We will backport a better fix once we use Git - ;; origins for Racket packages. - (delete-file-recursively "share/pkgs/srfi-doc-nonfree") - (substitute* "share/pkgs/srfi/info.rkt" - (("\"srfi-doc-nonfree\"") - "")))))) + (source #f) (inputs - `(("cairo" ,cairo) - ("fontconfig" ,fontconfig) - ("glib" ,glib) - ("glu" ,glu) - ("gmp" ,gmp) - ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libx11" ,libx11) - ("mesa" ,mesa) - ("mpfr" ,mpfr) - ("pango" ,pango) - ("unixodbc" ,unixodbc) - ("libedit" ,libedit))) - (native-inputs - `(("racket" ,racket-minimal) - ("extend-layer" ,extend-layer) - ("main-repo" ,%racket-origin))) + (list + cairo + fontconfig + glib + glu + gmp + gtk+ ;; propagates gdk-pixbuf+svg + libjpeg-turbo + libpng + libx11 ;; ?? wayland ?? + mesa + mpfr + pango + unixodbc + libedit ;; TODO reconsider in light of expeditor and readline-gpl + racket-minimal ;; <-- TODO non-tethered layer + (simple-racket-origin + "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") + "2d" "2d-doc" "2d-lib") + (simple-racket-origin + "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx") + '("algol60" ".")) + (racket-packages-origin + "racket" %racket-origin + '("base" "pkgs/base") ;; FIXME belongs in racket-minimal + '("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal + '("at-exp-lib" "pkgs/at-exp-lib") + '("compiler" "pkgs/compiler") + '("compiler-lib" "pkgs/compiler-lib") + '("net" "pkgs/net") + '("net-doc" "pkgs/net-doc") + '("net-lib" "pkgs/net-lib") + '("racket-doc" "pkgs/racket-doc") + '("racket-index" "pkgs/racket-index") + '("sandbox-lib" "pkgs/sandbox-lib") + '("zo-lib" "pkgs/zo-lib")) + (simple-racket-origin + "cext-lib" (base32 "00w38jpv88fpl4pgj6ndnysvn0s21rjvj0xhznay80msan0vc341") + "cext-lib" "dynext-lib") + (simple-racket-origin + "class-iop" (base32 "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l") + "class-iop-lib") + (simple-racket-origin + "compatibility" (base32 "0bfqwscjpyi325br5pa6g62g9c8lq18a80zp5g3d2qzn3n3mi6x0") + "compatibility" "compatibility-doc" "compatibility-lib") + (simple-racket-origin + "contract-profile" (base32 "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3") + '("contract-profile" ".")) + (simple-racket-origin + "data" (base32 "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55") + "data" "data-doc" "data-enumerate-lib" "data-lib") + (simple-racket-origin + "datalog" (base32 "0n5j5gnqh7g31mvgx19ggl18hirzbvq2r189lbngmnrmbc7b73fp") + '("datalog" ".")) + (simple-racket-origin + "db" (base32 "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5") + "db" "db-doc" "db-lib") + (simple-racket-origin + "deinprogramm" (base32 "1is6fapgv6rxfjz47nh6qf3kh7y7sjdinakaxqffi46gf1al8prd") + "deinprogramm" "deinprogramm-signature") + (simple-racket-origin + "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0") + "distributed-places" "distributed-places-doc" "distributed-places-lib") + (simple-racket-origin + "draw" (base32 "1xgjfbh70hqw67z88iqqajg98d04qwbzn6im2wj47rs28jxlm9ly") + "draw" "draw-doc" "draw-lib") + (simple-racket-origin + "drracket" (base32 "0m3l4an3nq2ycd1h287s1az2v2zprjbzd8if2x7d5r71vaj4i00c") + "drracket" + "drracket-plugin-lib" + "drracket-tool" + "drracket-tool-doc" + "drracket-tool-lib" + "drracket-tool-text-lib") + (simple-racket-origin + "ds-store" (base32 "0ajr27kipp4dr1qlisaghsb3h7lhhjwrfw2r79b5myczsa1mp661") + "ds-store" "ds-store-doc" "ds-store-lib") + (simple-racket-origin + "eli-tester" (base32 "0icx6wn14gjm8kdmq1jppqgq87sxkras4qb5xmdr6wigxafhjqyk") + '("eli-tester" ".")) + (simple-racket-origin + "eopl" (base32 "1fmiixj6rxsgzwvgva8lvrvv0gl49v2405mp3s0i7ipis5c4n27s") + '("eopl" ".")) + (simple-racket-origin + "errortrace" (base32 "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip") + "errortrace" "errortrace-doc" "errortrace-lib") + (simple-racket-origin + "expeditor" (base32 "07djzxs6307l51mcsk3yr2g4g47ayxa3878g7sf5xhqdr4hd9vxf") + "expeditor" "expeditor-doc" "expeditor-lib") + (simple-racket-origin + "frtime" (base32 "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5") + '("frtime" ".")) + (simple-racket-origin + "future-visualizer" (base32 "1758qq769m0r14xf64sl2ix2l9z340kvapar0j7s5kdg42lmvnhm") + "future-visualizer" + "future-visualizer-pict" + "future-visualizer-typed") + (simple-racket-origin + "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d") + '("games" ".")) + (racket-packages-origin + "gui" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/gui") + (commit %racket-commit))) + (sha256 (base32 + "1x33jgrx3r32k7hgwr591z3xqv1m2r5nc4km2fnxv0ak2xa0j3gj")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) + (file-name (git-file-name "racket-gui" %racket-version))) + "gui" "gui-doc" "gui-lib" "tex-table") + (simple-racket-origin + "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5") + "gui-pkg-manager-lib") + (simple-racket-origin + "htdp" (base32 "0r4ykybcpr10y2db9rlza9pr0xh58nd7ac389mjcxp8g386hgihl") + "htdp" "htdp-doc" "htdp-lib") + (simple-racket-origin + "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x") + "html" "html-doc" "html-lib") + (simple-racket-origin + "icons" (base32 "1s5a6j11fg3fdr6b7vm2q7q178d7q8b8igy73bs211r27qrd1gg7") + '("icons" ".")) + (simple-racket-origin + "images" (base32 "0rpjxqw34bq5m08kh1ldl1mr7s9z1lyydxxcyzb292kqh9qiqvfl") + "images" "images-doc" "images-gui-lib" "images-lib") + (simple-racket-origin + "lazy" (base32 "176ylzgbdsbmqknpihaz519afq71pyjkv1h87j5v8jfbpbddyfsf") + '("lazy" ".")) + (simple-racket-origin + "macro-debugger" (base32 "14hyrwbkffr61fk44l02xb47bhv5zccw0ymaa9kxld86hvyqhqbm") + "macro-debugger" "macro-debugger-text-lib") + (simple-racket-origin + "main-distribution" (base32 "0m2n9s32s8a4a2gn4ywrm9l8jycdm5ayi5w9kh5wchhrrw7qzq7y") + '("main-distribution" ".")) + (simple-racket-origin + "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa") + '("make" ".")) + (simple-racket-origin + "math" (base32 "02sqbnvxvmvslk33b44fx4v93zafcvhva0cx8z21jqbl5wp217ac") + "math" "math-doc" "math-lib") + (simple-racket-origin + "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48") + '("mysterx" ".")) + (simple-racket-origin + "mzcom" (base32 "0rc9pfj7gwm5azghqvcibz6si1x5s2v8mr2yngk7ssq9gzfbi6a4") + '("mzcom" ".")) + (simple-racket-origin + "mzscheme" (base32 "192c52zi726h5wjamxrhivjw2waq1im0zpyxhbrkrxknm8x84bs9") + "mzscheme" "mzscheme-doc" "mzscheme-lib") + (racket-packages-origin + "net-cookies" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RenaissanceBug/racket-cookies") + (commit %racket-commit))) + (sha256 (base32 + "0k0hifxhywl5c3hjcaiizc098dpyk001d981p572gly116yvjxc1")) + (file-name + (git-file-name "RenaissanceBug-racket-cookies" %racket-version))) + "net-cookies" "net-cookies-doc" "net-cookies-lib") + (racket-packages-origin + "optimization-coach" + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stamourv/optimization-coach") + (commit %racket-commit))) + (sha256 (base32 + "0b27sw48d7rhz0hin88c7rbr9vpg1c23sn82nd4jkmq54h6gasr1")) + (file-name + (git-file-name "stamourv-optimization-coach" %racket-version))) + '("optimization-coach" ".")) + (simple-racket-origin + "option-contract" (base32 "026b7n5l0c3024nymshz8zp1yhn493rdzgpflzfd52hj7awafqhk") + "option-contract" "option-contract-doc" "option-contract-lib") + (simple-racket-origin + "parser-tools" (base32 "08pvz4zramirzm3j64hbhjm0mmh5zfy37iv4s3vmq0rj49cr8fl3") + "parser-tools" "parser-tools-doc" "parser-tools-lib") + (simple-racket-origin + "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1") + "pconvert-lib") + (simple-racket-origin + "pict" (base32 "0g1iwdr6qh1xb0crhj96830vjjnbds409xbpqn7j5sh0ksy6vr5x") + "pict" "pict-doc" "pict-lib") + (simple-racket-origin + "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x") + "pict-snip" "pict-snip-doc" "pict-snip-lib") + (simple-racket-origin + "picturing-programs" (base32 "1g6xr39hx1j03gb3d4dljm3v91xcj2gfpq3dgy5xvplzr6cmmxgr") + '("picturing-programs" ".")) + (simple-racket-origin + "plai" (base32 "0i983sh0r0zm2ng4j44m5aw9669kh5fhp91bzpc9jm280rfcqvyl") + "plai" "plai-doc" "plai-lib") + (simple-racket-origin + "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9") + "planet" "planet-doc" "planet-lib") + (simple-racket-origin + "plot" (base32 "07kq32si34ybcwz8idxxcrzssg8diyrp1nfgkcj0mmvr45321zm7") + "plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib") + (simple-racket-origin + "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg") + '("preprocessor" ".")) + (simple-racket-origin + "profile" (base32 "179i86lyby29nywz60l4vnadi02w8b12h7501nm5h5g4pq9jjmbb") + "profile" "profile-doc" "profile-lib") + (racket-packages-origin + "quickscript" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Metaxal/quickscript") + (commit %racket-commit))) + (sha256 (base32 + "100g3yqhbjdq06b6l6d72ywsw29awgy8crqg33wj7h12xq07nzcr")) + (file-name (git-file-name "Metaxal-quickscript" %racket-version))) + '("quickscript" ".")) + (simple-racket-origin + "r5rs" (base32 "1g3cysj7z88r38vkzvi8g2fb2hn4yg1fdhy5smxw303jxgl3inp6") + "r5rs" "r5rs-doc" "r5rs-lib") + (simple-racket-origin + "r6rs" (base32 "0b1ymzdp10r0flw2acbidjsh5ma1pm5hy54jss37sxf89z3xbvm4") + "r6rs" "r6rs-doc" "r6rs-lib") + (racket-packages-origin + "racket-cheat" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jeapostrophe/racket-cheat") + (commit %racket-commit))) + (sha256 (base32 + "06wcj558rzkbl2bwkmikyspya9v1f4iwlzwnwxpkc33h2xapwabr")) + (file-name + (git-file-name "jeapostrophe-racket-cheat" %racket-version))) + '("racket-cheat" ".")) + (simple-racket-origin + "racklog" (base32 "1rgrvwy3kr9b9w5cghsffiv3ly00yfvvzr5xaaw83g1w7yin0mnb") + '("racklog" ".")) + (simple-racket-origin + "rackunit" (base32 "057z31rja6h3nabh5b2xgwfrzmlm6h1cv1qcgf3xfy4g2q5dqn5p") + "rackunit" + "rackunit-doc" + "rackunit-gui" + "rackunit-lib" + "rackunit-plugin-lib" + "rackunit-typed" + "schemeunit" + "testing-util-lib") + (simple-racket-origin + "readline" (base32 "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn") + "readline" "readline-doc" "readline-lib") + (simple-racket-origin + "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi") + '("realm" ".")) + (simple-racket-origin + "redex" (base32 "0vlgxbnbgrlihk1hh5zd6hsc4566ldi4q76f87z5vai54dxkwy2f") + "redex" + "redex-benchmark" + "redex-doc" + "redex-examples" + "redex-gui-lib" + "redex-lib" + "redex-pict-lib") + (simple-racket-origin + "sasl" (base32 "0ibh4wb4gn8pggx6gkv4vk4d6rwzn5nrvjibhvkzhaynf6lhb824") + "sasl" "sasl-doc" "sasl-lib") + (simple-racket-origin + "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x") + '("scheme-lib" ".")) + (simple-racket-origin + "scribble" (base32 "0rgvnsykrxkah6s5fw1vyp9lxsb4z9w6hgwk5j6wbwjp2gsfczbm") + "scribble" + "scribble-doc" + "scribble-html-lib" + "scribble-lib" + "scribble-text-lib") + (simple-racket-origin + "serialize-cstruct-lib" + (base32 "1rq3n1fa7ldjwx3lrh9ybhig7jlsw1crpzyklbzp3xqdw6jymfnz") + '("serialize-cstruct-lib" ".")) + (simple-racket-origin + "sgl" (base32 "0nkymhdyjrwi5h199j4w5zh7y3x3ai42gsiwxzh0hy7yqrqqg9zv") + '("sgl" ".")) + (simple-racket-origin + "shell-completion" (base32 "04m144gy2mp4fiq6rcbf12wjr8mws8k9scfhg9lc38vqppp4lxsj") + '("shell-completion" ".")) + (simple-racket-origin + "simple-tree-text-markup" + (base32 "0fyd9gfz6bnv0m1901wv5mnhc05rm8hw9i6ddrqx33hs6qsg2zqr") + "simple-tree-text-markup" + "simple-tree-text-markup-doc" + "simple-tree-text-markup-lib") + (simple-racket-origin + "slatex" (base32 "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0") + '("slatex" ".")) + (simple-racket-origin + "slideshow" (base32 "1znv1i2d0610hhy71q932xy7wka00q3q50in1xfnk8ibg7nzkagm") + "slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" "slideshow-plugin") + (simple-racket-origin + "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj") + "snip" "snip-lib") + (simple-racket-origin + "typed-racket" (base32 "1462kj9yswsxbnw71casylzlvhd7cxrml2v9j7rcsnn9hmrqx4vv") + "source-syntax" + "typed-racket" + "typed-racket-compatibility" + "typed-racket-doc" + "typed-racket-lib" + "typed-racket-more") + (racket-packages-origin + "srfi" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/srfi") + ;; Includes an FSDG fix: return to %racket-commit in 8.5. + ;; See . + (commit "7243029b135741ce08ae30f877e2f49a2a460b22"))) + (sha256 (base32 + "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn")) + ;; Use the relevant version for srfi-doc and srfi-lib, + ;; since we're using a newer commit than the v8.4 tag. + (file-name (git-file-name "racket-srfi" "1.1"))) + "srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib") + (simple-racket-origin + "string-constants" (base32 "1qizjq4n0hzdgdcjjpr94464gsywpsk2g9mnvwzqr7dcqbrsfvn6") + "string-constants" "string-constants-doc" "string-constants-lib") + (simple-racket-origin + "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67") + '("swindle" ".")) + (simple-racket-origin + "syntax-color" (base32 "1vf2fc3qvx8a1igi7swsg8gaqhx786sa0vqxd18xhbsidfgb5ywp") + "syntax-color" "syntax-color-doc" "syntax-color-lib") + (simple-racket-origin + "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia") + '("trace" ".")) + (simple-racket-origin + "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y") + "unix-socket" "unix-socket-doc" "unix-socket-lib") + (simple-racket-origin + "web-server" (base32 "1zgb6jl7zx6258ljs8f3lvryrq5n5zpd71dqzr698m92kw3x2pkn") + "web-server" "web-server-doc" "web-server-lib") + (simple-racket-origin + "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b") + "wxme" "wxme-lib") + (simple-racket-origin + "xrepl" (base32 "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3") + "xrepl" "xrepl-doc" "xrepl-lib"))) + (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'unpack-packages - (let ((unpack (assoc-ref %standard-phases 'unpack))) - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out")) - (pkgs-dir (string-append prefix "/share/racket/pkgs"))) - (mkdir-p pkgs-dir) - (copy-recursively - "share/links.rktd" - (string-append prefix "/share/racket/links.rktd")) - (copy-recursively "share/pkgs" pkgs-dir) - ;; NOTE: unpack changes the working directory - (unpack #:source (assoc-ref (or native-inputs inputs) - "main-repo")) - (for-each (lambda (pkg) - (define dest (string-append pkgs-dir "/" pkg)) - (mkdir-p dest) - (copy-recursively (string-append "pkgs/" pkg) - dest)) - ',%main-repo-main-distribution-pkgs) - #t)))) - (replace 'configure - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out"))) - (apply invoke - (string-append racket "/bin/racket") - (assoc-ref inputs "extend-layer") - racket - prefix - (map - (lambda (lib) - (string-append (assoc-ref inputs lib) "/lib")) - '("cairo" - "fontconfig" - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg" - "libpng" - "libx11" - "mesa" - "mpfr" - "pango" - "unixodbc" - "libedit"))) - #t))) - (replace 'build - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (invoke (string-append (assoc-ref (or native-inputs inputs) - "racket") - "/bin/racket") - "--config" - (string-append (assoc-ref outputs "out") - "/etc/racket") - "-l" - "raco" - "setup") - #t)) - (delete 'install)) - ;; we still don't have these: - #:tests? #f)) + ;; We're using #:configure-flags to pass flags for + ;; `configure-layer.rkt` and #:make-flags to pass arguments for + ;; `raco pkg install`. + (list + #:configure-flags + #~`("--extra-foreign-lib-search-dirs" + ,(format #f "~s" + '(#$@(map (lambda (name) + (cond + ((this-package-input name) + => (cut file-append <> "/lib")) + (else + (raise-exception + (make-exception + (make-assertion-failure) + (make-exception-with-message + "missing input to the 'racket' package") + (make-exception-with-irritants + (list name))))))) + '("cairo" + "fontconfig-minimal" ;; aka fontconfig + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg-turbo" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit"))))) + #:make-flags #~`("main-distribution") + #:tests? #f ;; packaged separately + #:modules '((guix build gnu-build-system) + (guix build utils) + (guix build union) + (ice-9 match)) + #:imported-modules `((guix build union) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + (let* ((racket (search-input-file inputs "bin/racket"))) + (apply invoke + racket + #$configure-layer.rkt + `(,@configure-flags + ,(dirname (dirname racket)) + ,#$output)) + (invoke racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" "setup" + "--no-user")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We use "share/racket/pkgs" for sources to distinguish them + ;; from the "lib/racket/pkgs" of a potential parent layer. + (union-build (string-append #$output "/lib/racket/pkgs") + (search-path-as-list '("share/racket/pkgs") + (map cdr inputs)) + #:create-all-directories? #t))) + (replace 'install + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((racket (search-input-file inputs "/bin/racket"))) + (unless (null? make-flags) + (invoke racket + "-l-" + "pkg/dirs-catalog" + "--link" + "local-catalog" + (string-append #$output "/lib/racket/pkgs")) + (apply invoke + racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" + "pkg" "install" + "--installation" + "--auto" + "--catalog" "local-catalog" + make-flags)))))))) + (home-page "https://racket-lang.org") (synopsis "Programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -564,17 +898,20 @@ (define dest (string-append pkgs-dir "/" pkg)) The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of -languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) - +languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) -(define extend-layer +(define configure-layer.rkt (scheme-file - "extend-layer.rkt" + "configure-layer.rkt" `(module - extend-layer racket/base + configure-layer racket/base (require racket/cmdline racket/match racket/file + racket/port racket/list racket/pretty) (define config-file-pth @@ -584,8 +921,14 @@ (define (build-path-string . args) (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) + (define extra-foreign-lib-search-dirs '()) (command-line - #:args (parent-layer prefix . lib-dir*) + #:once-each + [("--extra-foreign-lib-search-dirs") dir-list + "foreign library directories, as a list of strings in `read` syntax" + (set! extra-foreign-lib-search-dirs + (call-with-input-string dir-list read))] + #:args (parent-layer prefix) (let* ([config (for/fold ([config (file->value (build-path parent-layer @@ -615,27 +958,42 @@ (define rx:racket (build-path-string parent-layer pth)) (filter values (hash-ref config search-key null)))))] [config - (hash-set config - 'apps-dir - (build-path-string prefix "share/applications"))] + (hash-update config + 'lib-search-dirs + (lambda (dirs) + ;; add after other layers, but before older + ;; foreign lib search directories + (define-values [rkt old-foreign-dirs] + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + dirs)) + (append rkt + extra-foreign-lib-search-dirs + old-foreign-dirs)))] [config - ;; place new foreign lib-search-dirs before old - ;; foreign dirs, but after Racket layers - (let-values - ([(rkt extra) - (partition (lambda (pth) - (or (not pth) - (regexp-match? rx:racket pth))) - (hash-ref config 'lib-search-dirs))]) - (hash-set config - 'lib-search-dirs - (append rkt - lib-dir* - extra)))] + (hash-set* config + 'apps-dir + (build-path-string prefix "share/applications") + 'absolute-installation? #t + ;; Let Guix coexist with other installation + ;; methods without clobbering user-specific packages. + ;; This could be set in various places, but doing + ;; it here is convienient, at least until we support + ;; cross-compilation. + 'installation-name + (string-append (version) + "-guix" + (match (system-type 'gc) + ['cgc "-cgc"] + ;; workaround Guile reader/printer: + ['|3m| "-bc"] + [_ ""])))] [bin-dir (hash-ref config 'bin-dir)] [config (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) 'config-tethered-console-bin-dir bin-dir 'config-tethered-gui-bin-dir bin-dir)] [new-config-pth From patchwork Sun Feb 27 02:34:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 553 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 9B42127BBEA; Sun, 27 Feb 2022 02:37:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 6B9CD27BBE9 for ; Sun, 27 Feb 2022 02:37:25 +0000 (GMT) Received: from localhost ([::1]:38066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9R6-0005tG-KH for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:37:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42054) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Ql-0005RW-A3 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Ql-0006Cz-10 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Qk-0004BI-VO for guix-patches@gnu.org; Sat, 26 Feb 2022 21:37:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 04/24] gnu: racket-minimal: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592941616034 (code B ref 53878); Sun, 27 Feb 2022 02:37:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:56 +0000 Received: from localhost ([127.0.0.1]:56532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Qd-0004AX-Ea for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:56 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:38622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Qa-0004AH-T3 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:36:53 -0500 Received: by mail-qv1-f51.google.com with SMTP id d3so9828299qvb.5 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kh4rfDLnITEVr2rk6e8MVsWsEJkJF3STyUL0fXwg1Mk=; b=Jp5HS3c678j2SyVn45bapL0v8cgEg8kwvBZDFbvsiTH4X6lCUCfDr98pn3n6Mi1HUE kjHh1d9zX/J4r7FgziqGwLKME1/rR5bRJs+5Gc7yf6yg8bBdN0dCWge40DG+vVYLcDG0 MIhF+d8M+Sm2bLeImjl+SpjJMfkKkeeP592b7VBxDuajAuEisIBFGykyd2kSyLZ5tqNE cT6uteqG+H+z/0+QTv+rxDHzFxd847qMHjtZCwJcEmcyuCnKQKLP4hbcBVwcFM9WdBJA wiOlAGgNi9FNi/Lty+LJtXikKlELVDsQ4LcbgXDhGZy+mA6ahNDSHtDDobxJ4NJytwDT oIag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kh4rfDLnITEVr2rk6e8MVsWsEJkJF3STyUL0fXwg1Mk=; b=7qGx1VbjQFi9V5Z5J/uWIFfR7x+vk7w/8Q+ltXjBTz/j8oAzrmU5OiTEn7NCyNB99d BW121nQ6wriQFhqY+41FIwEAzt14pmtYKO31TR4jOtiHwKc5l4s0CCu2KIWwSX2bKYFn h15CynZjfNJt+jt+bwIqLfSCy3oXFxeT9kSjLwcTu6eOCsKYR1wM8/fGihBdADm4aY5g fSfmaVLhmaVzCFjO+Y9AGgFfeOCsVAfrwjMbbSqrWGRYUyxtnuuJ/MIsnxOlBKa+IUXd AL6Vdm6RSbBPy2wyBzMF0oKreGV8qxXjIm0q8YifnUeZD3NZ2tzlze9ZfixvGX9Z4Zc7 fh8Q== X-Gm-Message-State: AOAM530KOooRgmbS3ByPD9nsbj6RPk7bi47fwAfuAo3NMlkQ+xEusYmo jL3fCK3kM2ND8N3kS+3ZWOC5imYuTcqGN0FZBJI= X-Google-Smtp-Source: ABdhPJyThIa7HoIHhSwqsTMhZxKSGaDM5KwujwvDdnEVWidsHqw+eA5hlgZj78yxQ1uD2auX9UQCKA== X-Received: by 2002:a05:6214:d4c:b0:432:c2db:ebe3 with SMTP id 12-20020a0562140d4c00b00432c2dbebe3mr6358549qvr.115.1645929407039; Sat, 26 Feb 2022 18:36:47 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id g2-20020a37e202000000b00607e264a208sm3208672qki.40.2022.02.26.18.36.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:36:46 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:30 -0500 Message-Id: <20220227023450.1877215-5-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt, cfg-glag:enable-racket): Change to G-expressions and combine in ... (racket-vm-common-configure-flags): ... this new thunk. (unpack-nanopass+stex): Change to G-expression and move to ... (make-unpack-nanopass+stex): ... this new thunk. (racket-bootstrap-chez-bootfiles): Rename to ... (chez-scheme-for-racket-bootstrap-bootfiles): ... this new variable, and stop inheriting from 'racket-minimal'. [native-inputs]: Remove labels. [build-system]: Use 'copy-build-system'. [arguments]: Use G-expressions. Install under "lib". (racket-minimal)[inputs, native-inputs]: Remove labels. [arguments]: Use G-expressions. Avoid 'assoc-ref'. Adapt to changes in 'chez-scheme-for-racket-bootstrap-bootfiles'. (racket-minimal-bc-3m)[native-inputs]: Remove labels. [arguments]: Use G-expressions. (racket-minimal-bc-cgc)[native-inputs]: Remove labels. [arguments]: Use G-expressions. --- gnu/packages/racket.scm | 332 ++++++++++++++++++++-------------------- 1 file changed, 163 insertions(+), 169 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index c4e5ee1311..55fdb28fdd 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -26,6 +26,7 @@ (define-module (gnu packages racket) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -99,7 +100,7 @@ (define-module (gnu packages racket) ;; Code: (define %racket-version "8.4") -;; ^ Remember to update racket-bootstrap-chez-bootfiles! +;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -133,34 +134,42 @@ (define %racket-origin ;; Unbundle libffi. (delete-file-recursively "racket/src/bc/foreign/libffi"))))) -(define cfg-flag:sh-for-rktio - `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - (assoc-ref %build-inputs "sh") - "/bin/sh")) -(define cfg-flag:enable-lt - `(string-append "--enable-lt=" - (assoc-ref %build-inputs "libtool") - "/bin/libtool")) -(define cfg-flag:enable-racket - `(let ((racket (assoc-ref %build-inputs "racket"))) - (string-append "--enable-racket=" - racket - "/bin/racket"))) +(define (racket-vm-common-configure-flags) + ;; under a lambda abstraction to avoid evaluating bash-minimal too early. + #~`(,@(cond + ((false-if-exception + (search-input-file %build-inputs "/bin/libtool")) + => (lambda (libtool) + (list (string-append "--enable-lt=" libtool)))) + (else + '())) + ,@(cond + ((false-if-exception + (search-input-file %build-inputs "/bin/racket")) + => (lambda (racket) + (list (string-append "--enable-racket=" racket)))) + (else + '())) + ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" + #$(file-append bash-minimal "/bin/sh")))) -(define unpack-nanopass+stex - ;; Copied from chez-scheme. - ;; TODO: Eventually, we should refactor Chez Scheme - ;; enough to share more directly, so that we can make - ;; Racket's version of Chez avalable as a Guix package, - ;; e.g. for architectures not supported upstream. - ;; For now, we let Racket drive the Chez build process - ;; other than this step. - `(for-each (lambda (dep) - (define src - (assoc-ref (or native-inputs inputs) dep)) - (copy-recursively src dep - #:keep-mtime? #t)) - '("nanopass" "stex"))) +(define (make-unpack-nanopass+stex) + ;; Adapted from chez-scheme. + ;; Thunked to avoid evaluating 'chez-scheme' too early. + ;; TODO: Refactor enough to share this directly. + #~(begin + (copy-recursively + #$(match (assoc-ref (package-native-inputs chez-scheme) + "nanopass") + ((src) + src)) + "nanopass" + #:keep-mtime? #t) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) (define-public racket-minimal @@ -169,91 +178,87 @@ (define-public racket-minimal (version %racket-version) (source %racket-origin) (inputs - `(;; common to all racket-minimal variants: - ("openssl" ,openssl) - ("sqlite" ,sqlite) - ("sh" ,bash-minimal) ;; <- for `system` - ("ncurses" ,ncurses) ;; <- for #%terminal - ;; only for CS - ("zlib" ,zlib) - ("lz4" ,lz4))) + (list + ;; common to all racket-minimal variants: + openssl + sqlite + bash-minimal ;; <- for `system` + ncurses ;; <- for #%terminal + ;; only for CS + zlib + lz4)) (native-inputs - `(("bootfiles" ,racket-bootstrap-chez-bootfiles) - ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) + (list chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m)) (build-system gnu-build-system) (arguments - `(#:configure-flags - (list "--enable-csonly" - "--enable-libz" - "--enable-liblz4" - ,cfg-flag:enable-racket - ,cfg-flag:sh-for-rktio) - #:out-of-source? #true - ;; Tests are in packages like racket-test-core and - ;; main-distribution-test that aren't part of the main distribution. - #:tests? #f - #:modules ((ice-9 match) + (list + #:configure-flags + #~(cons* "--enable-csonly" + "--enable-libz" + "--enable-lz4" + #$(racket-vm-common-configure-flags)) + ;; Tests are in packages like racket-test-core and + ;; main-distribution-test that aren't part of the main + ;; distribution. + #:tests? #f + ;; Upstream recommends #:out-of-source?, and it does + ;; help with debugging, but it confuses `install-license-files`. + #:modules '((ice-9 match) + (ice-9 regex) (guix build gnu-build-system) (guix build utils)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - ,unpack-nanopass+stex) - #t)) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (string-append (assoc-ref inputs "bootfiles") "/boot") - "boot")) - #t)) - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f ,@(map (lambda (lib) - (string-append (assoc-ref inputs lib) - "/lib")) - '("openssl" - "sqlite")))) - (build-stamp . "") - (catalogs - . (,(string-append - "https://download.racket-lang.org/releases/" - ,version - "/catalog/") - #f)))))) - #t)) - (add-before 'configure 'change-directory - (lambda _ - (chdir "racket/src") - #t)) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda* (#:key outputs #:allow-other-keys) - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append (assoc-ref outputs "out") - "/share/racket/pkgs")) - #t))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (with-directory-excursion "racket/src/ChezScheme" + #$(make-unpack-nanopass+stex)))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot")))) + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((lib-search-dirs + . (#f #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib"))) + (build-stamp . "") + (catalogs + . (,(string-append + "https://download.racket-lang.org/releases/" + #$(package-version this-package) + "/catalog/") + #f)))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (add-after 'install 'remove-pkgs-directory + ;; If the configured pkgs-dir exists, "pkgs.rktd" does not + ;; exist, and a lock file does not exist, commands like + ;; `raco pkg show` will try to create a lock file and fail + ;; due to the read-only store. + ;; Arguably this may be a bug in `pkg/private/lock`: + ;; see . + ;; As a workaround, remove the directory. + (lambda args + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append #$output "/share/racket/pkgs"))))))) (home-page "https://racket-lang.org") (synopsis "Racket without bundled packages such as DrRacket") (description @@ -269,7 +274,6 @@ (define (write-racket-hash alist) ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) - (define-public racket-minimal-bc-3m (hidden-package (package @@ -280,21 +284,19 @@ (define-public racket-minimal-bc-3m (prepend libffi) ;; <- only for BC variants (delete "zlib" "lz4"))) (native-inputs - `(("libtool" ,libtool) - ("racket" ,(if (%current-target-system) - racket-minimal - racket-minimal-bc-cgc)))) + (list libtool + (if (%current-target-system) + racket-minimal + racket-minimal-bc-cgc))) (arguments (substitute-keyword-arguments (package-arguments racket-minimal) ((#:configure-flags _ '()) - `(list "--enable-bconly" - ,cfg-flag:enable-racket - ,cfg-flag:enable-lt - ,cfg-flag:sh-for-rktio)) - ((#:phases usual-phases) - `(modify-phases ,usual-phases - (delete 'unpack-nanopass+stex) - (delete 'unpack-bootfiles))))) + #~(cons "--enable-bconly" + #$(racket-vm-common-configure-flags))) + ((#:phases cs-phases) + #~(modify-phases #$cs-phases + (delete 'unpack-nanopass+stex) + (delete 'unpack-bootfiles))))) (synopsis "Minimal Racket with the BC [3M] runtime system") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -309,19 +311,16 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) - (define-public racket-minimal-bc-cgc (package (inherit racket-minimal-bc-3m) (name "racket-minimal-bc-cgc") - (native-inputs - (alist-delete "racket" (package-native-inputs racket-minimal-bc-3m))) + (native-inputs (list libtool)) (arguments (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) ((#:configure-flags _ '()) - `(list "--enable-cgcdefault" - ,cfg-flag:enable-lt - ,cfg-flag:sh-for-rktio)))) + #~(cons "--enable-cgcdefault" + #$(racket-vm-common-configure-flags))))) (synopsis "Old Racket implementation used for bootstrapping") (description "This variant of the Racket BC (``before Chez'' or ``bytecode'') implementation is not recommended for general use. It uses @@ -334,47 +333,42 @@ (define-public racket-minimal-bc-cgc also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector."))) - -(define-public racket-bootstrap-chez-bootfiles - (hidden-package - (package - (inherit racket-minimal) - (name "racket-bootstrap-chez-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. - (inputs `()) - (native-inputs - `(("racket" ,(if (%current-target-system) - racket-minimal - racket-minimal-bc-3m)) - ("stex" ,@(assoc-ref (package-native-inputs chez-scheme) "stex")) - ("nanopass" ,@(assoc-ref (package-native-inputs chez-scheme) - "nanopass")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - ,unpack-nanopass+stex) - #t)) - (delete 'configure) - (delete 'patch-generated-file-shebangs) - (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (invoke (string-append (assoc-ref inputs "racket") - "/bin/racket") - "rktboot/main.rkt" - "--dest" (assoc-ref outputs "out"))) - #t)) - (delete 'check) - (delete 'install)))) - (synopsis "Chez Scheme bootfiles bootstrapped by Racket") - (description "Chez Scheme is a self-hosting compiler: building it +(define-public chez-scheme-for-racket-bootstrap-bootfiles + (package + (name "chez-scheme-for-racket-bootstrap-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source %racket-origin) + (inputs `()) + (native-inputs (list racket-minimal-bc-3m)) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list + #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + #$(make-unpack-nanopass+stex))) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/bin/racket") + "rktboot/main.rkt")))))) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it requires ``bootfiles'' containing the Scheme-implemented portions compiled for the current platform. (Chez can then cross-compile bootfiles for all other supported platforms.) @@ -389,7 +383,7 @@ (define-public racket-bootstrap-chez-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream Chez Scheme.") - (license (list license:asl2.0))))) + (license (list license:asl2.0)))) (define (racket-packages-origin name origin spec0 . spec*) "Extract from ORIGIN the sources for the Racket packages specified by SPEC0 From patchwork Sun Feb 27 02:34:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 554 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 9570627BBEA; Sun, 27 Feb 2022 02:38:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 5ECA727BBE9 for ; Sun, 27 Feb 2022 02:38:21 +0000 (GMT) Received: from localhost ([::1]:38420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9S0-0006BC-Hj for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:38:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Ri-00069y-QP for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Ri-0006Kl-I2 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Ri-0004Dz-FB for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 05/24] gnu: racket-minimal: Don't configure non-existant catalogs. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592943116116 (code B ref 53878); Sun, 27 Feb 2022 02:38:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:11 +0000 Received: from localhost ([127.0.0.1]:56539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Qt-0004Br-AP for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:11 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:40877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Qs-0004Bf-0q for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:10 -0500 Received: by mail-qk1-f180.google.com with SMTP id c7so7809210qka.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qhdWaxK2B/8GZiVT+44S8xPk0GiXuviwUE1ruX+vVGs=; b=KHGrq7Eu/kU2aQQ8bVHHmF3rhUXInngPkhvfu582EwI1w1+kmi4Eyc9WCKzYmXPkuG lmJJGezU/MraXcnT2a+ufUz/RMFoatkI9IItaYwJXINgqMgLM/LX5NpkMzmcTapxdYjg 6PGiHoc9N0nDtss7k4Cjw5UKTOVfoXr+Ump1IDJSwOwyA4M5xzYAoiUFHTIY5++/lwU6 p3MiHWod9IjP20tk+/uNYJTZsi28WFcOOISHs7aN4VpMBU80ofqBna4gtj5YupBJXRX6 zX+AwB0A/OkzJDcP182gs9kCDwNvREfJFUgjYTTxnjjKcSD6w9oCQuzmXKLu361Zs5iN rSiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qhdWaxK2B/8GZiVT+44S8xPk0GiXuviwUE1ruX+vVGs=; b=AS+/ZR87jzCFmdD4ptQVgDE1nN9Ibom8OUX0tWfrZGOpOikL6Oqh6wrLeXmll/nEui YA8+2udFlavR0fR2EI0hHANq5z98apAqaqw630wVhN6Ul6Vp9mBxRz/Aj4RkJK48dWZs djR1B+b9CjM7fKHZaCJQYUL77kzWqVc3CZ/VRH6CTCZsI2H/mIQbTxwfGWh0H59QUylU nuI9BMuY4h8ZqC0yrSo6YSbnx9YyS+vbz8c3NyA0jSnyM0D+QYNx6DtjIH6GmTAZ8vN5 HHYm0Um5bZS4eDMdJUkrdElEA1peonTG2KlyT+MPKP/UFmlq+vVR0/wkNCuqffqGVedO /Xig== X-Gm-Message-State: AOAM530LZD7O6jYpHcI7zek47j9hj6bgJwLRPIjyHF9vC06W/N7tFqYE a8sjAfwCmxXJbuoadYLk0oJQ2t/tcFRkKk5n3d8= X-Google-Smtp-Source: ABdhPJxRUlbeRdqLVC7n7lm6BmFwF+mmJpkMViZPc4lQRrJfW7BqaXJoMb1YBhCSG3TPQSQ5ePN5dQ== X-Received: by 2002:a05:620a:3713:b0:648:d836:8153 with SMTP id de19-20020a05620a371300b00648d8368153mr8408824qkb.674.1645929424495; Sat, 26 Feb 2022 18:37:04 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 185-20020a3706c2000000b0060df89eb3ecsm3403593qkg.60.2022.02.26.18.36.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:04 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:31 -0500 Message-Id: <20220227023450.1877215-6-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-minimal)[arguments]<#:phases>: Change 'initialize-config.rktd' to only add a release catalog when the package version is a release version. --- gnu/packages/racket.scm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 55fdb28fdd..b828bbbd3d 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -231,6 +231,15 @@ (define (write-racket-hash alist) (format #t "(~s . ~s)" k v))) alist) (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) (mkdir-p "racket/etc") (with-output-to-file "racket/etc/config.rktd" (lambda () @@ -239,12 +248,8 @@ (define (write-racket-hash alist) . (#f #$(file-append (this-package-input "openssl") "/lib") #$(file-append (this-package-input "sqlite") "/lib"))) (build-stamp . "") - (catalogs - . (,(string-append - "https://download.racket-lang.org/releases/" - #$(package-version this-package) - "/catalog/") - #f)))))))) + (catalogs ,@maybe-release-catalog + #f))))))) (add-before 'configure 'chdir (lambda _ (chdir "racket/src"))) From patchwork Sun Feb 27 02:34:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 555 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 B458827BBEA; Sun, 27 Feb 2022 02:38:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 E918D27BBE9 for ; Sun, 27 Feb 2022 02:38:21 +0000 (GMT) Received: from localhost ([::1]:38422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9S1-0006BU-3x for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:38:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006AO-9a for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006Kv-1B for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Ri-0004E7-T9 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592945216157 (code B ref 53878); Sun, 27 Feb 2022 02:38:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:32 +0000 Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9R9-0004CQ-L7 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:32 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:33681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9R7-0004CD-2T for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:26 -0500 Received: by mail-qt1-f171.google.com with SMTP id bt3so6088687qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=; b=OhNvuqmvJMii+fwQAq6EBmkU/fLNPhc/V796bGt8Vjc6wpWvnbuOZ/3z0HBdbIGeUs iPbnxSOJXFzdLDnobKYssJSNB0PeeudiAlSz8nvLreOoKwD3D30085W83idVtAdLYJob ifrhlaDsfkRISgyO1oMyKo7LjtcA8pIfMVpb4mIE4Iv0pkhb6RFJed7UxunL4CpX508B Mad0TdZ0P1YZT5RyuoWBwEMWzCLlAW0gscaNb1R+9Ezk0b14nb+tjgKDCJzfipDXWkYb akpUskV8sFPaVO1mBw4qkI5fiGf86daZTMenF6qp+NtZO0m3GAA/mOhQUv/VSB/SLQv5 q0UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=; b=pnR6BPCTOr5FQncfDz4EyuHeb50KM4XqEE6ryX5By4+QnmMd2Jb2FhfskvWDKLlK+G qIlWuF/6ihfB4j9tiwVCoADba250m4+yg7B+O4WwyfCoLMc2UsxiRd4h+H+bzIRsBTmY wnhoNcOVGM5ymAcJqOI2WjpRiN73Os9GRnq9XtIZdj9AhJFYNKhwhOJhIhNARcm3U7AS Vd+rJlKoYWH5Xi9pm9pk1y/jMzqYq+fyAvmIbFN493jdr8zBtObgsBOjHpO9ITZZ9AK7 bde9FCYDf8RD5sMFMZDnS9fKsKP42DcjilJcDHp6/EJJ7y9qf9KZWOvr6GvfGkoQtOx4 AoOA== X-Gm-Message-State: AOAM533GfkG8DykPBKrnNvPBwvMPdZAJI+v2gwFg60LnAwyjNujX4wct rEATdL/A1KfortSlOYyOGPcSrjLmIaYyju8iN44= X-Google-Smtp-Source: ABdhPJwz3SunO7W2AsW7OhmSpZDzGxjGoD2h3dpLCvcjn+r+bfdVCT9NeD/r/cD/RMcVStqeLZxhhw== X-Received: by 2002:a05:622a:8d:b0:2dd:d979:bc46 with SMTP id o13-20020a05622a008d00b002ddd979bc46mr12374086qtw.342.1645929439440; Sat, 26 Feb 2022 18:37:19 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id o21-20020ac85a55000000b002d7847160c0sm4140270qta.82.2022.02.26.18.37.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:19 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:32 -0500 Message-Id: <20220227023450.1877215-7-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 Having the package inheritance chain go in the same direction as the bootstrapping chain, rather than the opposite, is less confusing. In some cases, it can also help to avoid unnecessary rebuilds. * gnu/packages/racket.scm (racket-minimal-bc-cgc): Change to be the root of the package inheritance chain. [version, source, inputs, native-inputs, build-system, arguments, home-page, license]: Inline formerly inherited values. (racket-minimal-bc-3m): Inherit from 'racket-minimal-bc-cgc' rather than 'racket-minimal'. [inputs, native-inputs, arguments, license]: Adjust accordingly. (racket-minimal): Inherit from 'racket-minimal-bc-3m'. [inputs, native-inputs, arguments, license]: Adjust accordingly. [properties]: Override effect of 'hidden-package'. --- gnu/packages/racket.scm | 130 +++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index b828bbbd3d..00f4fef49f 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Pierre Neidhardt -;;; Copyright © 2021 Philip McGrath +;;; Copyright © 2021, 2022 Philip McGrath ;;; Copyright © 2021 jgart ;;; ;;; This file is part of GNU Guix. @@ -172,9 +172,9 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) -(define-public racket-minimal +(define-public racket-minimal-bc-cgc (package - (name "racket-minimal") + (name "racket-minimal-bc-cgc") (version %racket-version) (source %racket-origin) (inputs @@ -184,19 +184,14 @@ (define-public racket-minimal sqlite bash-minimal ;; <- for `system` ncurses ;; <- for #%terminal - ;; only for CS - zlib - lz4)) - (native-inputs - (list chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m)) + ;; only for BC variants: + libffi)) + (native-inputs (list libtool)) ;; <- only for BC variants (build-system gnu-build-system) (arguments (list #:configure-flags - #~(cons* "--enable-csonly" - "--enable-libz" - "--enable-lz4" + #~(cons* "--enable-cgcdefault" #$(racket-vm-common-configure-flags)) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main @@ -210,17 +205,6 @@ (define-public racket-minimal (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda args - (with-directory-excursion "racket/src/ChezScheme" - #$(make-unpack-nanopass+stex)))) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (search-input-directory (or native-inputs inputs) - "lib/chez-scheme-bootfiles") - "boot")))) (add-before 'configure 'initialize-config.rktd (lambda* (#:key inputs #:allow-other-keys) (define (write-racket-hash alist) @@ -265,43 +249,37 @@ (define maybe-release-catalog ;; rmdir because we want an error if it isn't empty (rmdir (string-append #$output "/share/racket/pkgs"))))))) (home-page "https://racket-lang.org") - (synopsis "Racket without bundled packages such as DrRacket") - (description - "Racket is a general-purpose programming language in the Scheme family, -with a large set of libraries and a compiler based on Chez Scheme. Racket is -also a platform for language-oriented programming, from small domain-specific -languages to complete language implementations. + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or +``bytecode'') implementation is not recommended for general use. It uses +CGC (a ``Conservative Garbage Collector''), which was succeeded as default in +PLT Scheme version 370 (which translates to 3.7 in the current versioning +scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the +Racket CS implementation. -The ``minimal Racket'' distribution includes just enough of Racket for you to -use @command{raco pkg} to install more. Bundled packages, such as the -DrRacket IDE, are not included.") +Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +also be used for embedding applications without the annotations needed in C +code to use the 3M garbage collector.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list license:asl2.0 license:expat)))) + (license (list license:lgpl3+ license:asl2.0 license:expat)) + ;; Eventually, it may make sense for some vm packages to not be hidden, + ;; but this one is especially likely to remain hidden. + (properties `((hidden? . #t))))) (define-public racket-minimal-bc-3m (hidden-package (package - (inherit racket-minimal) + (inherit racket-minimal-bc-cgc) (name "racket-minimal-bc-3m") - (inputs - (modify-inputs (package-inputs racket-minimal) - (prepend libffi) ;; <- only for BC variants - (delete "zlib" "lz4"))) (native-inputs - (list libtool - (if (%current-target-system) - racket-minimal - racket-minimal-bc-cgc))) + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (prepend racket-minimal-bc-cgc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal) + (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))) - ((#:phases cs-phases) - #~(modify-phases #$cs-phases - (delete 'unpack-nanopass+stex) - (delete 'unpack-bootfiles))))) + #$(racket-vm-common-configure-flags))))) (synopsis "Minimal Racket with the BC [3M] runtime system") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -316,27 +294,53 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) -(define-public racket-minimal-bc-cgc +(define-public racket-minimal (package (inherit racket-minimal-bc-3m) - (name "racket-minimal-bc-cgc") - (native-inputs (list libtool)) + (name "racket-minimal") + (inputs + (modify-inputs (package-inputs racket-minimal-bc-cgc) + (prepend zlib lz4) + (delete "libffi"))) + (native-inputs + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (delete "libtool") + (prepend chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m))) (arguments (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) + ((#:phases bc-phases) + #~(modify-phases #$bc-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (with-directory-excursion "racket/src/ChezScheme" + #$(make-unpack-nanopass+stex)))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot")))))) ((#:configure-flags _ '()) - #~(cons "--enable-cgcdefault" - #$(racket-vm-common-configure-flags))))) - (synopsis "Old Racket implementation used for bootstrapping") - (description "This variant of the Racket BC (``before Chez'' or -``bytecode'') implementation is not recommended for general use. It uses -CGC (a ``Conservative Garbage Collector''), which was succeeded as default in -PLT Scheme version 370 (which translates to 3.7 in the current versioning -scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the -Racket CS implementation. + #~(cons* "--enable-csonly" + "--enable-libz" + "--enable-lz4" + #$(racket-vm-common-configure-flags))))) + (synopsis "Racket without bundled packages such as DrRacket") + (description + "Racket is a general-purpose programming language in the Scheme family, +with a large set of libraries and a compiler based on Chez Scheme. Racket is +also a platform for language-oriented programming, from small domain-specific +languages to complete language implementations. -Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may -also be used for embedding applications without the annotations needed in C -code to use the 3M garbage collector."))) +The ``minimal Racket'' distribution includes just enough of Racket for you to +use @command{raco pkg} to install more. Bundled packages, such as the +DrRacket IDE, are not included.") + (properties `()) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) (define-public chez-scheme-for-racket-bootstrap-bootfiles (package From patchwork Sun Feb 27 02:34:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 556 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 964FF27BBEA; Sun, 27 Feb 2022 02:38:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 D33C027BBE9 for ; Sun, 27 Feb 2022 02:38:30 +0000 (GMT) Received: from localhost ([::1]:38870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9SA-0006UE-0H for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:38:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006Aa-Je for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34421) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006L1-BM for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Rj-0004EE-9A for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 07/24] gnu: racket-minimal: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592945916177 (code B ref 53878); Sun, 27 Feb 2022 02:38:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:39 +0000 Received: from localhost ([127.0.0.1]:56545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9RK-0004Cq-Oa for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:39 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:40654) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9RJ-0004CW-3h for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:38 -0500 Received: by mail-qt1-f176.google.com with SMTP id t28so6101421qtc.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=URmEbdRV5afr0Wl6KJozuWiNZEFz6so5nG8+6QKZKZU=; b=HtDjqqUUUQFbowFAMMBCy99xPS5V1mQ8owkm2AV8qITaRFaiYRYlOaDgwzkqzJKvj5 C2T6OO11rAKM5q5mYjvEJp+5vEIWL9hL5Vr/IWX9wiAspyYuGAqY1LAGct0gJFxMYCuC thqJMgZThJTgHbM58QAgLGXwWJ5lAfPEc85pKlMPY02uBqzNEBSm91oOIufWrvtfl1Tl AmLww36XHgjn5hdTMTb8gfHAPsFrRvq5yalQbLZxmGPhu7W8LT4jr8ugB6PQREK3uPF0 d5mbnVm/MRk1R4MOzaE/0CVmp5iwmvrcgq9n3WU4hlKlIoSrlSeQD9FUnvamtk5r4lGH FD3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=URmEbdRV5afr0Wl6KJozuWiNZEFz6so5nG8+6QKZKZU=; b=6pR6U8kOPSdEdeZzuM90Wp93XSZIy1pPyePFQw3oC/Kmautojl8zP6TFXCfTsHJHBg sgWap9PkfrPNi4R78t2R85ymKOTH7C5dvRUtB80fP7vHlnNEe4tDcSzaWI8TJj4nkH4N V+4a9MPKsE3rf6CajdoXJwREoJd1Fi5uWHg2hjq5RN3YlsEL7r8UQde/ntGuSaQrkcYF Lu64zrZ7MHDLbvT8fa8IoX+XcBV6+4aU/X9q74mAcYTmVUwr9yIoiJbhas3nWgSwl6zt LMz42EMprB7qYaoVrLA6nWm+P9uPVZwDZC27VkuT9vP/cJOSvgIBER6BdYfG6jymNc8v blwA== X-Gm-Message-State: AOAM532QUL68bXzZMmyk9u/PSFGx/ktQGsEwicuKFNUuWm6gN4gomkZ8 QMRkcQbGbem1M1Q2LAnXK7psJPbZq+TnFKu/N9s= X-Google-Smtp-Source: ABdhPJwZ0znjb7ewv421jCZVxJwkZbFkLlAOnhP14jJFv8cQkcliDSrG52s7yYTIDAy8fRldNUBtzg== X-Received: by 2002:ac8:5b56:0:b0:2dd:b428:d2cc with SMTP id n22-20020ac85b56000000b002ddb428d2ccmr12225625qtw.304.1645929451411; Sat, 26 Feb 2022 18:37:31 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id v26-20020a05622a189a00b002ddd1f76c2fsm4274384qtc.17.2022.02.26.18.37.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:31 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:33 -0500 Message-Id: <20220227023450.1877215-8-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-minimal-bc-cgc): Use 'hidden-package' rather than 'properties'. (racket-minimal-bc-3m): Remove redundant 'hidden-package' wrapper. --- gnu/packages/racket.scm | 201 ++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 101 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 00f4fef49f..ca0c09be58 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -173,84 +173,87 @@ (define (make-unpack-nanopass+stex) (define-public racket-minimal-bc-cgc - (package - (name "racket-minimal-bc-cgc") - (version %racket-version) - (source %racket-origin) - (inputs - (list - ;; common to all racket-minimal variants: - openssl - sqlite - bash-minimal ;; <- for `system` - ncurses ;; <- for #%terminal - ;; only for BC variants: - libffi)) - (native-inputs (list libtool)) ;; <- only for BC variants - (build-system gnu-build-system) - (arguments - (list - #:configure-flags - #~(cons* "--enable-cgcdefault" - #$(racket-vm-common-configure-flags)) - ;; Tests are in packages like racket-test-core and - ;; main-distribution-test that aren't part of the main - ;; distribution. - #:tests? #f - ;; Upstream recommends #:out-of-source?, and it does - ;; help with debugging, but it confuses `install-license-files`. - #:modules '((ice-9 match) - (ice-9 regex) - (guix build gnu-build-system) - (guix build utils)) - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (define maybe-release-catalog - (let ((v #$(package-version this-package))) - (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" - v) - `(,(string-append - "https://download.racket-lang.org/releases/" - v - "/catalog/")) - '()))) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f #$(file-append (this-package-input "openssl") "/lib") - #$(file-append (this-package-input "sqlite") "/lib"))) - (build-stamp . "") - (catalogs ,@maybe-release-catalog - #f))))))) - (add-before 'configure 'chdir - (lambda _ - (chdir "racket/src"))) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda args - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append #$output "/share/racket/pkgs"))))))) - (home-page "https://racket-lang.org") - (synopsis "Old Racket implementation used for bootstrapping") - (description "This variant of the Racket BC (``before Chez'' or + ;; Eventually, it may make sense for some vm packages to not be hidden, + ;; but this one is especially likely to remain hidden. + (hidden-package + (package + (name "racket-minimal-bc-cgc") + (version %racket-version) + (source %racket-origin) + (inputs + (list + ;; common to all racket-minimal variants: + openssl + sqlite + bash-minimal ;; <- for `system` + ncurses ;; <- for #%terminal + ;; only for BC variants: + libffi)) + (native-inputs (list libtool)) ;; <- only for BC variants + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(cons* "--enable-cgcdefault" + #$(racket-vm-common-configure-flags)) + ;; Tests are in packages like racket-test-core and + ;; main-distribution-test that aren't part of the main + ;; distribution. + #:tests? #f + ;; Upstream recommends #:out-of-source?, and it does + ;; help with debugging, but it confuses `install-license-files`. + #:modules '((ice-9 match) + (ice-9 regex) + (guix build gnu-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((lib-search-dirs + . (#f #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib"))) + (build-stamp . "") + (catalogs ,@maybe-release-catalog + #f))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (add-after 'install 'remove-pkgs-directory + ;; If the configured pkgs-dir exists, "pkgs.rktd" does not + ;; exist, and a lock file does not exist, commands like + ;; `raco pkg show` will try to create a lock file and fail + ;; due to the read-only store. + ;; Arguably this may be a bug in `pkg/private/lock`: + ;; see . + ;; As a workaround, remove the directory. + (lambda args + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append #$output "/share/racket/pkgs"))))))) + (home-page "https://racket-lang.org") + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or ``bytecode'') implementation is not recommended for general use. It uses CGC (a ``Conservative Garbage Collector''), which was succeeded as default in PLT Scheme version 370 (which translates to 3.7 in the current versioning @@ -260,28 +263,24 @@ (define maybe-release-catalog Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector.") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:lgpl3+ license:asl2.0 license:expat)) - ;; Eventually, it may make sense for some vm packages to not be hidden, - ;; but this one is especially likely to remain hidden. - (properties `((hidden? . #t))))) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:lgpl3+ license:asl2.0 license:expat))))) (define-public racket-minimal-bc-3m - (hidden-package - (package - (inherit racket-minimal-bc-cgc) - (name "racket-minimal-bc-3m") - (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) - (prepend racket-minimal-bc-cgc))) - (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) - ((#:configure-flags _ '()) - #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))))) - (synopsis "Minimal Racket with the BC [3M] runtime system") - (description "The Racket BC (``before Chez'' or ``bytecode'') + (package + (inherit racket-minimal-bc-cgc) + (name "racket-minimal-bc-3m") + (native-inputs + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (prepend racket-minimal-bc-cgc))) + (arguments + (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) + ((#:configure-flags _ '()) + #~(cons "--enable-bconly" + #$(racket-vm-common-configure-flags))))) + (synopsis "Minimal Racket with the BC [3M] runtime system") + (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written in C targeting architecture-independent bytecode, plus a JIT compiler on most platforms. Racket BC has a different C API and supports a slightly different @@ -290,9 +289,9 @@ (define-public racket-minimal-bc-3m This package is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:lgpl3+ license:asl2.0 license:expat))))) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:lgpl3+ license:asl2.0 license:expat)))) (define-public racket-minimal (package From patchwork Sun Feb 27 02:34:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 557 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 A5FDA27BBEA; Sun, 27 Feb 2022 02:38:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 6E22627BBE9 for ; Sun, 27 Feb 2022 02:38:39 +0000 (GMT) Received: from localhost ([::1]:39096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9SI-0006dz-Lx for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:38:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Rk-0006An-3h for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Rj-0006L9-RI for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Rj-0004EM-Nj for guix-patches@gnu.org; Sat, 26 Feb 2022 21:38:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 08/24] gnu: racket-minimal: Add "debug" output. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:38:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592947316209 (code B ref 53878); Sun, 27 Feb 2022 02:38:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:53 +0000 Received: from localhost ([127.0.0.1]:56548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9RZ-0004DN-CI for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:53 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:38482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9RX-0004D9-9S for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:37:51 -0500 Received: by mail-qt1-f173.google.com with SMTP id bc10so6094742qtb.5 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vj1OeT+wQvOME+8TTCd8YZzCrRZyIzC8PkesAdhbaOQ=; b=GjOxzcSFzNUrYBdOyi5gbFjwV6wDGWmiF3pAhjh7s1+TNSG60KAe/FEjSn0zwauC7v OhrJVchPX/pG+DUU2yLGjePCVrjlvFTjDeQcaITdZyyqvScNAJXoNoQhbPlRQ/JID1uI O2r2+ll0b87tlpJz5dnhZg5RW5G0Vaa9PdN0Fo/fW2CTuzuEnMd+20DBGe9o6VJaglOS lE8vEVsp3NyKR9rPysy4DMEg0Y4BtAESCR68jn3+vVLV6XTJJ1kdxhxIChzs+i4DV5SX ocYD5rOYkR2VbE+UsbWWqd6G6M7WPi2y0LVy5nHNKHRHYg64a+QYAOfKCruBgfGbz+RZ J1+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vj1OeT+wQvOME+8TTCd8YZzCrRZyIzC8PkesAdhbaOQ=; b=3c5f5qNAErOUGge02/ASjVZbfmsDk8R6rWcwQu8vpSuS4gJWai4/UQ6BskyQbYFk3F bDHISNZmxN3MGr4Zn53WFfHrCyY9HCnKe/xxmdg+MM2l3fFPg/1YWtbZfb8ixDxplyVE 4VlVHrh1150uOLMEnUFzxU45jq7FJON1XDlGnaa2zNjZX/lkzVQrdHhBIWeVE7sOuk4p 04trEW0Wscytw8+TqpbzCIU91Z1s+q4Y3KOGAe2Zlh6DnxIISXmYl76lqU72s9nDenBN IqVpV9eRCsopAikvMO/a9JM1OVvxfXlqr0h6QK6crxww8vAc8FR558C87K5Fgd5ctPHz +hsg== X-Gm-Message-State: AOAM533vFYWPR8hW8l9+orQg2AP2IPdosaPk+I+hrZeBR1PuJgkAP6EQ wN8PbYrmfrrif64wEwB3DhMMBMaAHJk6zqU6nz0= X-Google-Smtp-Source: ABdhPJwEaxwHWHsIu1WeP9axCTM7zRjerxzmudj3R+vWGUUt03kwuOH6t/MgHRSulSK9P7OIQ6vLNw== X-Received: by 2002:ac8:7c54:0:b0:2de:746c:bd99 with SMTP id o20-20020ac87c54000000b002de746cbd99mr12153099qtv.150.1645929465754; Sat, 26 Feb 2022 18:37:45 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id y11-20020a05622a004b00b002dea2052d7dsm4373851qtw.12.2022.02.26.18.37.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:45 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:34 -0500 Message-Id: <20220227023450.1877215-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-minimal-bc-cgc)[outputs]: Add "debug". (racket-vm-common-configure-flags): Add "--disable-strip". --- gnu/packages/racket.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index ca0c09be58..69c99f5764 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -151,7 +151,8 @@ (define (racket-vm-common-configure-flags) (else '())) ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - #$(file-append bash-minimal "/bin/sh")))) + #$(file-append bash-minimal "/bin/sh")) + "--disable-strip")) (define (make-unpack-nanopass+stex) ;; Adapted from chez-scheme. @@ -190,6 +191,7 @@ (define-public racket-minimal-bc-cgc ;; only for BC variants: libffi)) (native-inputs (list libtool)) ;; <- only for BC variants + (outputs '("out" "debug")) (build-system gnu-build-system) (arguments (list From patchwork Sun Feb 27 02:34:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 558 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 D0EB727BBEA; Sun, 27 Feb 2022 02:39:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 EF13327BBEB for ; Sun, 27 Feb 2022 02:39:13 +0000 (GMT) Received: from localhost ([::1]:39312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Sr-0006pP-3T for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sh-0006oe-6C for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sg-0006Tx-U5 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sg-0004IK-Pk for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 09/24] gnu: configure-layer.rkt: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592948416280 (code B ref 53878); Sun, 27 Feb 2022 02:39:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:04 +0000 Received: from localhost ([127.0.0.1]:56554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rj-0004EL-Jl for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:04 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]:36570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rh-0004DY-DL for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:01 -0500 Received: by mail-qt1-f175.google.com with SMTP id f18so6101400qtb.3 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=O2S2PRHkG8IvVGmB0WnxootYPk4QM0bZwqLu/W8JFKU=; b=TzbthcmPb90eB0ZhJn/q3d/08+LiNd2zrMPuMO6gvfWeku66LpUP7u93gAO6zo7/0n XFBGFCRp+fVedF27sU0e+/dFrZeAeD2ERbFXfrOZ3b0Flhc/ivX1tdm2eU1U1K36BS8W 0huQKByDpEJeUkZ2E58LRiOAR92xtXEpY21c+3EBrJYs1foTzpT7r+szlZ9YjuoUvASL WZKV2u391ap6T7Xnuoka9IjVhNd6kkpP7TqaFqwKJJPxAX+KMFKz8i6oAZzhI+AuHbnI kYZgZqhHmNBfxe0AWICcDzU+2g2GLXEfxiXgmvq9Iqhw454/f2ZGtEG4lTvhOjYBi06j 3abQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O2S2PRHkG8IvVGmB0WnxootYPk4QM0bZwqLu/W8JFKU=; b=yV44kY2n5ZOpfigIpkQjzLkeRF1d/gHWp3uVvL+6x0hSLrHbXyVZD8Q31H7+tSLXa+ cHUcDkxEJAk9qXXZuHHZ2PRGs+GETGllsrSVNiE7zDdcKVS8HGrqYyqFWV7ez7u2HVd3 bBT/ZHM09up7MENcgwscaNV/UmB6MH8oDemyL4/P9wXfA3akqVVEuzZSf3ADFO1U4XXf KJCRfd7YVjs2tLcZWPBBnaj1mLbjlA9B3z40FO9rM5fMIeXCwyIg4C7/oP+NdsFZbOjP MFfdfEFtyr2BNGw1WBRWyoM3PQehbfQyMqqmLxAV1HyEt3O2kuxdf2aCD+7wHv7s7aPP baig== X-Gm-Message-State: AOAM53000MbeP9NedrHNeL4ICt8vLtcRlgUOwQNu9Nw/4OA17yaLrSHx mZpHaJR9TIfB922T9/p1vCyFxowk83kFlOdnqps= X-Google-Smtp-Source: ABdhPJyGSmvg9wjU/pOR6Kt5I0WdpOxWWAc/Yami+ewkE2PQYN/r+Sv1uxYtKSllsOxpjb5D+gYs7g== X-Received: by 2002:ac8:4e43:0:b0:2df:f8d1:64b3 with SMTP id e3-20020ac84e43000000b002dff8d164b3mr3057230qtw.209.1645929475789; Sat, 26 Feb 2022 18:37:55 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id e8-20020ac85dc8000000b002de409f360fsm4317833qtx.76.2022.02.26.18.37.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:55 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:35 -0500 Message-Id: <20220227023450.1877215-10-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (configure-layer.rkt): Wrap 'command-line' in 'define-values' to reduce rightward drift. --- gnu/packages/racket.scm | 164 ++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 81 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 69c99f5764..4f5f0c1df2 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -926,84 +926,86 @@ (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) (define extra-foreign-lib-search-dirs '()) - (command-line - #:once-each - [("--extra-foreign-lib-search-dirs") dir-list - "foreign library directories, as a list of strings in `read` syntax" - (set! extra-foreign-lib-search-dirs - (call-with-input-string dir-list read))] - #:args (parent-layer prefix) - (let* ([config - (for/fold - ([config (file->value (build-path parent-layer - config-file-pth))]) - ([spec (in-list - '((lib-dir lib-search-dirs "lib/racket") - (share-dir share-search-dirs "share/racket") - (links-file - links-search-files - "share/racket/links.rktd") - (pkgs-dir pkgs-search-dirs "share/racket/pkgs") - (bin-dir bin-search-dirs "bin") - (man-dir man-search-dirs "share/man") - (doc-dir doc-search-dirs "share/doc/racket") - (include-dir - include-search-dirs - "include/racket")))]) - (match-define (list main-key search-key pth) spec) - (hash-set* - config - main-key - (build-path-string prefix pth) - search-key - (list* #f - (hash-ref config - main-key - (build-path-string parent-layer pth)) - (filter values (hash-ref config search-key null)))))] - [config - (hash-update config - 'lib-search-dirs - (lambda (dirs) - ;; add after other layers, but before older - ;; foreign lib search directories - (define-values [rkt old-foreign-dirs] - (partition (lambda (pth) - (or (not pth) - (regexp-match? rx:racket pth))) - dirs)) - (append rkt - extra-foreign-lib-search-dirs - old-foreign-dirs)))] - [config - (hash-set* config - 'apps-dir - (build-path-string prefix "share/applications") - 'absolute-installation? #t - ;; Let Guix coexist with other installation - ;; methods without clobbering user-specific packages. - ;; This could be set in various places, but doing - ;; it here is convienient, at least until we support - ;; cross-compilation. - 'installation-name - (string-append (version) - "-guix" - (match (system-type 'gc) - ['cgc "-cgc"] - ;; workaround Guile reader/printer: - ['|3m| "-bc"] - [_ ""])))] - [bin-dir - (hash-ref config 'bin-dir)] - [config - (hash-set* config - 'config-tethered-apps-dir (hash-ref config 'apps-dir) - 'config-tethered-console-bin-dir bin-dir - 'config-tethered-gui-bin-dir bin-dir)] - [new-config-pth - (build-path prefix config-file-pth)]) - (make-parent-directory* new-config-pth) - (call-with-output-file* - new-config-pth - (lambda (out) - (pretty-write config out)))))))) + (define-values [parent-layer prefix] + (command-line + #:once-each + [("--extra-foreign-lib-search-dirs") dir-list + "foreign library directories, as a list of strings in `read` syntax" + (set! extra-foreign-lib-search-dirs + (call-with-input-string dir-list read))] + #:args (parent-layer prefix) + (values parent-layer prefix))) + (let* ([config + (for/fold + ([config (file->value (build-path parent-layer + config-file-pth))]) + ([spec (in-list + '((lib-dir lib-search-dirs "lib/racket") + (share-dir share-search-dirs "share/racket") + (links-file + links-search-files + "share/racket/links.rktd") + (pkgs-dir pkgs-search-dirs "share/racket/pkgs") + (bin-dir bin-search-dirs "bin") + (man-dir man-search-dirs "share/man") + (doc-dir doc-search-dirs "share/doc/racket") + (include-dir + include-search-dirs + "include/racket")))]) + (match-define (list main-key search-key pth) spec) + (hash-set* + config + main-key + (build-path-string prefix pth) + search-key + (list* #f + (hash-ref config + main-key + (build-path-string parent-layer pth)) + (filter values (hash-ref config search-key null)))))] + [config + (hash-update config + 'lib-search-dirs + (lambda (dirs) + ;; add after other layers, but before older + ;; foreign lib search directories + (define-values [rkt old-foreign-dirs] + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + dirs)) + (append rkt + extra-foreign-lib-search-dirs + old-foreign-dirs)))] + [config + (hash-set* config + 'apps-dir + (build-path-string prefix "share/applications") + 'absolute-installation? #t + ;; Let Guix coexist with other installation + ;; methods without clobbering user-specific packages. + ;; This could be set in various places, but doing + ;; it here is convienient, at least until we support + ;; cross-compilation. + 'installation-name + (string-append (version) + "-guix" + (match (system-type 'gc) + ['cgc "-cgc"] + ;; workaround Guile reader/printer: + ['|3m| "-bc"] + [_ ""])))] + [bin-dir + (hash-ref config 'bin-dir)] + [config + (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [new-config-pth + (build-path prefix config-file-pth)]) + (make-parent-directory* new-config-pth) + (call-with-output-file* + new-config-pth + (lambda (out) + (pretty-write config out))))))) From patchwork Sun Feb 27 02:34:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 561 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 4746127BBE9; Sun, 27 Feb 2022 02:39:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 F35F127BBEC for ; Sun, 27 Feb 2022 02:39:14 +0000 (GMT) Received: from localhost ([::1]:39328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Ss-0006q5-4n for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sh-0006om-U1 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sh-0006U4-LR for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sh-0004IX-H6 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 10/24] gnu: racket-minimal: Separate from the Racket VM. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592949216320 (code B ref 53878); Sun, 27 Feb 2022 02:39:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:12 +0000 Received: from localhost ([127.0.0.1]:56559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rr-0004F8-AW for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:12 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:36577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rm-0004Dl-LM for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:08 -0500 Received: by mail-qt1-f179.google.com with SMTP id f18so6101464qtb.3 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MyqBuKQrh0l2BfKrMcE8f1kV4NNl5lRbW0Psl3d3OiQ=; b=FvZGiDbkVstrWdAEyNk4LEuduQ98RCT60uqNcLZYtV1bL9qc9rUxMJyQsxacx492EF 3YQLJ2HaekqE5ofL17VDfQQ/JFVuCjCIyDNU20LsJeLH0wWFK4VHPmi7A/3Gyu0+9gln 47rc9ARUoOsAAMhjb0KQWKQoJe+i+QQ223Vms4K8Ie175X1M6xDFDufQbCz/fajXqitF fkrZk+bersI9vBZLwgr490IMgOGYa+Ahhi59Kjw3SIgbO7MmGejEm0P8uDOsU8Xs6MbZ osPPL0DCZRsx6UsEXF3KjPzZ/jF/xCdyfyYAW4+SCpLxqXIPcVLpcwK0OZrEXC02jJbn tP8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MyqBuKQrh0l2BfKrMcE8f1kV4NNl5lRbW0Psl3d3OiQ=; b=S/kbKTU6rAXKNrb6FDVCkY4gkuJAvJ9O2D0sEdbotekROR56fbydiswFZYVrmDLy/f lahwXt2KWdV2tU0qvO+QxW6pu1YxYZZOuRT4DI+Ng21qQHPmDG2DOihljVzqDr47dejV DZ4lTnBLaLKZ0RYYAPeNx8OL4l7tAf/H+/iBuBYXcZUnjl3OBU2KAVqezsTtPMsjvtcb YDVqG9bKQC8IjgzIoKXuQG4Wbaj40pXdCmAdwdzkGWDRs4CKksixGZT3wpHlJIHA0NLr DYu8NPNTgzMLtLSKjs+wWMsQIfiaS/3ZIoJ02N7QSrCdaSMUaOT4L2nckKfeiOH3ES1O Xs6w== X-Gm-Message-State: AOAM530rwAmcn9QzBOO7BeYJl3M861RNmrh9bYkbTaJBe4Slk+lAQhy9 gspvObdAb+KPEaddJZ+/J9AMTati/SL3bEZ/utA= X-Google-Smtp-Source: ABdhPJwoWF0tZtaa+FUGbyvkM9J1w/kYkOh7gb00OeR+tjbbkH0OjtZLw/uL0kUx0bsiFnMDs329Xg== X-Received: by 2002:a05:622a:1113:b0:2dd:5385:36c3 with SMTP id e19-20020a05622a111300b002dd538536c3mr12209617qty.262.1645929480317; Sat, 26 Feb 2022 18:38:00 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id t2-20020a05622a01c200b002de5098fbaesm4330154qtw.26.2022.02.26.18.37.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:37:59 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:36 -0500 Message-Id: <20220227023450.1877215-11-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 For consistency with other Racket distributions, 'racket-minimal' should have the "racket-lib" Racket package installed: see . Happily, this gives us a clean boundary between the core Racket VM and compiler, with all of the bootstrapping involved, and building Racket packages and installation layers, which can be handled in a nice, uniform way and eventually turned into a 'racket-build-system'. Building the VM layer as an "in-place" installation should help us use it with other Racket tools. * gnu/packages/racket.scm (racket-vm-common-configure-flags): Add "--enable-origtree". Adapt "--enable-racket=" for "opt/racket-vm/" prefix. (racket-minimal-bc-cgc): Rename to ... (racket-vm-cgc): ... this new variable. [inputs]: Move 'openssl' and 'sqlite' to new 'racket-minimal'. [arguments]<#:strip-directories>: Use "opt/racket-vm/" prefix. <#:phases>: Wrap 'configure', 'patch-shebangs', 'validate-runpath', 'make-dynamic-linker-cache', and 'patch-dot-desktop-files' to use "opt/racket-vm/" prefix. Adapt 'initialize-config.rktd' for removal of 'openssl' and 'sqlite'. [description]: Tweak. (racket-minimal-bc-3m): Rename to ... (racket-vm-bc): ... this new variable. [synopsis, description]: Tweak. (racket-vm-cs): New variable, adapted from the old 'racket-minimal'. (chez-scheme-for-racket-bootstrap-bootfiles)[arguments]<#:phhases>: Adapt to the "opt/racket-vm/" prefix. (racket-minimal): Rewrite like 'racket' using 'racket-vm-cs'. (racket): Inherit from 'racket-minimal'. [inputs]: Add 'racket-vm-cs'. Move "racket-lib" and "base" to 'racket-minimal'. [arguments]<#:make-flags, #:configure-flags>: Override from 'racket-minimal'. (configure-layer.rkt): Adapt to support in-place VM build with possible intermediate layer. --- gnu/packages/racket.scm | 597 ++++++++++++++++++++++++++-------------- 1 file changed, 385 insertions(+), 212 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 4f5f0c1df2..3271e78d45 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -54,7 +54,91 @@ (define-module (gnu packages racket) ;; Commentary: ;; -;; Here's how bootstrapping minimal Racket works: +;; Anatomy of Racket: +;; ------------------ +;; +;; The main Racket Git repository () is +;; organized broadly like this: +;; +;; . +;; ├── Makefile +;; ├── pkgs/ +;; └── racket/ +;; ├── collects/ +;; └── src/ +;; ├── configure +;; ├── Makefile.in +;; ├── bc/ +;; ├── cs/ +;; ├── ChezScheme/ +;; └── ... +;; +;; The 'racket/src/' directory contains the source of the runtime system, core +;; compiler, and primitives for the major Racket implementations: this layer +;; is called the ``Racket VM''. It is basically a normal autotools +;; project. (Even when Racket VM implementations use components implemented in +;; Racket, they are compiled in special modes to produce VM primitives.) +;; (There are or have been experimental Racket VM implementations elsewhere, +;; e.g. .) +;; +;; The 'racket/collects/' directory contains ``built in'' Racket libraries +;; that are not part of any package, including the implementation of +;; 'racket/base': in particular, it must contain enough to implement `raco pkg +;; install'. It is theoretically possible to use the Racket VM layer without +;; the main collections, but it is not stable or useful. +;; +;; The 'pkgs/' directory contains Racket packages that are especially closely +;; tied to the implementation of the Racket VM, including 'compiler-lib', +;; 'racket-doc', and 'racket-test'. Some of these packages depend on Racket +;; packages that are developed in other Git repositories, predominantly but +;; not exclusively under the 'racket' GitHub organization. Conversely, not all +;; of the packages developed in the main Git repository are part of the main +;; Racket distribution. (Additionally, components of the Racket VM that are +;; implemented in Racket can be installed as packages, mostly for ease of +;; development.) +;; +;; The top-level 'Makefile' is more like a directory of scripts: it has +;; convienience targets for developing Racket, and it cooperates with the +;; 'distro-build' package to assemble custom Racket distributions. It is not +;; part of Racket source distributions: the root of a source distribution is +;; basically 'racket/src' with some extra package sources and configuration +;; added. +;; +;; A ''minimal Racket'' installation includes two packages: 'base', which is a +;; sort of bridge between the current ``built-in'' collections and the package +;; system's model of dependencies, and 'racket-lib', which, for installations +;; that can not rely on a system package manager, pulls in the SQLite and +;; OpenSSL shared libraries as platform-specific dependencies for use by the +;; ``built-in'' collections. +;; +;; The main Racket distribution consists of installing the 'main-distribution' +;; package and all of its dependencies. +;; +;; The default mode when building Racket (or installing it with the released +;; installers) is an ``in-place build'', which produces a self-contained, +;; relocatable, roughly FHS-like directory. (Racket also supports +;; ``Unix-style'' installations, which rearrange the parts of an in-place +;; build into Racket-specific subdirectories and generally tries to work for +;; installation into an FHS-based system.) Certain tools, e.g. 'distro-build' +;; and 'raco cross', are able to work with an in-place Racket build. +;; +;; This file defines the packages 'racket-vm-cgc', 'racket-vm-bc', and +;; 'racket-vm-cs'. All three are in-place builds of 'racket/src/' and +;; 'racket/collects/' and are installed to 'opt/racket-vm/' in the store +;; output. The function 'racket-vm-for-system' returns the recomended Racket +;; VM package for a given system. +;; +;; The file 'racket.scm' builds on these packages to define 'racket-minimal' +;; and 'racket' packages. These use Racket's support for ``layered +;; installations'', which allow an immutable base layer to be extended with +;; additional packages. They use the layer configuration directly provide +;; ready-to-install FHS-like trees, rather than relying on the built in +;; ``Unix-style install'' mechanism. +;; +;; Bootstrapping Racket: +;; --------------------- +;; +;; Here's how bootstrapping Racket works: ;; ;; - Racket BC [CGC] can be built with only a C compiler (except for ;; one caveat discussed below). @@ -72,6 +156,10 @@ (define-module (gnu packages racket) ;; ;; So, we build CGC to build 3M to build bootfiles and CS. ;; +;; (Note: since the CGC variant is basically only for bootstrapping, we +;; often use "BC" to mean "3M", consistent with `(banner)` and the +;; suffixes used on executables when more than one variant co-exists.) +;; ;; One remaining bootstrapping limitation is that Racket's reader, module ;; system, and macro expander are implemented in Racket. For Racket CS, ;; they are compiled to R6RS libraries as discussed above. This note from the @@ -145,14 +233,15 @@ (define (racket-vm-common-configure-flags) '())) ,@(cond ((false-if-exception - (search-input-file %build-inputs "/bin/racket")) + (search-input-file %build-inputs "/opt/racket-vm/bin/racket")) => (lambda (racket) (list (string-append "--enable-racket=" racket)))) (else '())) ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" #$(file-append bash-minimal "/bin/sh")) - "--disable-strip")) + "--disable-strip" + "--enable-origtree")) (define (make-unpack-nanopass+stex) ;; Adapted from chez-scheme. @@ -173,31 +262,25 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) -(define-public racket-minimal-bc-cgc +(define-public racket-vm-cgc ;; Eventually, it may make sense for some vm packages to not be hidden, ;; but this one is especially likely to remain hidden. (hidden-package (package - (name "racket-minimal-bc-cgc") + (name "racket-vm-cgc") (version %racket-version) (source %racket-origin) - (inputs - (list - ;; common to all racket-minimal variants: - openssl - sqlite - bash-minimal ;; <- for `system` - ncurses ;; <- for #%terminal - ;; only for BC variants: - libffi)) + (inputs (list ncurses ;; <- common to all variants (for #%terminal) + bash-minimal ;; <- common to all variants (for `system`) + libffi)) ;; <- only for BC variants (native-inputs (list libtool)) ;; <- only for BC variants (outputs '("out" "debug")) (build-system gnu-build-system) (arguments (list #:configure-flags - #~(cons* "--enable-cgcdefault" - #$(racket-vm-common-configure-flags)) + #~(cons "--enable-cgcdefault" + #$(racket-vm-common-configure-flags)) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main ;; distribution. @@ -208,51 +291,72 @@ (define-public racket-minimal-bc-cgc (ice-9 regex) (guix build gnu-build-system) (guix build utils)) + #:strip-directories #~'("opt/racket-vm/bin" + "opt/racket-vm/lib") #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (define maybe-release-catalog - (let ((v #$(package-version this-package))) - (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" - v) - `(,(string-append - "https://download.racket-lang.org/releases/" - v - "/catalog/")) - '()))) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f #$(file-append (this-package-input "openssl") "/lib") - #$(file-append (this-package-input "sqlite") "/lib"))) - (build-stamp . "") - (catalogs ,@maybe-release-catalog - #f))))))) - (add-before 'configure 'chdir - (lambda _ - (chdir "racket/src"))) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda args - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append #$output "/share/racket/pkgs"))))))) + #~(let () + (define* ((wrap-racket-vm-outputs phase) . args) + (apply + phase + (let loop ((args args)) + (match args + ((#:outputs outputs . args) + `(#:outputs + ,(let loop ((outputs outputs)) + (match outputs + ((("out" . out) . outputs) + `(("out" . ,(string-append out "/opt/racket-vm/")) + ,@outputs)) + ((other . outputs) + (cons other (loop outputs))))) + ,@args)) + ((arg . args) + (cons arg (loop args))))))) + (modify-phases %standard-phases + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((build-stamp . "") + (catalogs ,@maybe-release-catalog + #f))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (replace 'configure + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'configure))) + (replace 'patch-shebangs + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'patch-shebangs))) + (replace 'validate-runpath + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'validate-runpath))) + (replace 'make-dynamic-linker-cache + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'make-dynamic-linker-cache))) + (replace 'patch-dot-desktop-files + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'patch-dot-desktop-files))))))) (home-page "https://racket-lang.org") (synopsis "Old Racket implementation used for bootstrapping") (description "This variant of the Racket BC (``before Chez'' or @@ -262,32 +366,33 @@ (define maybe-release-catalog scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the Racket CS implementation. -Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +Racket CGC is primarily used for bootstrapping Racket BC [3M]. It may also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) -(define-public racket-minimal-bc-3m +(define-public racket-vm-bc (package - (inherit racket-minimal-bc-cgc) - (name "racket-minimal-bc-3m") + (inherit racket-vm-cgc) + (name "racket-vm-bc") (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) - (prepend racket-minimal-bc-cgc))) + (modify-inputs (package-native-inputs racket-vm-cgc) + (prepend racket-vm-cgc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) + (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" #$(racket-vm-common-configure-flags))))) - (synopsis "Minimal Racket with the BC [3M] runtime system") + (synopsis "Racket BC [3M] implementation") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written in C targeting architecture-independent bytecode, plus a JIT compiler on most platforms. Racket BC has a different C API and supports a slightly different set of architectures than the current default runtime system, Racket CS (based -on ``Chez Scheme''). +on ``Chez Scheme''). It is the recommended implementation for architectures +that Racket CS doesn't support. This package is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').") @@ -295,23 +400,23 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat)))) -(define-public racket-minimal +(define-public racket-vm-cs (package - (inherit racket-minimal-bc-3m) - (name "racket-minimal") + (inherit racket-vm-bc) + (name "racket-vm-cs") (inputs - (modify-inputs (package-inputs racket-minimal-bc-cgc) + (modify-inputs (package-inputs racket-vm-cgc) (prepend zlib lz4) (delete "libffi"))) (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") (prepend chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m))) + racket-vm-bc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) - ((#:phases bc-phases) - #~(modify-phases #$bc-phases + (substitute-keyword-arguments (package-arguments racket-vm-cgc) + ((#:phases those-phases #~%standard-phases) + #~(modify-phases #$those-phases (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" @@ -328,17 +433,14 @@ (define-public racket-minimal "--enable-libz" "--enable-lz4" #$(racket-vm-common-configure-flags))))) - (synopsis "Racket without bundled packages such as DrRacket") - (description - "Racket is a general-purpose programming language in the Scheme family, -with a large set of libraries and a compiler based on Chez Scheme. Racket is -also a platform for language-oriented programming, from small domain-specific -languages to complete language implementations. + (synopsis "Racket CS implementation") + (description "The Racket CS implementation, which uses ``Chez Scheme'' as +its core compiler and runtime system, has been the default Racket VM +implemetation since Racket 8.0. It performs better than the Racket BC +implementation for most programs. -The ``minimal Racket'' distribution includes just enough of Racket for you to -use @command{raco pkg} to install more. Bundled packages, such as the -DrRacket IDE, are not included.") - (properties `()) +Using the Racket VM packages directly is not recommended: instead, install the +@code{racket-minimal} or @code{racket} packages.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) @@ -353,7 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; When updating, remember to also update %racket-version in racket.scm. (source %racket-origin) (inputs `()) - (native-inputs (list racket-minimal-bc-3m)) + (native-inputs (list racket-vm-bc)) (build-system copy-build-system) ;; TODO: cross compilation (arguments @@ -371,7 +473,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) - "/bin/racket") + "/opt/racket-vm/bin/racket") "rktboot/main.rkt")))))) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, @@ -452,10 +554,116 @@ (define (simple-racket-origin repo hash spec0 . spec*) spec0 spec*)) +(define-public racket-minimal + (package + (name "racket-minimal") + (version %racket-version) + (source #f) + ;; For cross-compilation, Matthew Flatt recommends reusing + ;; as much of `raco cross` as possible. So, put that off until + ;; we have a build system for Racket packages. + (inputs + (list openssl + sqlite + racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-packages-origin + "base" %racket-origin + '("base" "pkgs/base") + '("racket-lib" "pkgs/racket-lib")))) + (build-system gnu-build-system) + (arguments + ;; Here and for the `racket` package, we're using #:configure-flags + ;; to pass flags for `configure-layer.rkt` and #:make-flags + ;; to pass arguments for `raco pkg install`. + (list + #:configure-flags + #~`("--tethered" + "--extra-foreign-lib-search-dirs" + ,(format + #f "~s" + (list #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib")))) + #:make-flags #~`("racket-lib") + #:tests? #f ;; packaged separately + #:modules '((guix build gnu-build-system) + (guix build utils) + (guix build union) + (ice-9 match)) + #:imported-modules `((guix build union) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + (let* ((vm-dir (search-input-directory inputs "opt/racket-vm")) + (racket (string-append vm-dir "/bin/racket"))) + (apply invoke + racket + #$configure-layer.rkt + `(,@(cond + ((false-if-exception + (search-input-file + inputs "etc/racket/config.rktd")) + => (lambda (file) + `("--parent" + ,(dirname (dirname (dirname file)))))) + (else + '())) + ,@configure-flags + ,vm-dir + ,#$output)) + (invoke racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" "setup" + "--no-user")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We use "share/racket/pkgs" for sources to distinguish them + ;; from the "lib/racket/pkgs" of a potential parent layer. + (union-build (string-append #$output "/lib/racket/pkgs") + (search-path-as-list '("share/racket/pkgs") + (map cdr inputs)) + #:create-all-directories? #t))) + (replace 'install + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((racket + (search-input-file inputs "/opt/racket-vm/bin/racket"))) + (unless (null? make-flags) + (invoke racket + "-l-" + "pkg/dirs-catalog" + "--link" + "local-catalog" + (string-append #$output "/lib/racket/pkgs")) + (apply invoke + racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" + "pkg" "install" + "--installation" + "--auto" + "--catalog" "local-catalog" + make-flags)))))))) + (home-page "https://racket-lang.org") + (synopsis "Racket without bundled packages such as DrRacket") + (description + "Racket is a general-purpose programming language in the Scheme family, +with a large set of libraries and a compiler based on Chez Scheme. Racket is +also a platform for language-oriented programming, from small domain-specific +languages to complete language implementations. + +The ``minimal Racket'' distribution includes just enough of Racket for you to +use @command{raco pkg} to install more. Bundled packages, such as the +DrRacket IDE, are not included.") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) + (define-public racket (package + (inherit racket-minimal) (name "racket") - (version %racket-version) (source #f) (inputs (list @@ -474,6 +682,7 @@ (define-public racket unixodbc libedit ;; TODO reconsider in light of expeditor and readline-gpl racket-minimal ;; <-- TODO non-tethered layer + racket-vm-cs ;; TODO (racket-vm-for-system) (simple-racket-origin "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") "2d" "2d-doc" "2d-lib") @@ -482,8 +691,6 @@ (define-public racket '("algol60" ".")) (racket-packages-origin "racket" %racket-origin - '("base" "pkgs/base") ;; FIXME belongs in racket-minimal - '("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal '("at-exp-lib" "pkgs/at-exp-lib") '("compiler" "pkgs/compiler") '("compiler-lib" "pkgs/compiler-lib") @@ -808,91 +1015,39 @@ (define-public racket "xrepl" "xrepl-doc" "xrepl-lib"))) (build-system gnu-build-system) (arguments - ;; We're using #:configure-flags to pass flags for - ;; `configure-layer.rkt` and #:make-flags to pass arguments for - ;; `raco pkg install`. - (list - #:configure-flags - #~`("--extra-foreign-lib-search-dirs" - ,(format #f "~s" - '(#$@(map (lambda (name) - (cond - ((this-package-input name) - => (cut file-append <> "/lib")) - (else - (raise-exception - (make-exception - (make-assertion-failure) - (make-exception-with-message - "missing input to the 'racket' package") - (make-exception-with-irritants - (list name))))))) - '("cairo" - "fontconfig-minimal" ;; aka fontconfig - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg-turbo" - "libpng" - "libx11" - "mesa" - "mpfr" - "pango" - "unixodbc" - "libedit"))))) - #:make-flags #~`("main-distribution") - #:tests? #f ;; packaged separately - #:modules '((guix build gnu-build-system) - (guix build utils) - (guix build union) - (ice-9 match)) - #:imported-modules `((guix build union) - ,@%gnu-build-system-modules) - #:phases - #~(modify-phases %standard-phases - (delete 'unpack) - (replace 'configure - (lambda* (#:key inputs configure-flags #:allow-other-keys) - (let* ((racket (search-input-file inputs "bin/racket"))) - (apply invoke - racket - #$configure-layer.rkt - `(,@configure-flags - ,(dirname (dirname racket)) - ,#$output)) - (invoke racket - "--config" (string-append #$output "/etc/racket") - "-l" "raco" "setup" - "--no-user")))) - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - ;; We use "share/racket/pkgs" for sources to distinguish them - ;; from the "lib/racket/pkgs" of a potential parent layer. - (union-build (string-append #$output "/lib/racket/pkgs") - (search-path-as-list '("share/racket/pkgs") - (map cdr inputs)) - #:create-all-directories? #t))) - (replace 'install - (lambda* (#:key inputs make-flags #:allow-other-keys) - (let ((racket (search-input-file inputs "/bin/racket"))) - (unless (null? make-flags) - (invoke racket - "-l-" - "pkg/dirs-catalog" - "--link" - "local-catalog" - (string-append #$output "/lib/racket/pkgs")) - (apply invoke - racket - "--config" (string-append #$output "/etc/racket") - "-l" "raco" - "pkg" "install" - "--installation" - "--auto" - "--catalog" "local-catalog" - make-flags)))))))) - (home-page "https://racket-lang.org") + (substitute-keyword-arguments (package-arguments racket-minimal) + ((#:make-flags _ '()) + #~`("main-distribution")) + ((#:configure-flags _ '()) + #~`("--tethered" + "--extra-foreign-lib-search-dirs" + ,(format #f "~s" + '(#$@(map (lambda (name) + (cond + ((this-package-input name) + => (cut file-append <> "/lib")) + (else + (raise-exception + (make-exception + (make-assertion-failure) + (make-exception-with-message + "missing input to the 'racket' package") + (make-exception-with-irritants + (list name))))))) + '("cairo" + "fontconfig-minimal" ;; aka fontconfig + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg-turbo" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit")))))))) (synopsis "Programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -902,10 +1057,7 @@ (define-public racket The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of -languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:asl2.0 license:expat)))) +languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (define configure-layer.rkt (scheme-file @@ -918,41 +1070,53 @@ (define configure-layer.rkt racket/port racket/list racket/pretty) - (define config-file-pth - "etc/racket/config.rktd") (define (build-path-string . args) (path->string (apply build-path args))) (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) + (define tethered? #f) + (define parent #f) (define extra-foreign-lib-search-dirs '()) - (define-values [parent-layer prefix] + (define-values [vm-dir prefix] (command-line #:once-each + [("--tethered") "create a tethered layer" + (set! tethered? #t)] + [("--parent") dir "path of parent layer, if any" + (set! parent dir)] [("--extra-foreign-lib-search-dirs") dir-list "foreign library directories, as a list of strings in `read` syntax" (set! extra-foreign-lib-search-dirs (call-with-input-string dir-list read))] - #:args (parent-layer prefix) - (values parent-layer prefix))) + #:args (vm-dir prefix) + (values vm-dir prefix))) (let* ([config (for/fold - ([config (file->value (build-path parent-layer - config-file-pth))]) - ([spec (in-list - '((lib-dir lib-search-dirs "lib/racket") - (share-dir share-search-dirs "share/racket") - (links-file - links-search-files - "share/racket/links.rktd") - (pkgs-dir pkgs-search-dirs "share/racket/pkgs") - (bin-dir bin-search-dirs "bin") - (man-dir man-search-dirs "share/man") - (doc-dir doc-search-dirs "share/doc/racket") - (include-dir - include-search-dirs - "include/racket")))]) - (match-define (list main-key search-key pth) spec) + ([config (file->value + (if parent + (build-path parent "etc/racket/config.rktd") + (build-path vm-dir "etc/config.rktd")))]) + ([spec + (in-list + '((lib-dir lib-search-dirs "lib/racket" "lib") + (share-dir share-search-dirs "share/racket" "share") + (links-file links-search-files + "lib/racket/links.rktd" + "share/links.rktd") + (pkgs-dir pkgs-search-dirs "lib/racket/pkgs" "share/pkgs") + ;; Partial workaround for: + ;; https://github.com/racket/racket/issues/4133 + #;(bin-dir bin-search-dirs "bin" "bin") + (bin-dir bin-search-dirs + "lib/racket/bogus-untethered-bin" + "bin") + (man-dir man-search-dirs "share/man" "share/man") + (doc-dir doc-search-dirs "share/doc/racket" "doc") + (include-dir include-search-dirs + "include/racket" + "include")))]) + (match-define (list main-key search-key pth vm-pth) spec) (hash-set* config main-key @@ -961,7 +1125,10 @@ (define-values [parent-layer prefix] (list* #f (hash-ref config main-key - (build-path-string parent-layer pth)) + (lambda () + (if parent + (build-path-string parent pth) + (build-path-string vm-dir vm-pth)))) (filter values (hash-ref config search-key null)))))] [config (hash-update config @@ -995,15 +1162,21 @@ (define-values [rkt old-foreign-dirs] ;; workaround Guile reader/printer: ['|3m| "-bc"] [_ ""])))] - [bin-dir - (hash-ref config 'bin-dir)] [config - (hash-set* config - 'config-tethered-apps-dir (hash-ref config 'apps-dir) - 'config-tethered-console-bin-dir bin-dir - 'config-tethered-gui-bin-dir bin-dir)] - [new-config-pth - (build-path prefix config-file-pth)]) + (cond + [tethered? + ;; Partial workaround for: + ;; https://github.com/racket/racket/issues/4133 + #;(define bin-dir (hash-ref config 'bin-dir)) + (define bin-dir (build-path-string prefix "bin")) + (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [else + config])]) + (define new-config-pth + (build-path prefix "etc/racket/config.rktd")) (make-parent-directory* new-config-pth) (call-with-output-file* new-config-pth From patchwork Sun Feb 27 02:34:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 559 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 75ABC27BBEB; Sun, 27 Feb 2022 02:39:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 6209527BBE9 for ; Sun, 27 Feb 2022 02:39:14 +0000 (GMT) Received: from localhost ([::1]:39324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Sr-0006pw-HF for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Si-0006ou-Hu for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Si-0006UD-9f for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Si-0004Is-6N for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 11/24] gnu: racket: Move Chez bootfiles to (gnu packages chez). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592949916350 (code B ref 53878); Sun, 27 Feb 2022 02:39:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:19 +0000 Received: from localhost ([127.0.0.1]:56562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Ry-0004FU-Rn for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:19 -0500 Received: from mail-qt1-f169.google.com ([209.85.160.169]:42807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rq-0004En-EF for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:11 -0500 Received: by mail-qt1-f169.google.com with SMTP id 11so6095797qtt.9 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=70tFTqzO7mBf03FccqMKi2uAgvJznXFOR1Dcwftwo3c=; b=NHpBMhNuRXOD1thkKek483DENU1yX1qQAGFVUi6MV1VlwF7oHBrZEOxCYq8d7FKErH ZdxauDQxg33NVpWrJDJ82DqUh4ueRGHNxmaEpo1dH3gmMSTrMC0q94aHZnjt3FMfiWyz KA2+Yy9Ti/c8FddWSAJFOGHmyhF9AuZcSFreHpfSlUlnnShTXfriNIjKNGBChLo9oLUW zWHd2iUMlCKqURJu4JHD8QQa75EfYeWMAyjiWOBTGT67PwjJLR3DD2FKSZi/oxTBXzgy irTIZTSBYTr7IjCo+cakgf/1m+Y9ZoVZ2gVljFjA0gr4qqehEhfqPhuQs8ztTaBzGT9M Porw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=70tFTqzO7mBf03FccqMKi2uAgvJznXFOR1Dcwftwo3c=; b=WTzsyCEAs1pIGnzBKzhugor/oV4BWWG9XNBNi/NKo1ZmbyDpv0gZOR8EzCtXhsmbvX rQtIjF64sYzeRms87fvpl+x/hqwb/KzuwO0BUalIUern1hImrzjDZnJwDLYR78FHEZaR LF7+nJSaxGm2X3ov2JWRWpDzNE4albdDd5LTYJogn5nXE3mYherKqzcUBRLpF4e5JeVb KjoIPkSUWP/PViaNWlGO3gbpdruklZPyLq3L60qcBK7pZbqdEzgSdB++SvAyQLAD2z2T z1ksPNfu8jXxjrwDDba36nDZ1AHEEqnf0pLNCrwMTb3sUyv3ohg3csKpnXgKC5tqmxRx kUEQ== X-Gm-Message-State: AOAM5317VUOXm5GnyxIoT4M2x3fwdl/NVCaNhUa5sfmxynjrFneseL+i y/npj9WuEC1mAcs5RRfffHN/DGtvO5EeisL2izI= X-Google-Smtp-Source: ABdhPJxz8ljzwFn4F7pBNfnZvtWtYbDTz0CAqi8IVWts4z2p9ZRDMfWu8kOkkkQW4gJIkm1B9olUpQ== X-Received: by 2002:a05:622a:289:b0:2de:4b60:a7e with SMTP id z9-20020a05622a028900b002de4b600a7emr11951126qtw.477.1645929484810; Sat, 26 Feb 2022 18:38:04 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 194-20020a3706cb000000b005081e1550c8sm3275371qkg.78.2022.02.26.18.38.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:04 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:37 -0500 Message-Id: <20220227023450.1877215-12-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (chez-scheme-for-racket-bootstrap-bootfiles): Move to ... * gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles): ... this new variable. [source]: Avoid problematic cycle with "racket.scm". [arguments]<#:phases>: Likewise. --- gnu/packages/chez.scm | 62 +++++++++++++++++++++++++++++++++++++++++ gnu/packages/racket.scm | 52 ---------------------------------- 2 files changed, 62 insertions(+), 52 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 47904e7b4e..046bb3dcdc 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -31,12 +31,14 @@ (define-module (gnu packages chez) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages ghostscript) #:use-module (gnu packages linux) #:use-module (gnu packages netpbm) + #:use-module (gnu packages racket) #:use-module (gnu packages tex) #:use-module (gnu packages compression) #:use-module (gnu packages image) @@ -260,6 +262,66 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-for-racket-bootstrap-bootfiles + (package + (name "chez-scheme-for-racket-bootstrap-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source #f) ; avoid problematic cycle with racket.scm + (inputs `()) + (native-inputs (list racket-vm-bc)) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list + #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")) + #:phases + #~(let ((unpack (assoc-ref %standard-phases 'unpack))) + (modify-phases %standard-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + (copy-recursively + #$nanopass + "nanopass" + #:keep-mtime? #t))) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/opt/racket-vm/bin/racket") + "rktboot/main.rkt"))))))) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it +requires ``bootfiles'' containing the Scheme-implemented portions compiled for +the current platform. (Chez can then cross-compile bootfiles for all other +supported platforms.) + +The Racket package @code{cs-bootstrap} (part of the main Racket Git +repository) implements enough of a Chez Scheme simulation to load the Chez +Scheme compiler purely from source into Racket and apply the compiler to +itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as +long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket +7.1 and later, including the Racket BC variant. + +Note that the generated bootfiles are specific to Racket's fork of Chez +Scheme, and @code{cs-bootstrap} does not currently support building upstream +Chez Scheme.") + (license (list asl2.0)))) + (define-public chez-srfi (package (name "chez-srfi") diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 3271e78d45..59944031e6 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -445,58 +445,6 @@ (define-public racket-vm-cs ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) -(define-public chez-scheme-for-racket-bootstrap-bootfiles - (package - (name "chez-scheme-for-racket-bootstrap-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. - (source %racket-origin) - (inputs `()) - (native-inputs (list racket-vm-bc)) - (build-system copy-build-system) - ;; TODO: cross compilation - (arguments - (list - #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/ChezScheme"))) - (add-after 'chdir 'unpack-nanopass+stex - (lambda args - #$(make-unpack-nanopass+stex))) - (add-before 'install 'build - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt")))))) - (home-page "https://github.com/racket/ChezScheme") - ;; ^ This is downstream of https://github.com/racket/racket, - ;; but it's designed to be a friendly landing place for people - ;; who want a ChezScheme-shaped repositroy. - (synopsis "Chez Scheme bootfiles bootstrapped by Racket") - (description "Chez Scheme is a self-hosting compiler: building it -requires ``bootfiles'' containing the Scheme-implemented portions compiled for -the current platform. (Chez can then cross-compile bootfiles for all other -supported platforms.) - -The Racket package @code{cs-bootstrap} (part of the main Racket Git -repository) implements enough of a Chez Scheme simulation to load the Chez -Scheme compiler purely from source into Racket and apply the compiler to -itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as -long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket -7.1 and later, including the Racket BC variant. - -Note that the generated bootfiles are specific to Racket's fork of Chez -Scheme, and @code{cs-bootstrap} does not currently support building upstream -Chez Scheme.") - (license (list license:asl2.0)))) - (define (racket-packages-origin name origin spec0 . spec*) "Extract from ORIGIN the sources for the Racket packages specified by SPEC0 and any additional arguments SPEC*. In the resulting file-like object, each From patchwork Sun Feb 27 02:34:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 560 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 0ED2427BBEA; Sun, 27 Feb 2022 02:39:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 5EA0727BBED for ; Sun, 27 Feb 2022 02:39:15 +0000 (GMT) Received: from localhost ([::1]:39378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Ss-0006s9-H1 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42662) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006pG-1H for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Si-0006UM-PS for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Si-0004J0-Ji for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 12/24] gnu: chez: Add utilities for Chez machine types. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592950016356 (code B ref 53878); Sun, 27 Feb 2022 02:39:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:20 +0000 Received: from localhost ([127.0.0.1]:56565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rz-0004Ff-KU for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:20 -0500 Received: from mail-qk1-f174.google.com ([209.85.222.174]:39835) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Ru-0004F0-NB for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:15 -0500 Received: by mail-qk1-f174.google.com with SMTP id t21so7815873qkg.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mlc/qhGedBkcO/u3jAnfRZ74tW1eDlJyXNhnlOfQlJM=; b=URF809wdrZf2vY9u951K66zM10YZaJAeRaUa/LYklT+i9+OpIuh+A+/5TvFCLI7f+1 GyJe+u6KWTPNvYl0xGdjX6knFIPIrFCTc4mT76rAkDQhB4nk5f69w4qZF9+t8IH2HkKi OEWmd5ghRumeglKDfAzI6JB3t0tZ7V6IcusoZW2tZoh4frQqpVT/Ka5BwI4zKmUmAziD kFqIWtcB+aHDKbI3nUr3TjN4m6pYio5HIAhBrsIZQvWxJ2/0VSpbNwKwc84+pD3yySk3 Wol69p/9ulH4SM3AqwT78arcDon6lZU9q86MuzQGv2fi5mNJvEjLAa4sznsoqSt5/4Ny ydVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mlc/qhGedBkcO/u3jAnfRZ74tW1eDlJyXNhnlOfQlJM=; b=2D09603MIiTUZVFal2OjoEalXKjoYQ4vJOriRbcnO3Yl0WpcFah0nXm8+FqC6GCCt9 WkzG5I+CdhHcUdeNpjwNlAkcqE11jNrIt2XmZE+WPu25mzWiwcV7rVw3vW4JegUoSmy7 45AvoPMbMAUS+9y01f8wlC21jZZ3WzDt/2Pe8sAUXzCtG/uAQJAwXL8vgjCSTpOtdz7w RB7Z3v2Hwnavk7KyK5hOZTpNXgZLrXMV4G+Izt7izwwd4woD3OfjhrNyQSyMjYu3dqJ9 cxtnVn+Lm3nc47wUyXaWymLr8gow212Th+rShR8MYGKvy4YFghOHHpxBvEkGBZhlU96Q vS+Q== X-Gm-Message-State: AOAM532d1nKU8UmOduxGAU+rmXAdpvrOukqhEy4qaULYaV/uHe0Un3u7 lcTXsrs3uxI6suzXPbHpp+gLke0/qreyTYRmMf0= X-Google-Smtp-Source: ABdhPJyo5V2yXzvgugfC+GcMlXjgb99mgWAeNj+ui06mCXZco2dQ7VjRGx92ao3JgKrrdNBEUYnoBA== X-Received: by 2002:a37:a515:0:b0:507:f45e:5357 with SMTP id o21-20020a37a515000000b00507f45e5357mr8310290qke.554.1645929489032; Sat, 26 Feb 2022 18:38:09 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id k125-20020a37a183000000b005f170f7e497sm3251616qke.47.2022.02.26.18.38.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:08 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:38 -0500 Message-Id: <20220227023450.1877215-13-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (chez-machine->nonthreaded, chez-machine->threaded, chez-machine->nix-system, nix-system->chez-machine, chez-upstream-features-for-system): New functions. (%nix-arch-to-chez-alist, %nix-os-to-chez-alist): New private constants. (chez-scheme)[supported-systems]: Compute based on 'nix-system->chez-machine' and 'chez-upstream-features-for-system'. (chez-scheme-for-racket-bootstrap-bootfiles)[supported-systems]: Compute based on 'nix-system->chez-machine'. --- gnu/packages/chez.scm | 127 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 3 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 046bb3dcdc..603fc4201e 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -44,7 +44,119 @@ (define-module (gnu packages chez) #:use-module (gnu packages image) #:use-module (gnu packages xorg) #:use-module (ice-9 match) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (nix-system->chez-machine + chez-machine->nonthreaded + chez-machine->threaded)) + +(define (chez-machine->nonthreaded machine) + "Given a string MACHINE naming a Chez Scheme machine type, returns a string +naming the nonthreaded machine type for the same architecture and OS as +MACHINE. The returned string may share storage with MACHINE." + ;; Chez Scheme documentation consistently uses "nonthreaded" rather than + ;; e.g. "unthreaded" + (if (eqv? #\t (string-ref machine 0)) + (substring machine 1) + machine)) +(define (chez-machine->threaded machine) + "Like @code{chez-machine->nonthreaded}, but returns the threaded machine +type." + (if (eqv? #\t (string-ref machine 0)) + machine + (string-append "t" machine))) + +;; Based on the implementation from raco-cross-lib/private/cross/platform.rkt +;; in https://github.com/racket/raco-cross. +;; For supported platforms, refer to release_notes/release_notes.stex in the +;; upstream Chez Scheme repository or to racket/src/ChezScheme/README.md +;; in https://github.com/racket/racket. +(define %nix-arch-to-chez-alist + `(("x86_64" . "a6") + ("i386" . "i3") + ("aarch64" . "arm64") + ("armhf" . "arm32") ;; Chez supports ARM v6+ + ("ppc" . "ppc32"))) +(define %nix-os-to-chez-alist + `(("w64-mingw32" . "nt") + ("darwin" . "osx") + ("linux" . "le") + ("freebsd" . "fb") + ("openbsd" . "ob") + ("netbsd" . "nb") + ("solaris" . "s2"))) + +(define (chez-machine->nix-system machine) + "Return the Nix system type corresponding to the Chez Scheme machine type +MACHINE. If MACHINE is not a string representing a known machine type, an +exception is raised. This function does not distinguish between threaded and +nonthreaded variants of MACHINE. + +Note that this function only handles Chez Scheme machine types in the +strictest sense, not other kinds of descriptors sometimes used in place of a +Chez Scheme machine type by Racket, such as @code{\"pb\"}, @code{#f}, or +@code{\"racket\"}. (When using such extensions, the Chez Scheme machine type +for the host system is often still relevant.)" + (let ((machine (chez-machine->nonthreaded machine))) + (let find-arch ((alist %nix-arch-to-chez-alist)) + (match alist + (((nix . chez) . alist) + (if (string-prefix? chez machine) + (string-append + nix "-" (let ((machine-os + (substring machine (string-length chez)))) + (let find-os ((alist %nix-os-to-chez-alist)) + (match alist + (((nix . chez) . alist) + (if (equal? chez machine-os) + nix + (find-os alist))))))) + (find-arch alist))))))) + +(define* (nix-system->chez-machine #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return the Chez Scheme machine type corresponding to the Nix system +identifier SYSTEM, or @code{#f} if the translation of SYSTEM to a Chez Scheme +machine type is undefined. + +It is unspecified whether the resulting string will name a threaded or a +nonthreaded machine type: when the distinction is relevant, use +@code{chez-machine->nonthreaded} or @code{chez-machine->threaded} to adjust +the result." + (let* ((hyphen (string-index system #\-)) + (nix-arch (substring system 0 hyphen)) + (nix-os (substring system (+ 1 hyphen))) + (chez-arch (assoc-ref %nix-arch-to-chez-alist nix-arch)) + (chez-os (assoc-ref %nix-os-to-chez-alist nix-os))) + (and chez-arch chez-os (string-append chez-arch chez-os)))) + +(define* (chez-upstream-features-for-system #:optional + (system + (or (%current-target-system) + (%current-system)))) + "Return a list of symbols naming features supported by upstream Chez Scheme +for the Nix system identifier SYSTEM, or @code{#f} if upstream Chez Scheme +does not support SYSTEM at all. + +If native threads are supported, the returned list will include +@code{'threads}. Other feature symbols may be added in the future." + (cond + ((not (nix-system->chez-machine system)) + #f) + ((target-aarch64? system) + #f) + ((target-arm32? system) + (and (target-linux? system) + '())) + ((target-ppc32? system) + (and (target-linux? system) + '(threads))) + (else + '(threads)))) + +;; +;; Chez Scheme: +;; (define nanopass (let ((version "1.9.2")) @@ -251,8 +363,11 @@ (define* (stex-make #:optional (suffix "")) ;; We should too. It is the Chez machine type arm32le ;; (no threaded version upstream yet, though there is in ;; Racket's fork), more specifically (per the release notes) ARMv6. - (supported-systems (fold delete %supported-systems - '("mips64el-linux" "armhf-linux"))) + (supported-systems + (delete + "armhf-linux" ;; <-- should work, but reportedly broken + (filter chez-upstream-features-for-system + %supported-systems))) (home-page "https://cisco.github.io/ChezScheme/") (synopsis "R6RS Scheme compiler and run-time") (description @@ -300,6 +415,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt"))))))) + (supported-systems (filter nix-system->chez-machine + %supported-systems)) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, ;; but it's designed to be a friendly landing place for people @@ -322,6 +439,10 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles Chez Scheme.") (license (list asl2.0)))) +;; +;; Packages: +;; + (define-public chez-srfi (package (name "chez-srfi") From patchwork Sun Feb 27 02:34:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 563 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 7781527BBEA; Sun, 27 Feb 2022 02:39:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 E996627BBEB for ; Sun, 27 Feb 2022 02:39:34 +0000 (GMT) Received: from localhost ([::1]:40142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TC-0007R8-1F for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006pV-Dy for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006UW-5G for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sj-0004J7-3d for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 13/24] gnu: racket: Add 'racket-vm-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592951316397 (code B ref 53878); Sun, 27 Feb 2022 02:39:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:33 +0000 Received: from localhost ([127.0.0.1]:56570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SD-0004GO-8w for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:33 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:47045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Ry-0004FH-VT for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:19 -0500 Received: by mail-qt1-f176.google.com with SMTP id a1so1555931qta.13 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P/53BPk+7O2+InAkhrvNK9cEXw2EYbleDRYOJqJuvjc=; b=DQ7D+5LoX87TNIXosLWb6WIkTWGRDK4L/nzcWRaHLxvCfI5vKzCk3mmAl+uH4Z2ADx ISO1Uw5xEXgagtQeLq1jrUjdEct58SjqPykAtgWl5QMNztFrLd/vIlB/ldGGXJfryMcR nymFtR92P2LekM3v9i0e0Cp4WvaRgny1/rUKnlROxVIkVzbm0ni6R9wwDRapFBMABDy1 cKWJeQCqDXnHWPgxb6UFNFEqvYb836FggAiDBhQ8jPJCDqrxyqPCoq9wRYIcg/glRIXp Mff3yUtWiS53CiLEws/3tMfyizO4kVtL1chIjctMdyCtBPH1UepltogxZsdY5zv861Dd VriA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P/53BPk+7O2+InAkhrvNK9cEXw2EYbleDRYOJqJuvjc=; b=f/fv+io61IrCW7gninCQkI8lZgU1foqiv5ZbrGPrLCCZUDaBqXrtTLRDTWwmj2/nGh oHYmUVruwEQWUBXa7GyRFGQ5/6B6Igit5XA6ivToaQk+KA8kllm9yhSz2iWQ6s1VYjci AVyTRwC1L3CYFPGMegt4ljZZU7KCpWcMy2phPHETTzpZUAZsX78LPHrhdLdkkTFR8MlQ AL8r1+0+2JLfohXwOpeW8WIbGS9//rvONGbYpFhDFHkyT6GxCaxX/M4TqoXVrVNV2nR/ 7Ry2XnsP5D2VEHdTSQD/wTPJ9W4lkbhcPOeFKhUaaZwOQNOIoQrZ8JhFk7/Za5b2+kFz wvyw== X-Gm-Message-State: AOAM532HaDindfBqQWVV9whRtfkm4uuM2MmeYV9l1FtKpjn/zMelLvif e1J4rclQ2Gn7hFtWuoLZC3CKe/rVQWlFtg+A0rI= X-Google-Smtp-Source: ABdhPJwOVS0f35Z8/DmyPP5qzvNnM6TNXR3OMZV9+EKMiP41XLMC5CztDM74O1N5b75KzC1XaRAXSw== X-Received: by 2002:ac8:5ac6:0:b0:2de:4b60:688 with SMTP id d6-20020ac85ac6000000b002de4b600688mr12319808qtd.251.1645929493521; Sat, 26 Feb 2022 18:38:13 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id h14-20020ac8584e000000b002ddf8b971b2sm4463669qth.87.2022.02.26.18.38.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:13 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:39 -0500 Message-Id: <20220227023450.1877215-14-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-vm-for-system): New procedure. (racket-minimal, racket)[inputs]: Use it. --- gnu/packages/racket.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 59944031e6..10ec0591d9 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -187,6 +187,14 @@ (define-module (gnu packages racket) ;; ;; Code: +(define* (racket-vm-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return 'racket-vm-cs' if it supports SYSTEM; 'racket-vm-bc' otherwise." + (if (nix-system->chez-machine system) + racket-vm-cs + racket-vm-bc)) + (define %racket-version "8.4") ;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! (define %racket-commit @@ -513,7 +521,7 @@ (define-public racket-minimal (inputs (list openssl sqlite - racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-vm-for-system) (racket-packages-origin "base" %racket-origin '("base" "pkgs/base") @@ -630,7 +638,7 @@ (define-public racket unixodbc libedit ;; TODO reconsider in light of expeditor and readline-gpl racket-minimal ;; <-- TODO non-tethered layer - racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-vm-for-system) (simple-racket-origin "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") "2d" "2d-doc" "2d-lib") From patchwork Sun Feb 27 02:34:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 564 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 24DC527BBE9; Sun, 27 Feb 2022 02:39:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 C6D7D27BBEA for ; Sun, 27 Feb 2022 02:39:35 +0000 (GMT) Received: from localhost ([::1]:40214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TC-0007Ts-TY for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sk-0006rs-8J for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006Un-VN for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sj-0004JM-TX for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 14/24] gnu: chez-scheme: Use new style for Chez packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592951516412 (code B ref 53878); Sun, 27 Feb 2022 02:39:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:35 +0000 Received: from localhost ([127.0.0.1]:56574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SD-0004GX-Rh for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:34 -0500 Received: from mail-qk1-f181.google.com ([209.85.222.181]:40922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9S3-0004FT-Ou for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:30 -0500 Received: by mail-qk1-f181.google.com with SMTP id c7so7810351qka.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=; b=HzV1VqF6vvFzA1fwDri8ZyVgyMXtMi3YpVl+0bHFnkJ/PPAYb+Ix/TBtd5RJpdnb6I l1cwJjkFy7i86YMLOBvhquIjVLTuiAjSrESHIwUEAuVlIkRcPg1t+4gDDTd7EOwOrSHP gaH0gj3vqCOxvYzp+DRmHRz1n7d5d4baoCMfvW1AcpqBYzUdDo/se4oBf09kru7HR+3j pxNchdU/NEMiTeYnweBSanMe2aTvbz7WhIfHlv6Iqw59vEJSzLv8mJgzkYo3Y90yYlfZ j9/E7beEX2jgx7r1HTEgv2bvrBCLqzQ1dVRLPqdW7Nng8blivAqNz5v6dcM1YhjFFm0K E+Bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=; b=CIyCDzYSZrMNvk4Ev7hMTM7maMyQXQJ+yIrY7GyL0Y4F+IxxYjAgmGTaWC/jMInevP cEVRRZYk/bkxRIUIyc2c8fPXq6fGTTs9CUg+ywVHnmKpfOZTbkYjcSjwIpHPapWZgqNP fgnRpdRi+B2b/EsHIjvy/w+w85V80Jli8h6vjkFD6Ac03tn4gQ94076clFntethtEc1j ShLYiwtFBY0o/uUucDCGMyfysphIc9IhLue5nGFhXIzEAJLv4ca3xXb7ZukU1OMu+n2S ua7syYMWNjI0W+BPWyGc5ofjzcq3WZqnQY9sqqHGGWdxQfo8Qled2eho2OPLl743ejds ugpw== X-Gm-Message-State: AOAM532XQo+JMEyyo8eJISBDp69atPxLkAUg1dhYFbhtoyDI2BaAIv7V 0DKy1YZEfiq2d/iJ3pXFH87XIixf30ekiSsHXWg= X-Google-Smtp-Source: ABdhPJxZDdLcw/yJTWLgRsr6y5uTAUFBHklfT41uRiu6MOliakrNv9ON/ao58SuhYP5mG29oNHmjHg== X-Received: by 2002:a05:620a:142:b0:648:b7e2:104c with SMTP id e2-20020a05620a014200b00648b7e2104cmr8434260qkn.728.1645929498020; Sat, 26 Feb 2022 18:38:18 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id 15-20020a37070f000000b0062cdc159505sm3235163qkh.89.2022.02.26.18.38.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:17 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:40 -0500 Message-Id: <20220227023450.1877215-15-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (chez-configure, chez-make-flags): Use G-expressions. (chez-srfi)[arguments]: Use G-expressions, 'chez-configure', and 'chez-make-flags'. (chez-web, chez-sockets)[native-inputs]: Remove labels. [arguments]: Use G-expressions. (chez-matchable, chez-irregex, chez-fmt, chez-mit, chez-scmutils)[arguments]: Use G-expressions. --- gnu/packages/chez.scm | 382 ++++++++++++++++++++++-------------------- 1 file changed, 196 insertions(+), 186 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 603fc4201e..4ee9711bb4 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -443,6 +443,27 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; Packages: ;; +;; Help function for Chez Scheme to add the current path to +;; CHEZSCHEMELIBDIRS. +(define chez-configure + #~(lambda _ + (let ((chez-env (getenv "CHEZSCHEMELIBDIRS"))) + (setenv "CHEZSCHEMELIBDIRS" + (if chez-env + (string-append ".:" chez-env) + "."))))) + +;; Help function to define make flags for some Chez Scheme custom make +;; files. +(define (chez-make-flags name version) + #~(let ((out #$output)) + (list + ;; Set 'chezversion' so that libraries are installed in + ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. + (string-append "chezversion=" #$(package-version chez-scheme)) + (string-append "PREFIX=" out) + (string-append "DOCDIR=" out "/share/doc/" #$name "-" #$version)))) + (define-public chez-srfi (package (name "chez-srfi") @@ -460,13 +481,11 @@ (define-public chez-srfi (native-inputs (list chez-scheme)) (arguments - `(#:make-flags (let ((out (assoc-ref %outputs "out"))) - (list (string-append "PREFIX=" out) - "CHEZ=chez-scheme --libdirs ./" - (string-append "chezversion=" ,(package-version chez-scheme)))) - #:test-target "test" - #:phases (modify-phases %standard-phases - (delete 'configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (home-page "https://github.com/fedeinthemix/chez-srfi") (synopsis "SRFI libraries for Chez Scheme") (description @@ -491,42 +510,48 @@ (define-public chez-web (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b")))) (build-system gnu-build-system) (native-inputs - `(("chez-scheme" ,chez-scheme) - ("ghostscript" ,ghostscript) - ("texlive" ,(texlive-updmap.cfg (list texlive-oberdiek - texlive-epsf - texlive-metapost - texlive-charter - texlive-pdftex - texlive-context - texlive-cm - texlive-tex-plain))))) + (list chez-scheme + ghostscript + ;; FIXME: This package fails to build with the error: + ;; mktexpk: don't know how to create bitmap font for bchr8r + ;; Replacing the following with `texlive` fixes it. + ;; What is missing? + (texlive-updmap.cfg (list texlive-oberdiek + texlive-epsf + texlive-metapost + texlive-charter + texlive-pdftex + texlive-context + texlive-cm + texlive-tex-plain)))) (arguments - `(#:make-flags (list (string-append "PREFIX=" %output) - (string-append "DOCDIR=" %output "/share/doc/" - ,name "-" ,version) - (string-append "LIBDIR=" %output "/lib/chezweb") - (string-append "TEXDIR=" %output "/share/texmf-local")) - #:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - ;; This package has a custom "bootstrap" script that - ;; is meant to be run from the Makefile. - (delete 'bootstrap) - (replace 'configure - (lambda* _ - (copy-file "config.mk.template" "config.mk") - (substitute* "tangleit" - (("\\./cheztangle\\.ss" all) - (string-append "chez-scheme --program " all))) - (substitute* "weaveit" - (("mpost chezweb\\.mp") - "mpost --tex=tex chezweb.mp") - (("\\./chezweave" all) - (string-append "chez-scheme --program " all))) - (substitute* "installit" - (("-g \\$GROUP -o \\$OWNER") "")) - #t))))) + (list + #:make-flags + #~(list (string-append "PREFIX=" #$output) + (string-append "DOCDIR=" #$output "/share/doc/" + #$name "-" #$version) + ;; lib/chez-scheme/chezweb ??? + (string-append "LIBDIR=" #$output "/lib/chezweb") + (string-append "TEXDIR=" #$output "/share/texmf-local")) + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + ;; This package has a custom "bootstrap" script that + ;; is meant to be run from the Makefile. + (delete 'bootstrap) + (replace 'configure + (lambda* _ + (copy-file "config.mk.template" "config.mk") + (substitute* "tangleit" + (("\\./cheztangle\\.ss" all) + (string-append "scheme --program " all))) + (substitute* "weaveit" + (("mpost chezweb\\.mp") + "mpost --tex=tex chezweb.mp") + (("\\./chezweave" all) + (string-append "scheme --program " all))) + (substitute* "installit" + (("-g \\$GROUP -o \\$OWNER") ""))))))) (home-page "https://github.com/arcfide/ChezWEB") (synopsis "Hygienic Literate Programming for Chez Scheme") (description "ChezWEB is a system for doing Knuthian style WEB @@ -550,95 +575,78 @@ (define-public chez-sockets (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m")))) (build-system gnu-build-system) (native-inputs - `(("chez-scheme" ,chez-scheme) - ("chez-web" ,chez-web) - ("texlive" ,(texlive-updmap.cfg (list texlive-pdftex))))) + (list chez-scheme + chez-web + (texlive-updmap.cfg (list texlive-pdftex)))) (arguments - `(#:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (chez-web (assoc-ref inputs "chez-web")) - (chez (assoc-ref inputs "chez-scheme")) - (chez-h (dirname (car (find-files chez "scheme\\.h"))))) - (substitute* "Makefile" - (("(SCHEMEH=).*$" all var) - (string-append var chez-h))) - #t))) - (add-before 'build 'tangle - (lambda* (#:key inputs #:allow-other-keys) - (setenv "TEXINPUTS" - (string-append - (getcwd) ":" - (assoc-ref inputs "chez-web") "/share/texmf-local/tex/generic:" - ":")) - ;; just using "make" tries to build the .c files before - ;; they are created. - (and (invoke "make" "sockets") - (invoke "make")))) - (replace 'build - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (chez-site (string-append out "/lib/csv" - ,(package-version chez-scheme) - "-site/arcfide"))) - ;; make sure Chez Scheme can find the shared libraries. - (substitute* "sockets.ss" - (("(load-shared-object) \"(socket-ffi-values\\.[sd][oy].*)\"" - all cmd so) - (string-append cmd " \"" chez-site "/" so "\"")) - (("sockets-stub\\.[sd][oy].*" all) - (string-append chez-site "/" all))) - ;; to compile chez-sockets, the .so files must be - ;; installed (because of the absolute path we - ;; inserted above). - (for-each (lambda (f d) (install-file f d)) - '("socket-ffi-values.so" "sockets-stub.so") - (list chez-site chez-site)) - (zero? (system "echo '(compile-file \"sockets.sls\")' | scheme -q"))))) - (replace 'install - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib/chez-sockets")) - (doc (string-append out "/share/doc/" ,name "-" ,version)) - (chez-site (string-append out "/lib/csv" - ,(package-version chez-scheme) + (list + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let* ((scheme (search-input-file (or native-inputs inputs) + "/bin/scheme")) + (lib (string-append (dirname scheme) "/../lib")) + (header-file (car (find-files lib "scheme\\.h"))) + (include-dir (dirname header-file))) + (substitute* "Makefile" + (("(SCHEMEH=).*$" _ var) + (string-append var include-dir)))))) + (add-before 'build 'tangle + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TEXINPUTS" + (string-append + (getcwd) ":" + (assoc-ref inputs "chez-web") + "/share/texmf-local/tex/generic:" + ":")) + ;; just using "make" tries to build the .c files before + ;; they are created. + (and (invoke "make" "sockets") + (invoke "make")))) + (replace 'build + (lambda args + (let ((chez-site (string-append #$output + "/lib/csv" + (package-version chez-scheme) "-site/arcfide"))) - (for-each (lambda (f d) (install-file f d)) - '("sockets.pdf" "sockets.so") - (list doc chez-site)) - #t)))))) + ;; make sure Chez Scheme can find the shared libraries. + (substitute* "sockets.ss" + (("(object \")(socket-ffi-values\\.[sd][oy][^\"]*)(\")" + _ pre file post) + (string-append pre chez-site "/" file post)) + (("(\")(sockets-stub\\.[sd][oy][^\"]*)(\")" + _ pre file post) + (string-append pre chez-site "/" file post))) + ;; to compile chez-sockets, the .so files must be + ;; installed (because of the absolute path we + ;; inserted above). + (for-each (lambda (f) + (install-file f chez-site)) + '("socket-ffi-values.so" + "sockets-stub.so")) + (invoke "bash" + "-c" + (format #f "echo '~s' | scheme -q" + '(compile-file "sockets.sls")))))) + (replace 'install + (lambda args + (install-file "sockets.so" + (string-append #$output + "/lib/csv" + #$(package-version chez-scheme) + "-site/arcfide")) + (install-file "sockets.pdf" + (string-append #$output + "/share/doc/" + #$name "-" #$version))))))) (home-page "https://github.com/arcfide/chez-sockets") (synopsis "Extensible sockets library for Chez Scheme") (description "Chez-sockets is an extensible sockets library for Chez Scheme.") (license expat)))) -;; Help function for Chez Scheme to add the current path to -;; CHEZSCHEMELIBDIRS. -(define chez-configure - '(lambda _ - (let ((chez-env (getenv "CHEZSCHEMELIBDIRS"))) - (setenv "CHEZSCHEMELIBDIRS" - (if chez-env - (string-append ".:" chez-env) - ".")) - #t))) - -;; Help function to define make flags for some Chez Scheme custom make -;; files. -(define (chez-make-flags name version) - `(let ((out (assoc-ref %outputs "out"))) - (list - ;; Set 'chezversion' so that libraries are installed in - ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. - (string-append "chezversion=" ,(package-version chez-scheme)) - (string-append "PREFIX=" out) - (string-append "DOCDIR=" out "/share/doc/" - ,name "-" ,version)))) - (define-public chez-matchable (package (name "chez-matchable") @@ -659,10 +667,11 @@ (define-public chez-matchable (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (synopsis "Portable hygienic pattern matcher for Scheme") (description "This package provides a superset of the popular Scheme @code{match} package by Andrew Wright, written in fully portable @@ -690,10 +699,11 @@ (define-public chez-irregex (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (home-page "https://github.com/fedeinthemix/chez-irregex") (synopsis "Portable regular expression library for Scheme") (description "This package provides a portable and efficient @@ -720,17 +730,18 @@ (define-public chez-fmt (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "chez-check" - #:phases - (modify-phases %standard-phases - (replace 'configure ,chez-configure) - (replace 'build - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "chez-build" make-flags))) - (replace 'install - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "chez-install" make-flags)))))) + (list #:make-flags (chez-make-flags name version) + #:test-target "chez-check" + #:phases + #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "chez-build" make-flags))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "chez-install" make-flags)))))) (home-page "http://synthcode.com/scheme/fmt") (synopsis "Combinator formatting library for Chez Scheme") (description "This package provides a library of procedures for @@ -760,10 +771,11 @@ (define-public chez-mit (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (synopsis "MIT/GNU Scheme compatibility library for Chez Scheme") (description "This package provides a set of MIT/GNU Scheme compatibility libraries for Chez Scheme. The main goal was to provide the functionality @@ -792,46 +804,44 @@ (define-public chez-scmutils (propagated-inputs (list chez-mit chez-srfi)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:tests? #f ; no test suite - #:phases - (modify-phases %standard-phases - (replace 'configure ,chez-configure) - ;; Since the documentation is lacking, we install the source - ;; code. For things to work correctly we have to replace - ;; relative paths by absolute ones in 'include' forms. This - ;; in turn requires us to compile the files in the final - ;; destination. - (delete 'build) - (add-after 'install 'install-src - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "install-src" make-flags))) - (add-after 'install-src 'absolute-path-in-scm-files - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each (lambda (file) - (substitute* file - (("include +\"\\./scmutils") - (string-append "include \"" (dirname file))))) - (find-files out "\\.sls")) - (for-each (lambda (file) - (substitute* file - (("include +\"\\./scmutils/simplify") - (string-append "include \"" (dirname file))))) - (find-files out "fbe-syntax\\.scm")) - #t))) - (add-after 'absolute-path-in-scm-files 'build - (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (mk-file (car (find-files out "Makefile")))) - (with-directory-excursion (dirname mk-file) - (apply invoke "make" "build" make-flags))))) - (add-after 'build 'clean-up - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (for-each delete-file - (find-files out "Makefile|compile-all\\.ss")) - #t)))))) + (list + #:make-flags (chez-make-flags name version) + #:tests? #f ; no test suite + #:phases + #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure) + ;; Since the documentation is lacking, we install the source + ;; code. For things to work correctly we have to replace + ;; relative paths by absolute ones in 'include' forms. This + ;; in turn requires us to compile the files in the final + ;; destination. + (delete 'build) + (add-after 'install 'install-src + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "install-src" make-flags))) + (add-after 'install-src 'absolute-path-in-scm-files + (lambda* (#:key #:allow-other-keys) + (for-each (lambda (file) + (substitute* file + (("include +\"\\./scmutils") + (string-append "include \"" (dirname file))))) + (find-files #$output "\\.sls")) + (for-each (lambda (file) + (substitute* file + (("include +\"\\./scmutils/simplify") + (string-append "include \"" (dirname file))))) + (find-files #$output "fbe-syntax\\.scm")))) + (add-after 'absolute-path-in-scm-files 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (let ((mk-file (car (find-files #$output "Makefile")))) + (with-directory-excursion (dirname mk-file) + (apply invoke "make" "build" make-flags))))) + (add-after 'build 'clean-up + (lambda args + (for-each delete-file + (find-files #$output + "Makefile|compile-all\\.ss"))))))) (synopsis "Port of MIT/GNU Scheme Scmutils to Chez Scheme") (description "This package provides a port of the MIT/GNU Scheme Scmutils program to Chez Scheme. The port consists of a set of From patchwork Sun Feb 27 02:34:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 562 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 01A8927BBEC; Sun, 27 Feb 2022 02:39:35 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 4588C27BBEA for ; Sun, 27 Feb 2022 02:39:34 +0000 (GMT) Received: from localhost ([::1]:40108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TB-0007Pp-E6 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006qc-SI for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sj-0006Ue-Jo for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sj-0004JF-GR for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592951316404 (code B ref 53878); Sun, 27 Feb 2022 02:39:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:33 +0000 Received: from localhost ([127.0.0.1]:56572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SD-0004GQ-HK for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:33 -0500 Received: from mail-qt1-f172.google.com ([209.85.160.172]:41478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9S7-0004Ft-Vy for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:28 -0500 Received: by mail-qt1-f172.google.com with SMTP id n11so6102496qtk.8 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=; b=L39zSGW8EhA6rWq2LEN+LXb1A9Cbws9UUTf5FyZqUEaJGdU3Mg66EbCOmNW/gGNVIN yWWENPzw47Hqot280+ClIjxZ6DMLHLDZFEhLVT34iMO6ol7ZyGD49iEeMB5u5HsE9EZf qeGDGfW0d0z/Y9ta0M993N3v1Sjs35XNuuO3TJxzgQUbCGb21QNEbOI+jfavHDzzRx0y ABrbZONlxVODRjbdHHANpla0v5xd32z2uJUXUI7LKTWNP8h8+ianoOEqdcOHQoj+at1R 6kwtJRrfw6hyKpdgQs+c0QqXkmH+mSvTcPgq4rWw08RnMlnHCR1vMmVdUma/EYwj7rA1 94mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=; b=1xGPNXyRXL/jqN/Zw23MDpbDScnYbrGboYwL57cRo/zzSDXLYTLJ6DruKfVWAIDh6m f7f+CKqlMAAr/8CJGdGI7xJhTxyjyxk9TF82Epclb3YLHGT3j+5T+xTWNeVLLXoeByGP j4bVQsew2aSJ0BmqZMrm1838TwaZT2aEFPVGTrOGPIjg8WwvGQYkMfduFSjOpk4CtbhM FLvjwIkqPByBJzI595e4EBTjwSq8Z1XWtWq1E4bPNBNZFR1fQ7X2d+Lq4zrZrB9p2Gil QoAPkv+1wSWZkIgT518PvKjopSsrPfk650ZDhoqQJTKI4PMJ+T/GXLNdEo8YKidz1U5K KNVw== X-Gm-Message-State: AOAM530phasT0U2OmV1lp68KJ4hOgLld2ubKlFpGBeFGbBt+BypyLtJE +QUZDJwoPM70oZReLtj6/uM1iSWTg715ftVzXVM= X-Google-Smtp-Source: ABdhPJz9MIOHdq5uUkgxTvyYO3unCN4gRgifv4VaWXXwB73GObKF4MmC/pw9cgm3RzefrIUQSsSv9w== X-Received: by 2002:a05:622a:590:b0:2de:93aa:4ff1 with SMTP id c16-20020a05622a059000b002de93aa4ff1mr12271190qtb.204.1645929502469; Sat, 26 Feb 2022 18:38:22 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id k10-20020a05622a03ca00b002de9f8e660dsm4432519qtx.63.2022.02.26.18.38.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:22 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:41 -0500 Message-Id: <20220227023450.1877215-16-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 There does not seem to be any widely accepted standard path to use for "CHEZSCHEMELIBDIRS". Using a path without a version number in it avoids having to compute the actual path everywhere, which would be especially unpleasant when support is added for the Racket variant of Chez Scheme, which always has a different version number than upstream. * gnu/packages/chez.scm (chez-scheme)[native-search-paths]: Change to use "lib/chez-scheme" instead of "lib/csvX.Y.Z-site" for "CHEZSCHEMELIBDIRS". (chez-make-flags): Update accordingly. (chez-sockets)[arguments]<#:phases>: Likewise. --- gnu/packages/chez.scm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 4ee9711bb4..f4c87fbcf7 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -233,7 +233,7 @@ (define-public chez-scheme (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") - (files (list (string-append "lib/csv" version "-site")))))) + (files '("lib/chez-scheme"))))) (outputs '("out" "doc")) (arguments `(#:modules @@ -458,9 +458,9 @@ (define chez-configure (define (chez-make-flags name version) #~(let ((out #$output)) (list - ;; Set 'chezversion' so that libraries are installed in - ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. - (string-append "chezversion=" #$(package-version chez-scheme)) + ;; Set 'schemedir' so that libraries are installed in + ;; 'lib/chez-scheme' like Chez's 'native-search-paths' expects. + (string-append "schemedir=" out "/lib/chez-scheme") (string-append "PREFIX=" out) (string-append "DOCDIR=" out "/share/doc/" #$name "-" #$version)))) @@ -608,9 +608,7 @@ (define-public chez-sockets (replace 'build (lambda args (let ((chez-site (string-append #$output - "/lib/csv" - (package-version chez-scheme) - "-site/arcfide"))) + "/lib/chez-scheme/arcfide"))) ;; make sure Chez Scheme can find the shared libraries. (substitute* "sockets.ss" (("(object \")(socket-ffi-values\\.[sd][oy][^\"]*)(\")" @@ -634,9 +632,7 @@ (define-public chez-sockets (lambda args (install-file "sockets.so" (string-append #$output - "/lib/csv" - #$(package-version chez-scheme) - "-site/arcfide")) + "/lib/chez-scheme/arcfide")) (install-file "sockets.pdf" (string-append #$output "/share/doc/" From patchwork Sun Feb 27 02:34:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 565 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 9CFDD27BBEA; Sun, 27 Feb 2022 02:39:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 36CEA27BBE9 for ; Sun, 27 Feb 2022 02:39:44 +0000 (GMT) Received: from localhost ([::1]:40760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TL-0007rL-C5 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sk-0006uv-Ug for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sk-0006VE-K5 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sk-0004JW-GM for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 16/24] gnu: chez-scheme: Use shared zlib and lz4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592951516421 (code B ref 53878); Sun, 27 Feb 2022 02:39:06 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:35 +0000 Received: from localhost ([127.0.0.1]:56576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SE-0004Gg-S8 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:35 -0500 Received: from mail-qv1-f47.google.com ([209.85.219.47]:38677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SC-0004Fy-8x for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:32 -0500 Received: by mail-qv1-f47.google.com with SMTP id d3so9829618qvb.5 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=; b=XQCjvPvirqd/oUHhiyA0IWoaCR3fk5J6N66ZziIW4Zfr+NpLVp//RO5VMoAhrOw3lR TRw5rb4lp1bYXcv1gOvW7CG1TX2Uu1iAIYcVCuMCCFGs7emibdUxVEfCSHdRMjR1SKZ0 vgxmC/r/q6vvF1iPLNQ+JFMHuELc1J22nT53fsw9KAvKKNxpLSeGkJFVT3SmX5HNfaXd h+jkFpEJGd7w9F8ZtdmlZ51tWa4/zIPk6Hz5qyff94ICyeUQNstFjxHCKhS1gwoJ1as7 VrWO9Y/qOe4Yt5f8ZUdpQrciYGYebVVV5XEwlEzpEq2E6F/60cxWZ23KHDzILP7vY+td mcHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=; b=spXYI4D6dRpLUh1eSOk+fkioYAZ8nE9XiDfLkD2BOzPG+6xAcp5syToxnPlxw1C/lv p39jJNAzkzZqgBdQkdKld7EswmJgEx/NdGCQgCXjWyZeWjpm9uEDveli0aJhtakBUDBO 0GAY4tDT8tgjgromrVveagFCYwT/ESQHS+03CrKlUrYFBxm3ywvdvizl4+Qieb10bbJc ta3Iu+3VVN5XLHYq5WJsMnv9m5jQrsBxfCZhgj1//gdt+Q0rrTOpHZDCyGxlrHPF3PLZ BAhPzMFWsd51P9kcErasqhOSoC0JAfmkVGgfHnSpgQHro5CfqeQ87r97xKkDGWJSJ1xf iOsw== X-Gm-Message-State: AOAM530ovIlKLkWbSkzr1v4nDHYSiPYrCYsIz9tgCXFXTwTMZu9XxAH6 wmOiwvEYknSftkr6DRUzWvIaSpiC1UVkrNG8bO8= X-Google-Smtp-Source: ABdhPJw6/OyAh9w/wDundD32JCd4mEvQqAqBjTXAf0o/9PuH0Mw1rB9rTl6+1gb3oKGVANywsGP7OQ== X-Received: by 2002:a0c:ab84:0:b0:432:916b:abb9 with SMTP id j4-20020a0cab84000000b00432916babb9mr10266671qvb.33.1645929506752; Sat, 26 Feb 2022 18:38:26 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x26-20020ae9f81a000000b005f1916fc61fsm3181897qkh.106.2022.02.26.18.38.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:26 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:42 -0500 Message-Id: <20220227023450.1877215-17-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 This change also involves building 'libkernel.a' instead of 'kernel.o'. Support for these build options was merged upstream in 2019: see discussion at . * gnu/packages/chez.scm (chez-scheme)[inputs]: Remove 'zlib:static' and 'lz4:static'. [arguments]: Adjust configure phase accordingly. --- gnu/packages/chez.scm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index f4c87fbcf7..dd40baa719 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -211,9 +211,7 @@ (define-public chez-scheme (inputs `(("libuuid" ,util-linux "lib") ("zlib" ,zlib) - ("zlib:static" ,zlib "static") ("lz4" ,lz4) - ("lz4:static" ,lz4 "static") ;; for expeditor: ("ncurses" ,ncurses) ;; for X11 clipboard support in expeditor: @@ -266,14 +264,14 @@ (define src (lz4-static (assoc-ref inputs "lz4:static")) (out (assoc-ref outputs "out")) ;; add flags which are always required: - (flags (cons* - (string-append "--installprefix=" out) - (string-append "ZLIB=" zlib-static "/lib/libz.a") - (string-append "LZ4=" lz4-static "/lib/liblz4.a") - ;; Guix will do compress man pages, - ;; and letting Chez try causes an error - "--nogzip-man-pages" - configure-flags))) + (flags (cons* (string-append "--installprefix=" out) + "ZLIB=-lz" + "LZ4=-llz4" + "--libkernel" + ;; Guix will do compress-man-pages, + ;; and letting Chez try causes an error + "--nogzip-man-pages" + configure-flags))) (format #t "configure flags: ~s~%" flags) ;; Some makefiles (for tests) don't seem to propagate CC ;; properly, so we take it out of their hands: From patchwork Sun Feb 27 02:34:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 566 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 F1E9727BBEB; Sun, 27 Feb 2022 02:39:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 6F5B327BBE9 for ; Sun, 27 Feb 2022 02:39:45 +0000 (GMT) Received: from localhost ([::1]:40872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TM-0007vv-J7 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sl-0006x5-Ge for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sl-0006VO-7R for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sl-0004Ji-5M for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 17/24] gnu: chez-scheme: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592954116490 (code B ref 53878); Sun, 27 Feb 2022 02:39:07 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:01 +0000 Received: from localhost ([127.0.0.1]:56584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Se-0004Hs-BS for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:00 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:34761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SG-0004GF-NQ for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:37 -0500 Received: by mail-qv1-f52.google.com with SMTP id ba20so9874236qvb.1 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DEN9JBWT7L5sZ2kWUaZi57vTZgqR1gZML2Ph6nBGkDU=; b=cZEAuvPySeFF5nPinVOcAnBFHhnTvqiw1rkcl3BpeZ2PdsQ8qOCgVwCZAbiNbmw3Nv +mt1GVCRpFqa7E4nHFfu+882uNl7oIddwVnECrdIBzAeE3AE400NoCra7iVcq88VXzDC kRbBLnboqlJmh1HypS1WI5thlaZVS6YaDE/Jqh1GcodB9gxOeW1uxqM/BqgYTjIBD9zC n7sMB1MoIv3U5tpHHIwC7qQoQobPtjJAPMNFjlNWS6taa5lGImt69vDYrjKuIsJQSl2F YuRxlqIETX+bHsQfl3MWvK57yhpihMHzdWWZq6yH2erYrxdoGRrkHe9cEczRoQNOtCuL 9aDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DEN9JBWT7L5sZ2kWUaZi57vTZgqR1gZML2Ph6nBGkDU=; b=EPqJ455kugvJXUHY/SWJkYfQbvZUh908fnL7KrHRlkhk5eq7TnBiMgHK0ay00WJtQg eRMrve/ZOw2x2vvDfeUv10qITlHC8NMdLrgnxhY1XjwQD4mt07RvXw3vhqVle/NdbmUJ P0fQOIq+xQcpZ7EJt0LlZ/gkCvJxpi8UUKJGaOKA8v1FJv1TG5s6393iNxyHZgKFEFEf DnlRblMo98gh3mI7k44MI+zdWmgLnyr+jGOVftXrdP39sQgx3GitCO8W1U9dtx9v7Z+U iAlyfvt1eiOXk1tSsDq1dXmUqhy3ieJIU6O5OIhhJUPyC3ZJSbFAdojfl9WORuWkt1pJ 9B5g== X-Gm-Message-State: AOAM530RT9K/LSBDTswipJGRzqBdujhTn5mW3ZCwhDo2o/ewtBh5ZdVm de+3aY2GICNnQYrNb5DsaLeayGBtleLUwbxF2vk= X-Google-Smtp-Source: ABdhPJzbdNadi3uFKYoxoThvpAGPjk8TUZLXNKjQ1cHOuxIcdI2VYJ8Rsp5D1SOWhJ8+WsmMV22jgg== X-Received: by 2002:a0c:eb81:0:b0:42d:a99:b08c with SMTP id x1-20020a0ceb81000000b0042d0a99b08cmr10677116qvo.52.1645929510938; Sat, 26 Feb 2022 18:38:30 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id h11-20020a05620a21cb00b005089fdd033bsm3195292qka.39.2022.02.26.18.38.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:30 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:43 -0500 Message-Id: <20220227023450.1877215-18-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (chez-scheme)[inputs]: Remove labels. [native-inputs]: Likewise. [arguments]: Use G-expressions. <#:phases>: Use 'search-input-file' instead of 'assoc-ref'. (nanopass): Make public as a temporary workaround for Racket. * gnu/packages/racket.scm (make-unpack-nanopass+stex): Update accordingly. --- gnu/packages/chez.scm | 286 +++++++++++++++++++--------------------- gnu/packages/racket.scm | 5 +- 2 files changed, 135 insertions(+), 156 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index dd40baa719..ad263a8fe3 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -158,7 +158,7 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; -(define nanopass +(define-public nanopass (let ((version "1.9.2")) (origin (method git-fetch) @@ -185,86 +185,80 @@ (define stex (define-public chez-scheme (package (name "chez-scheme") + ;; The version should match `(scheme-version-number)`. + ;; See s/cmacros.ss c. line 360. (version "9.5.6") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/cisco/ChezScheme") - (commit (string-append "v" version)))) - (sha256 - (base32 "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky")) - (file-name (git-file-name name version)) - (snippet - ;; Remove bundled libraries. - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (for-each (lambda (dir) - (when (directory-exists? dir) - (delete-file-recursively dir))) - '("stex" - "nanopass" - "lz4" - "zlib"))))))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cisco/ChezScheme") + (commit (string-append "v" version)))) + (sha256 + (base32 + "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky")) + (file-name (git-file-name name version)) + (snippet #~(begin + (use-modules (guix build utils)) + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib")))))) (build-system gnu-build-system) (inputs - `(("libuuid" ,util-linux "lib") - ("zlib" ,zlib) - ("lz4" ,lz4) - ;; for expeditor: - ("ncurses" ,ncurses) - ;; for X11 clipboard support in expeditor: - ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 - ("libx11" ,libx11))) + (list + `(,util-linux "lib") ;<-- libuuid + zlib + lz4 + ncurses ;<-- for expeditor + ;; for X11 clipboard support in expeditor: + ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 + libx11)) (native-inputs - `(("nanopass" ,nanopass) ; source only - ;; for docs - ("stex" ,stex) - ("xorg-rgb" ,xorg-rgb) - ("texlive" ,(texlive-updmap.cfg (list texlive-dvips-l3backend - texlive-epsf - texlive-fonts-ec - texlive-oberdiek))) - ("ghostscript" ,ghostscript) - ("netpbm" ,netpbm))) + (list nanopass ; source only + ;; for docs + stex + xorg-rgb + (texlive-updmap.cfg (list texlive-dvips-l3backend + texlive-epsf + texlive-fonts-ec + texlive-oberdiek)) + ghostscript + netpbm)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") (files '("lib/chez-scheme"))))) (outputs '("out" "doc")) (arguments - `(#:modules - ((guix build gnu-build-system) + (list + #:modules + '((guix build gnu-build-system) (guix build utils) (ice-9 ftw) (ice-9 match)) - #:test-target "test" - #:configure-flags - '("--threads") ;; TODO when we fix armhf, it doesn't support --threads - #:phases - (modify-phases %standard-phases - ;; put these where configure expects them to be - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (for-each (lambda (dep) - (define src - (assoc-ref (or native-inputs inputs) dep)) - (copy-recursively src dep - #:keep-mtime? #t)) - '("nanopass" "stex")))) - ;; NOTE: the custom Chez 'configure' script doesn't allow - ;; unrecognized flags, such as those automatically added - ;; by `gnu-build-system`. - (replace 'configure - (lambda* (#:key inputs outputs - (configure-flags '()) - #:allow-other-keys) - (let* ((zlib-static (assoc-ref inputs "zlib:static")) - (lz4-static (assoc-ref inputs "lz4:static")) - (out (assoc-ref outputs "out")) - ;; add flags which are always required: - (flags (cons* (string-append "--installprefix=" out) + #:test-target "test" + ;; TODO when we fix armhf, it may not support --threads + #:configure-flags #~'("--threads") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (copy-recursively #$nanopass + "nanopass" + #:keep-mtime? #t) + (copy-recursively #$stex + "stex" + #:keep-mtime? #t))) + ;; NOTE: the custom Chez 'configure' script doesn't allow + ;; unrecognized flags, such as those automatically added + ;; by `gnu-build-system`. + (replace 'configure + (lambda* (#:key inputs (configure-flags '()) #:allow-other-keys) + ;; add flags which are always required: + (let ((flags (cons* (string-append "--installprefix=" #$output) "ZLIB=-lz" "LZ4=-llz4" "--libkernel" @@ -272,90 +266,78 @@ (define src ;; and letting Chez try causes an error "--nogzip-man-pages" configure-flags))) - (format #t "configure flags: ~s~%" flags) - ;; Some makefiles (for tests) don't seem to propagate CC - ;; properly, so we take it out of their hands: - (setenv "CC" ,(cc-for-target)) - (setenv "HOME" "/tmp") - (apply invoke - "./configure" - flags)))) - ;; The binary file name is called "scheme" as is the one from MIT/GNU - ;; Scheme. We add a symlink to use in case both are installed. - (add-after 'install 'install-symlink - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib")) - (name "chez-scheme")) - (symlink (string-append bin "/scheme") - (string-append bin "/" name)) - (map (lambda (file) - (symlink file (string-append (dirname file) - "/" name ".boot"))) - (find-files lib "scheme.boot"))))) - ;; Building explicitly lets us avoid using substitute* - ;; to re-write makefiles. - (add-after 'install-symlink 'prepare-stex - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((stex+version - (strip-store-file-name - (assoc-ref (or native-inputs inputs) "stex"))) - ;; Eventually we want to install stex as a real - ;; package so it's reusable. For now: - (stex-output "/tmp") - (doc-dir (string-append stex-output - "/share/doc/" - stex+version))) - (with-directory-excursion "stex" - (invoke "make" - "install" - (string-append "LIB=" - stex-output - "/lib/" - stex+version) - (string-append "Scheme=" - (assoc-ref outputs "out") - "/bin/scheme")) - (for-each (lambda (pth) - (install-file pth doc-dir)) - '("ReadMe" ; includes the license - "doc/stex.html" - "doc/stex.css" - "doc/stex.pdf")))))) - ;; Building the documentation requires stex and a running scheme. - ;; FIXME: this is probably wrong for cross-compilation - (add-after 'prepare-stex 'install-doc - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((chez+version (strip-store-file-name - (assoc-ref outputs "out"))) - (stex+version - (strip-store-file-name - (assoc-ref (or native-inputs inputs) "stex"))) - (scheme (string-append (assoc-ref outputs "out") - "/bin/scheme")) - ;; see note on stex-output in phase build-stex, above: - (stexlib (string-append "/tmp" - "/lib/" - stex+version)) - (doc-dir (string-append (assoc-ref outputs "doc") - "/share/doc/" - chez+version))) - (define* (stex-make #:optional (suffix "")) - (invoke "make" - "install" - (string-append "Scheme=" scheme) - (string-append "STEXLIB=" stexlib) - (string-append "installdir=" doc-dir suffix))) - (with-directory-excursion "csug" - (stex-make "/csug")) - (with-directory-excursion "release_notes" - (stex-make "/release_notes")) - (with-directory-excursion doc-dir - (symlink "release_notes/release_notes.pdf" - "release_notes.pdf") - (symlink "csug/csug9_5.pdf" - "csug.pdf")))))))) + (format #t "configure flags: ~s~%" flags) + ;; Some makefiles (for tests) don't seem to propagate CC + ;; properly, so we take it out of their hands: + (setenv "CC" #$(cc-for-target)) + (setenv "HOME" "/tmp") + (apply invoke "./configure" flags)))) + ;; The binary file name is called "scheme" as is the one from + ;; MIT/GNU Scheme. We add a symlink to use in case both are + ;; installed. + (add-after 'install 'install-symlink + (lambda* (#:key outputs #:allow-other-keys) + (let* ((scheme (search-input-file outputs "/bin/scheme")) + (bin-dir (dirname scheme))) + (symlink scheme + (string-append bin-dir "/chez-scheme")) + (match (find-files (string-append bin-dir "/../lib") + "scheme.boot") + ((scheme.boot) + (symlink scheme.boot + (string-append (dirname scheme.boot) + "/chez-scheme.boot"))))))) + ;; Building explicitly lets us avoid using substitute* + ;; to re-write makefiles. + (add-after 'install-symlink 'prepare-stex + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + ;; Eventually we want to install stex as a real + ;; package so it's reusable. For now: + (let* ((stex-output "/tmp") + (doc-dir (string-append stex-output "/share/doc/stex"))) + (with-directory-excursion "stex" + (invoke "make" + "install" + (string-append "LIB=" + stex-output + "/lib/stex") + (string-append "Scheme=" + (search-input-file outputs + "/bin/scheme"))) + (for-each (lambda (pth) + (install-file pth doc-dir)) + '("ReadMe" ; includes the license + "doc/stex.html" + "doc/stex.css" + "doc/stex.pdf")))))) + ;; Building the documentation requires stex and a running scheme. + ;; FIXME: this is probably wrong for cross-compilation + (add-after 'prepare-stex 'install-doc + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (match (assoc-ref outputs "doc") + (#f + (format #t "not installing docs~%")) + (doc-prefix + (let* ((chez+version (strip-store-file-name #$output)) + (scheme (search-input-file outputs "/bin/scheme")) + (stexlib "/tmp/lib/stex") + (doc-dir (string-append doc-prefix + "/share/doc/" + chez+version))) + (define* (stex-make #:optional (suffix "")) + (invoke "make" "install" + (string-append "Scheme=" scheme) + (string-append "STEXLIB=" stexlib) + (string-append "installdir=" doc-dir suffix))) + (with-directory-excursion "csug" + (stex-make "/csug")) + (with-directory-excursion "release_notes" + (stex-make "/release_notes")) + (with-directory-excursion doc-dir + (symlink "release_notes/release_notes.pdf" + "release_notes.pdf") + (symlink "csug/csug9_5.pdf" + "csug.pdf")))))))))) ;; Chez Scheme does not have a MIPS backend. ;; FIXME: Debian backports patches to get armhf working. ;; We should too. It is the Chez machine type arm32le diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 10ec0591d9..73de273c64 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -257,10 +257,7 @@ (define (make-unpack-nanopass+stex) ;; TODO: Refactor enough to share this directly. #~(begin (copy-recursively - #$(match (assoc-ref (package-native-inputs chez-scheme) - "nanopass") - ((src) - src)) + #$nanopass "nanopass" #:keep-mtime? #t) (mkdir-p "stex") From patchwork Sun Feb 27 02:34:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 567 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 0C5A727BBE9; Sun, 27 Feb 2022 02:39:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 9070A27BBEA for ; Sun, 27 Feb 2022 02:39:45 +0000 (GMT) Received: from localhost ([::1]:40902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TM-0007x7-Og for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sl-0006yu-UR for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sl-0006Vb-Kl for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sl-0004Jq-HX for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 18/24] gnu: Add stex. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592954116498 (code B ref 53878); Sun, 27 Feb 2022 02:39:07 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:01 +0000 Received: from localhost ([127.0.0.1]:56586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sf-0004Hv-12 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:01 -0500 Received: from mail-qk1-f175.google.com ([209.85.222.175]:38410) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SL-0004Gu-37 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:41 -0500 Received: by mail-qk1-f175.google.com with SMTP id n185so7820789qke.5 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=; b=VZ4BdIiC4E5Wkugz4uVj2kp6uEBsoWdjYrXhppgdvDiAiu1P+aZwr1W05QH/CJucAc w6PAWfLH9SRWlSfgiw2uWwBm1apIqw2cshHR9P7Ch8LKJqwbsogzdBgvS+c2CFOlUtlf 5EWO81YXhUgN6bI1DgRnFZQuZgrV5Odpx2PDdew53WKY76ziSXfTXmbweDro5fnUp5Ac GPZtzFUeLIxELu1Rf0S+u7EwM2VZ7/uesMltpWitNnmWji+wNRPOtfwLH2MBdBejga4e BYbfl2bDRPqebRCovvduKsiFJYQrivdklsKWdTASbLQJ/XMgnI2z6U34VXswYfLsWKkM WrJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=; b=owiuAV7eWkWotBqRcXce1zGsYoMBrSTiSD6Hmx398IY23G8U8OiHqvvF7osN4YSj7V +EdeaiXpPEaJ1FchzuCp20A8nMy60uaTcp2POOn/864BSjsDm/BxOLXz1VTTvXBKvvvV QoYul3TIMR7wbrvcMSc+NTzF8kyD3yz6h8kO11GLTVvcbfUr8zixJAX9NwzGS92QFa3n tjamRWrx1HsR1Fr7IcTn8Ct4SDKjwBBQLouaybr2O5kMRsoKryvynUPNEgiuhad7sVuI pYZfWhsuZq5VdMQgdFf4G4BgeIfrN5DXqfJqnWz32AAWbSbiG9ZesnkXjlIg+owsMZ7g sYMQ== X-Gm-Message-State: AOAM530/n2oWyvtu+omMk/x8JBrR+19w03Sltk0ArJqG0a8det31j+ZJ s+cwVdTNznMHbnyX139APIhhaehSCqrHyXbWEvg= X-Google-Smtp-Source: ABdhPJy3Vn39YbWy2mBmbTjDXshRUvE8P4DYsR+kf6ILqaTCTnAeAfo7zjW5izojL+oCSI0Ei8NGaQ== X-Received: by 2002:a05:620a:48d:b0:5f1:872f:1fdb with SMTP id 13-20020a05620a048d00b005f1872f1fdbmr8266368qkr.675.1645929515338; Sat, 26 Feb 2022 18:38:35 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id a17-20020a05622a02d100b002dd2cab0326sm4371437qtx.23.2022.02.26.18.38.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:35 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:44 -0500 Message-Id: <20220227023450.1877215-19-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (stex-bootstrap): New hidden package. (stex): Change from origin to package inheriting from 'stex-bootstrap' (chez-scheme)[native-inputs]: Add 'stex-bootstrap'. Remove dependencies of stex-bootstrap. [arguments]<#:phases>: Remove 'prepare-stex'. Adjust 'unpack-nanopass+stex' and 'install-doc'. --- gnu/packages/chez.scm | 217 ++++++++++++++++++++++++++++++------------ 1 file changed, 155 insertions(+), 62 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index ad263a8fe3..6855195cfe 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -33,6 +33,7 @@ (define-module (gnu packages chez) #:use-module (guix gexp) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) + #:use-module (guix build-system copy) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages ghostscript) @@ -158,30 +159,6 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; -(define-public nanopass - (let ((version "1.9.2")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nanopass/nanopass-framework-scheme") - (commit (string-append "v" version)))) - (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) - (file-name (git-file-name "nanopass" version))))) - -(define stex - ;; This commit includes a fix, which we would otherwise want to use as - ;; patch. Let's revert to tagged releases as soon as one becomes available. - (let* ((commit "54051494434a197772bf6ca5b4e6cf6be55f39a5") - (version "1.2.2") - (version (git-version version "1" commit))) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/dybvig/stex") - (commit commit))) - (sha256 (base32 "01jnvw8qw33gnpzwrakwhsr05h6b609lm180jnspcrb7lds2p23d")) - (file-name (git-file-name "stex" version))))) - (define-public chez-scheme (package (name "chez-scheme") @@ -218,15 +195,7 @@ (define-public chez-scheme libx11)) (native-inputs (list nanopass ; source only - ;; for docs - stex - xorg-rgb - (texlive-updmap.cfg (list texlive-dvips-l3backend - texlive-epsf - texlive-fonts-ec - texlive-oberdiek)) - ghostscript - netpbm)) + stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -249,9 +218,11 @@ (define-public chez-scheme (copy-recursively #$nanopass "nanopass" #:keep-mtime? #t) - (copy-recursively #$stex - "stex" - #:keep-mtime? #t))) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -287,32 +258,9 @@ (define-public chez-scheme (symlink scheme.boot (string-append (dirname scheme.boot) "/chez-scheme.boot"))))))) - ;; Building explicitly lets us avoid using substitute* - ;; to re-write makefiles. - (add-after 'install-symlink 'prepare-stex - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - ;; Eventually we want to install stex as a real - ;; package so it's reusable. For now: - (let* ((stex-output "/tmp") - (doc-dir (string-append stex-output "/share/doc/stex"))) - (with-directory-excursion "stex" - (invoke "make" - "install" - (string-append "LIB=" - stex-output - "/lib/stex") - (string-append "Scheme=" - (search-input-file outputs - "/bin/scheme"))) - (for-each (lambda (pth) - (install-file pth doc-dir)) - '("ReadMe" ; includes the license - "doc/stex.html" - "doc/stex.css" - "doc/stex.pdf")))))) ;; Building the documentation requires stex and a running scheme. ;; FIXME: this is probably wrong for cross-compilation - (add-after 'prepare-stex 'install-doc + (add-after 'install-symlink 'install-doc (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (match (assoc-ref outputs "doc") (#f @@ -320,7 +268,9 @@ (define-public chez-scheme (doc-prefix (let* ((chez+version (strip-store-file-name #$output)) (scheme (search-input-file outputs "/bin/scheme")) - (stexlib "/tmp/lib/stex") + (stexlib (search-input-directory (or native-inputs + inputs) + "/lib/stex")) (doc-dir (string-append doc-prefix "/share/doc/" chez+version))) @@ -420,7 +370,150 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (license (list asl2.0)))) ;; -;; Packages: +;; Chez's bootstrap dependencies: +;; + +(define-public stex-bootstrap + ;; This commit includes a fix which we would otherwise want to use as + ;; patch. Let's revert to tagged releases as soon as one becomes available. + (let ((commit "54051494434a197772bf6ca5b4e6cf6be55f39a5") + (revision "1")) + (hidden-package + (package + (name "stex") + ;; ^ Debian calls this "stex", not "chez-stex". It is a set of + ;; command-line tools, and there isn't a Scheme API, let alone a + ;; Chez-specific one, except perhaps that the Scheme examples are + ;; assumed to be Chez-compatible. + (version (git-version "1.2.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dybvig/stex") + (commit commit))) + (sha256 + (base32 "01jnvw8qw33gnpzwrakwhsr05h6b609lm180jnspcrb7lds2p23d")) + (file-name (git-file-name name version)) + (snippet + #~(for-each delete-file + '("sbin/install" "doc/stex.pdf" "doc/stex.html"))))) + (outputs '("out")) + (build-system copy-build-system) + ;; N.B. Upstream does not seem to support cross-compilation, + ;; though it would probably be easy to add. + (propagated-inputs + (list xorg-rgb + (texlive-updmap.cfg + (list texlive-dvips-l3backend + texlive-hyperref + texlive-bibtex + texlive-epsf + texlive-fonts-ec + texlive-oberdiek)) + ghostscript + netpbm)) + ;; Debian uses a versionless path for STEXLIB, + ;; which is much more convienient. + (arguments + (list + #:install-plan #~`(("inputs" "lib/stex/") + ("gifs" "lib/stex/") + ("math" "lib/stex/") + ("src" "lib/stex/") + ("Mf-stex" "lib/stex/") + ("Makefile.template" "lib/stex/")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'patch-sources + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (define scheme + (false-if-exception + (search-input-file inputs "/bin/scheme"))) + (when scheme + (setenv "Scheme" scheme)) + (substitute* '("Makefile.template" + "doc/Makefile") + (("STEXLIB=[^\n]*") + (string-append "STEXLIB=" #$output "/lib/stex")) + (("Scheme=[^\n]*") + (string-append "Scheme=" (or scheme "scheme")))) + (substitute* '("Mf-stex" + "math/Makefile") + (("/bin/rm") + "rm")) + (substitute* "Mf-stex" + (("SHELL=bash") + ;; avoid Solaris workaround + "#SHELL=bash")))) + (add-after 'install 'maybe-compile + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (cond + ((getenv "Scheme") + => (lambda (scheme) + (define makefile + (string-append (getcwd) "/Makefile")) + (define machine + #$(chez-machine->threaded + (nix-system->chez-machine))) + (with-directory-excursion + (search-input-directory outputs "/lib/stex") + (invoke "make" + "-f" makefile + (string-append "Scheme=" scheme)) + (for-each delete-file + (find-files machine "\\."))))) + (else + ;; for bootstrapping, can run without ahead-of-time + ;; compilation + (format #t "not compiling~%"))))) + (add-after 'maybe-compile 'maybe-make-docs + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (cond + ((assoc-ref outputs "doc") + => (lambda (doc-prefix) + (define doc-dir + (string-append doc-prefix "/share/doc/stex")) + ;; the Makefile is referenced in the documentation + (copy-recursively "doc" doc-dir) + (install-file "ReadMe" doc-dir) + (with-directory-excursion "doc" + (invoke "make") + (install-file "stex.html" doc-dir) + (install-file "stex.pdf" doc-dir)))) + (else + (format #t "not making docs~%")))))))) + (home-page "https://github.com/dybvig/stex") + (synopsis "LaTeX with embeded Scheme code and HTML generation") + (description "The @code{stex} package extends LaTeX with a handful of +commands for including Scheme code (or pretty much any other kind of code, as +long as you don't plan to use the Scheme-specific transcript support) in a +document. It provides the programs @code{scheme-prep} and @code{html-prep} to +convert @code{stex} documents to LaTeX and HTML, respectively, plus makefile +templates, style files, and other resources. The @code{stex} system is used +to typeset @cite{The Scheme Programming Language} and the @cite{Chez Scheme +User's Guix}, among other documents.") + (license expat))))) + +(define-public stex + (package/inherit stex-bootstrap + (inputs (modify-inputs (package-inputs stex-bootstrap) + (prepend chez-scheme))) + (outputs '("out" "doc")) + (properties '()))) + +(define-public nanopass + (let ((version "1.9.2")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nanopass/nanopass-framework-scheme") + (commit (string-append "v" version)))) + (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) + (file-name (git-file-name "nanopass" version))))) + +;; +;; Other Chez packages: ;; ;; Help function for Chez Scheme to add the current path to From patchwork Sun Feb 27 02:34:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 568 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 2D65827BBEB; Sun, 27 Feb 2022 02:39:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 1641E27BBE9 for ; Sun, 27 Feb 2022 02:39:52 +0000 (GMT) Received: from localhost ([::1]:41394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TT-0008Hx-8I for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sm-00070z-Ha for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34474) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sm-0006Vu-6Y for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sm-0004Jx-2j for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 19/24] gnu: Add chez-nanopass. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592954216515 (code B ref 53878); Sun, 27 Feb 2022 02:39:07 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:02 +0000 Received: from localhost ([127.0.0.1]:56588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sf-0004I3-M1 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:02 -0500 Received: from mail-qv1-f47.google.com ([209.85.219.47]:39638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SP-0004H4-M4 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:46 -0500 Received: by mail-qv1-f47.google.com with SMTP id a1so9819837qvl.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=37H5h/fHk3NNbAT7Uc9bISFfMqOBQXf0BvVKkBIp2Fs=; b=PTHC7osGRGdFdvGB5rkcNarMJgqhYrCuRB+9Qmnms2a8HOKtdFT3FOUVjlSLv/6981 GvkFFJ0xqsLFqH5bUP+epou5Y9L+SKRyVk4FZFx8f4KI47o15cQbWC2kevGmpWbKs4Lj EWZ0SNx3eryCvc2EjB8uQV2IEF4dDUgGo4pKL5RNEsnvNCAb9k2ZeZWntpKjMAB0uXQC c+Io/Hc9l0nFcIxET5lYLWzaqsW3RhbUzLnpfVrC8+C8MJdJZahjx87KD/rIl3+0Zron yQ/n/mMorTw+0M04033Pgd1PR237BNnw+z+MrNXIq2HXbXJEM3ByuKzwzWikB3H4lCJA cCaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=37H5h/fHk3NNbAT7Uc9bISFfMqOBQXf0BvVKkBIp2Fs=; b=NgghkjDJT3mgriSW+ly1UtEnQ7C1+WYgZDJiaFaujB+QjPHwj9kdxEOvf6eCoD/1Gy G33qGMHqVwkMdkJ9eAMSsAIYNUNrzH69Ll+B6/UqulDncD659vmMA/w/Fwhtn687nN2l Ybld/J6sWJTqH3wqJLfWea8yXuTogG0wk0jMfXPPTMbrmEm0VvhmwKI/rwFQ8PwjxQzk 2gHRrku1pQnb6lTyPhK888TwZtxzUUOeYTkUS3tqIebpIwUBsXJJU3s0PHLAbNtRbocL jUS0CieLYdQ7PabGiKccfEqt11woChuEqy5IR5fm1uSzH1EZgyw/ZLfn98xcGtF8PrLV f0Rg== X-Gm-Message-State: AOAM530lMgkJ2os2ZTi6xaF+sfvAaLb/98+JR7F1269Q7AtP3+l3iFEu zY0W4YcXpdw292oGbFO7Pvcpi+2CX/KFFWMc3po= X-Google-Smtp-Source: ABdhPJyk91sfi2fm5bHg8zQuR6RxVpQDGRGm8IJbESVsKhWDWMTYBZpmTa+fzbfENxWN72yRskdsCw== X-Received: by 2002:a05:6214:2482:b0:432:4bf6:47b7 with SMTP id gi2-20020a056214248200b004324bf647b7mr10640590qvb.38.1645929520031; Sat, 26 Feb 2022 18:38:40 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id n8-20020a05620a222800b004e0e071f382sm3161150qkh.125.2022.02.26.18.38.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:39 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:45 -0500 Message-Id: <20220227023450.1877215-20-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (nanopass): Rename to ... (chez-nanopass-bootstrap): ... this new variable, and promote it from an origin to a package. (chez-nanopass): New variable. (unpack-nanopass+stex): New variable using 'chez-nanopass-bootstrap'. (chez-scheme-for-racket-bootstrap-bootfiles, chez-scheme)[native-inputs]: Add 'chez-nanopass-bootstrap'. [arguments]<#:phases>: Adapt 'unpack-nanopass+stex' phase to use the eponymous new variable. * gnu/packages/racket.scm (racket-vm-cs): Likewise. (make-unpack-nanopass+stex): Remove it. --- gnu/packages/chez.scm | 122 +++++++++++++++++++++++++++++++--------- gnu/packages/racket.scm | 19 +------ 2 files changed, 98 insertions(+), 43 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 6855195cfe..43d2c764f3 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -48,7 +48,8 @@ (define-module (gnu packages chez) #:use-module (srfi srfi-1) #:export (nix-system->chez-machine chez-machine->nonthreaded - chez-machine->threaded)) + chez-machine->threaded + unpack-nanopass+stex)) (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string @@ -159,6 +160,20 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; + +(define unpack-nanopass+stex + #~(begin + (copy-recursively + (dirname (search-input-file %build-inputs + "lib/chez-scheme/nanopass.ss")) + "nanopass" + #:keep-mtime? #t) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) + (define-public chez-scheme (package (name "chez-scheme") @@ -176,6 +191,9 @@ (define-public chez-scheme (file-name (git-file-name name version)) (snippet #~(begin (use-modules (guix build utils)) + ;; TODO: consider putting this in a (guix ...) or + ;; (guix build ...) module so it can be shared + ;; with the Racket origin without cyclic issues. (for-each (lambda (dir) (when (directory-exists? dir) (delete-file-recursively dir))) @@ -193,9 +211,7 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs - (list nanopass ; source only - stex-bootstrap)) + (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -215,14 +231,7 @@ (define-public chez-scheme #~(modify-phases %standard-phases (add-after 'unpack 'unpack-nanopass+stex (lambda args - (copy-recursively #$nanopass - "nanopass" - #:keep-mtime? #t) - (mkdir-p "stex") - (with-output-to-file "stex/Mf-stex" - (lambda () - ;; otherwise, it will try to download submodules - (display "# to placate ../configure"))))) + #$unpack-nanopass+stex)) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -317,7 +326,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; When updating, remember to also update %racket-version in racket.scm. (source #f) ; avoid problematic cycle with racket.scm (inputs `()) - (native-inputs (list racket-vm-bc)) + (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) (build-system copy-build-system) ;; TODO: cross compilation (arguments @@ -336,10 +345,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (chdir "racket/src/ChezScheme"))) (add-after 'chdir 'unpack-nanopass+stex (lambda args - (copy-recursively - #$nanopass - "nanopass" - #:keep-mtime? #t))) + #$unpack-nanopass+stex)) (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) @@ -502,15 +508,79 @@ (define-public stex (outputs '("out" "doc")) (properties '()))) -(define-public nanopass - (let ((version "1.9.2")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nanopass/nanopass-framework-scheme") - (commit (string-append "v" version)))) - (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) - (file-name (git-file-name "nanopass" version))))) +(define-public chez-nanopass-bootstrap + (hidden-package + (package + (name "chez-nanopass") + (version "1.9.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nanopass/nanopass-framework-scheme") + (commit (string-append "v" version)))) + (sha256 + (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) + (file-name (git-file-name "nanopass-framework-scheme" version)) + (snippet + #~(begin + (use-modules (guix build utils)) + (when (file-exists? "doc/user-guide.pdf") + (delete-file "doc/user-guide.pdf")) + (substitute* "doc/Makefile" + (("include ~/stex/Mf-stex") + "include $(STEXLIB)/Mf-stex")))))) + (build-system copy-build-system) + (arguments + (list #:install-plan + #~`(("nanopass.ss" "lib/chez-scheme/") + ("nanopass" "lib/chez-scheme/")))) + (home-page "https://nanopass.org") + (synopsis "DSL for compiler development") + (description "The Nanopass framework is an embedded domain-specific +language for writing compilers composed of several simple passes that +operate over well-defined intermediate languages. The goal of this +organization is both to simplify the understanding of each pass, because it +is responsible for a single task, and to simplify the addition of new passes +anywhere in the compiler. Nanopass reduces the boilerplate required to +create compilers, making them easier to understand and maintain.") + (license expat)))) + +(define-public chez-nanopass + (package/inherit chez-nanopass-bootstrap + (properties '()) + ;; TODO: cross-compilation + (native-inputs (list chez-scheme stex)) + (arguments + (substitute-keyword-arguments (package-arguments chez-nanopass-bootstrap) + ((#:install-plan base-plan) + #~`(("nanopass.so" "lib/chez-scheme/") + ("doc/user-guide.pdf" #$(string-append + "share/doc/" + (package-name this-package) + "-" + (package-version this-package) + "/")) + ,@#$base-plan)) + ((#:phases base-phases #~%standard-phases) + #~(modify-phases #$base-phases + (add-before 'install 'compile-and-test + (lambda args + (invoke "scheme" + "--compile-imported-libraries" + "--program" "test-all.ss"))) + (add-after 'compile-and-test 'build-doc + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "doc" + (invoke "make" + (string-append "Scheme=" + (search-input-file + (or native-inputs inputs) + "/bin/scheme")) + (string-append "STEXLIB=" + (search-input-directory + (or native-inputs inputs) + "/lib/stex")))))))))))) ;; ;; Other Chez packages: diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 73de273c64..c96bebe325 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -251,22 +251,6 @@ (define (racket-vm-common-configure-flags) "--disable-strip" "--enable-origtree")) -(define (make-unpack-nanopass+stex) - ;; Adapted from chez-scheme. - ;; Thunked to avoid evaluating 'chez-scheme' too early. - ;; TODO: Refactor enough to share this directly. - #~(begin - (copy-recursively - #$nanopass - "nanopass" - #:keep-mtime? #t) - (mkdir-p "stex") - (with-output-to-file "stex/Mf-stex" - (lambda () - ;; otherwise, it will try to download submodules - (display "# to placate ../configure"))))) - - (define-public racket-vm-cgc ;; Eventually, it may make sense for some vm packages to not be hidden, ;; but this one is especially likely to remain hidden. @@ -417,6 +401,7 @@ (define-public racket-vm-cs (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") (prepend chez-scheme-for-racket-bootstrap-bootfiles + chez-nanopass-bootstrap racket-vm-bc))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) @@ -425,7 +410,7 @@ (define-public racket-vm-cs (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" - #$(make-unpack-nanopass+stex)))) + #$unpack-nanopass+stex))) (add-after 'unpack-nanopass+stex 'unpack-bootfiles (lambda* (#:key native-inputs inputs #:allow-other-keys) (with-directory-excursion "racket/src/ChezScheme" From patchwork Sun Feb 27 02:34:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 569 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 73EB927BBEA; Sun, 27 Feb 2022 02:39:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 85BE627BBE9 for ; Sun, 27 Feb 2022 02:39:53 +0000 (GMT) Received: from localhost ([::1]:41522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9TU-0008NI-Mw for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sm-00072z-W1 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34475) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sm-0006WB-MD for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sm-0004KA-J1 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 20/24] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592954316532 (code B ref 53878); Sun, 27 Feb 2022 02:39:08 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:03 +0000 Received: from localhost ([127.0.0.1]:56590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sg-0004IJ-Nt for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:43935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SU-0004HF-3w for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:50 -0500 Received: by mail-qv1-f48.google.com with SMTP id c14so4983571qvk.10 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=; b=IvyWGC3/WAamEPbYFZAPqXe3iN8twafURrbbabbFe3RoPHkbMaEvQUpR+maPNsESCL UvUXKl4HPYG4yn3dSMrawFRgml/9ofTlAkuQW6TQ3y7kf95x6H3pz8mpl0CSKPeuz2as /+QkhxjTL5fIRWGM9j5b/peA2f7DyUFVnvXqvdr70qV6S29e+kLRU+mZym0as/su/ObT Zm8aMKKm8KJZlVcmdxCJ5Pix0RRwoUY3yNfpCBtKLhmhFOdRgOkFzNH5Bzy6vHJ8Rdlp H3s34iVJKgfUp1dhNxDE/SDOjpgKxgRR5EaWPD3U0twy5YmZ0jbghtX9W8DRlfYjoGzs aGCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=; b=MMsweiI4LbZ+qmvp5+moSJ2aDkjDn2RF1U9i7vEqZVyGOX6Y/Q1FTfo0IM1GrPueUK SqR0nprZuw+Bo0FI64/Zik+PXf04F71veamdnplMp3X5F1kSM4Ke4EQ/i738z4vo4F+I UHCbA/0S1xcYWx13im/1TNM9xfTnO0PekARzosMC5pFQEHEIjOffjrOw3qmpCVSm2k6G mlMvbHg4PA0Esy1cGmNqjX4HDAcnEiDSENlz5ugWd4PhT/LizUh+Gs5ZAcbdlcQ2PQnx lokdiaFeBfOYYi2tpByNQ5G2h4y3ehyX01xrTkLJIQtlBNCPmOt+4AXJwPCea0j/irMx eipQ== X-Gm-Message-State: AOAM53110i/+nYnYeGQgXsdmvHJfu4rBFOsyMzXH/wJ7rZeujJeqIBpG +2la1WFBJaivqmzPsAQWCDOxJODGxkB3uMrRaq0= X-Google-Smtp-Source: ABdhPJw0nSr/iO642IP31ic3vIRLqIGe+JyPVh4FTtK/c3yb9++5htnvfTjBvXjADYdLOZN5NT5gcA== X-Received: by 2002:a05:6214:21ee:b0:433:baf:21a3 with SMTP id p14-20020a05621421ee00b004330baf21a3mr342992qvj.4.1645929524535; Sat, 26 Feb 2022 18:38:44 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id f19-20020a379c13000000b006490363756fsm3269672qke.21.2022.02.26.18.38.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:44 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:46 -0500 Message-Id: <20220227023450.1877215-21-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 This makes the structure of the upstream Chez Scheme package the same as for the Racket variant, it sets things up for (one day, hopefully) actually being able to bootstrap the upstream Chez Scheme bootfiles, and it may be useful for cross-compilation and adding support for architectures without pre-built bootfiles from upstream. * gnu/packages/chez.scm (chez-scheme-bootstrap-bootfiles): New variable. (chez-scheme)[native-inputs]: Add it. [arguments]<#:phases>: Add 'unpack-bootfiles'. (chez-scheme-for-racket-bootstrap-bootfiles): Inherit from 'chez-scheme-bootstrap-bootfiles'. [arguments]: Adapt accordingly. --- gnu/packages/chez.scm | 98 +++++++++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 26 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 43d2c764f3..da267d3616 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -46,6 +46,7 @@ (define-module (gnu packages chez) #:use-module (gnu packages xorg) #:use-module (ice-9 match) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:export (nix-system->chez-machine chez-machine->nonthreaded chez-machine->threaded @@ -211,7 +212,9 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) + (native-inputs (list chez-scheme-bootstrap-bootfiles + chez-nanopass-bootstrap + stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -232,6 +235,14 @@ (define-public chez-scheme (add-after 'unpack 'unpack-nanopass+stex (lambda args #$unpack-nanopass+stex)) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (when (directory-exists? "boot") + (delete-file-recursively "boot")) + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot"))) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -316,8 +327,46 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-bootstrap-bootfiles + (package + (inherit chez-scheme) + (name "chez-scheme-bootstrap-bootfiles") + (inputs '()) + (native-inputs '()) + (outputs '("out")) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")))) + (supported-systems + ;; Upstream only distributes pre-built bootfiles for + ;; arm32le and t?(i3|a6)(le|nt|osx) + (filter (lambda (system) + (let ((machine (and=> (nix-system->chez-machine system) + chez-machine->nonthreaded))) + (or (equal? "arm32le" machine) + (and machine + (member (substring machine 0 2) '("i3" "a6")) + (or-map (cut string-suffix? <> machine) + '("le" "nt" "osx")))))) + %supported-systems)) + (synopsis "Chez Scheme bootfiles (binary seed)") + (description + "Chez Scheme is a self-hosting compiler: building it requires +``bootfiles'' containing the Scheme-implemented portions compiled for the +current platform. (Chez can then cross-compile bootfiles for all other +supported platforms.) + +This package provides bootstrap bootfiles for upstream Chez Scheme. +Currently, it simply packages the binaries checked in to the upsream +repository. Hopefully we can eventually adapt Racket's @code{cs-bootstrap} to +work with upstream Chez Scheme so that we can bootstrap these files from +source."))) + (define-public chez-scheme-for-racket-bootstrap-bootfiles (package + (inherit chez-scheme-bootstrap-bootfiles) (name "chez-scheme-for-racket-bootstrap-bootfiles") (version "9.5.7.3") ;; The version should match `(scheme-fork-version-number)`. @@ -325,32 +374,30 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; It will always be different than the upstream version! ;; When updating, remember to also update %racket-version in racket.scm. (source #f) ; avoid problematic cycle with racket.scm - (inputs `()) (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) - (build-system copy-build-system) ;; TODO: cross compilation (arguments - (list - #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")) - #:phases - #~(let ((unpack (assoc-ref %standard-phases 'unpack))) - (modify-phases %standard-phases - (replace 'unpack - (lambda args - (unpack #:source #$(or (package-source this-package) - (package-source racket-vm-bc))))) - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/ChezScheme"))) - (add-after 'chdir 'unpack-nanopass+stex - (lambda args - #$unpack-nanopass+stex)) - (add-before 'install 'build - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt"))))))) + (substitute-keyword-arguments + (package-arguments chez-scheme-bootstrap-bootfiles) + ((#:phases those-phases #~%standard-phases) + #~(let* ((those-phases #$those-phases) + (unpack (assoc-ref those-phases 'unpack))) + (modify-phases those-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + #$unpack-nanopass+stex)) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/opt/racket-vm/bin/racket") + "rktboot/main.rkt")))))))) (supported-systems (filter nix-system->chez-machine %supported-systems)) (home-page "https://github.com/racket/ChezScheme") @@ -372,8 +419,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream -Chez Scheme.") - (license (list asl2.0)))) +Chez Scheme."))) ;; ;; Chez's bootstrap dependencies: From patchwork Sun Feb 27 02:34:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 570 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 4F0DB27BBEA; Sun, 27 Feb 2022 02:39:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 E345C27BBE9 for ; Sun, 27 Feb 2022 02:39:58 +0000 (GMT) Received: from localhost ([::1]:41852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Ta-0000Bf-5J for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:39:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sn-00074o-CT for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sn-0006XV-2G for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sn-0004KI-01 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 21/24] gnu: chez-mit: Support chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592954416544 (code B ref 53878); Sun, 27 Feb 2022 02:39:08 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:04 +0000 Received: from localhost ([127.0.0.1]:56594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sh-0004IZ-HI for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:04 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:35402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9SY-0004HR-Ht for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:38:54 -0500 Received: by mail-qv1-f53.google.com with SMTP id 8so9858562qvf.2 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=; b=X3nR0Il9hgVL89qU3kmZ+JCchhV/8qYIj3/onBdwYoZS8cuuWr2rO10yPbnQcV2Gbk JD/zH6TcEKAZGctjilEo8JqdJMq4vJ19Bzw36zm+b5XSWE5/ADpXLx2bcA3Kc2rkB8iW QfjSKHidLrOB5uoyIMt7dKOcLv+Ns89DEvvh6rWxANtho5v1LGBj2RHxIUwetDqg2a8N zyjiRegll0kcpKh+O7QOcg4Mf5QiY9GpqRjSpMmExarmSdopor02h/ymRUWaytEdzmVR Ss1McolHGmXCHN8EHufhnJGai+2z8wfgdjf/ZNVE3DYtyurRWb1Kudtv7eOgRhw8XqJ0 U+Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=; b=MoAA7caRuCTwv/P4AzraiMskpKmPYAGeOX8H5/4SVOy8GmpzJfKPV9JhYGtImDC8G+ 4GMTGvFwVLsBjLcSWO3pa0an7OLsgfeFBV73wMnUIjN+rp4EAWqhu7g2LudvEF1P2WC2 ul5CLDUXCADdc6nvq/mA4GKKC6NB0i7EXhMeN3LlJK0iOU1irUhnQhmvL37KenbS+Tko xt8s2adXEnO0as8e7xZO/snQ0CLpNNNT6392tqSu5FCiGD1jrxnqR+4pRi9s9WfX+zTs t3AEu0Sa1TAKmm+sJ8mdWmf0RrUamiBDmlJvWuzQ7E8XJbT0m00kZ53pOl8kcU91DdXb kgkw== X-Gm-Message-State: AOAM530Q7PHoVecbIKXhBNupO8ht0QNUtEOsUjM+v697tvHHyPuwAlsQ mvTgHE9Ss8wmOYiGn9QXLvDugUQ5X8nkK5j5Tng= X-Google-Smtp-Source: ABdhPJzNmIxH+b7hSe6881XsxFpgjkmfXh0/TE8PTocB58E/vbcMVSft41QMaIOnnMNmIniVdQ9xLQ== X-Received: by 2002:a05:6214:1548:b0:432:a21a:2759 with SMTP id t8-20020a056214154800b00432a21a2759mr9524413qvw.88.1645929529090; Sat, 26 Feb 2022 18:38:49 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id p12-20020a05622a048c00b002de8f67b60dsm4482354qtx.58.2022.02.26.18.38.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:48 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:47 -0500 Message-Id: <20220227023450.1877215-22-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 Racket's variant of Chez Scheme defines 'string->uninterned-symbol', which conflicts with the definition from '(chez mit)'. See discussion at . * gnu/packages/chez.scm (chez-mit)[origin]: Add workaround for chez-scheme-for-racket. --- gnu/packages/chez.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index da267d3616..5d5108a2b1 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -949,7 +949,29 @@ (define-public chez-mit (commit (string-append "v" version)))) (sha256 (base32 "0c7i3b6i90xk96nmxn1pc9272a4yal4v40dm1a4ybdi87x53zkk0")) - (file-name (git-file-name name version)))) + (file-name (git-file-name name version)) + (snippet + ;; Workaround for chez-scheme-for-racket. + ;; See: https://github.com/racket/racket/issues/4151 + #~(begin + (use-modules (guix build utils)) + (substitute* "mit/core.sls" + (("[(]import ") + "(import (only (chezscheme) import)\n") + (("[(]define string->uninterned-symbol gensym[)]") + (format #f "~s" + '(begin + (import (only (chezscheme) + meta-cond + library-exports)) + (meta-cond + ((memq 'string->uninterned-symbol + (library-exports '(chezscheme))) + (import (only (chezscheme) + string->uninterned-symbol))) + (else + (define string->uninterned-symbol + gensym))))))))))) (build-system gnu-build-system) (inputs (list chez-srfi)) ; for tests From patchwork Sun Feb 27 02:34:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 572 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 F41C627BBEA; Sun, 27 Feb 2022 02:40:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 5987E27BBE9 for ; Sun, 27 Feb 2022 02:40:31 +0000 (GMT) Received: from localhost ([::1]:42162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9U5-0000QX-HU for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:40:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Tk-0000QA-LH for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Tf-0006qi-Kr for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Tf-0004MU-H8 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 22/24] gnu: Add chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592957516704 (code B ref 53878); Sun, 27 Feb 2022 02:40:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:35 +0000 Received: from localhost ([127.0.0.1]:56611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9TC-0004LG-Fw for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:34 -0500 Received: from mail-qk1-f170.google.com ([209.85.222.170]:44612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sc-0004He-VO for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:13 -0500 Received: by mail-qk1-f170.google.com with SMTP id q4so7778452qki.11 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZoWBDgQKu+/EBBDnvmdQuot6TF7P+L6bwBDBflHyYro=; b=A1LIjpSTlAxwbY+PjxST/rnQMCgR5BmnQIt5rs1hiJlCDkr/dBvpp2wp0JLKlQRAe4 vNSrpTJDVOF806lXE1+M82xM+HbVf9z0XQgaWOZ5sQybfmq3H4s3ajnQ9x8tXAskoZ9b aQ0W5x4L3rMeVlrZzBMDBB7W7ejN0EjTPOaoUWDgpmRS2ZYKCeGehYYXVptaSIu39yIr cvx2S1hm5TVNEJdhP1DklpkJzYy8cSePufXpPxDQQpfNrerezhY0awjK3EX4UOpMEnqD 6o/TCUzp8fZQZsAMJaFwitY4XmyZjuORiQ+AmbYU842y6VNegAoNrE2oLwNPi2xdEgyM bWGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZoWBDgQKu+/EBBDnvmdQuot6TF7P+L6bwBDBflHyYro=; b=4U+i/zYgiQS51LLxB5mHjsyY9O+sXFSXKw/cVOCvDXKFJUl3pLg+ErKyjPDxz3AY0U 2KN5TS47f/JfyT9Y21JepFrbFRaMfaiY9H0yB/r6EEJYbf3StC/XNyMwI5NRki4GNILC 4kMNqBzgW0z5by9MLaD9dbNIEF6h+xLUTSKBe07oRU3iDM4rnrgNNsWz4Zvx8EieBFzk sUu4dH+f2qQv19OldjqjFCxRx4mxKATTRgexAXYX+O/NnvrDZzF76SFjCJUu4q4RTvEq B2CAbo++KAphFeUD1K0aPzA17KK3dtj+fze98hbHGJaTEdTRD2kwMFsWSKo1hHUgh3cN AJ9Q== X-Gm-Message-State: AOAM531e8JA/l2zdJcyB1PSy+/WMBizegR7FfZzcvJp+xilWdqVBmEF9 FJYAT6nxz2fHWsMgXc03mcjhdZ/FyyCnBlj0S20= X-Google-Smtp-Source: ABdhPJx3NXxmC+7joC+FmFpSpbnsgDkvQ8WaftTuRBLVCKuWC9WHqIbGRB1dJxQsDBwf44VF3XdZiQ== X-Received: by 2002:a05:620a:35c:b0:648:e0da:8a64 with SMTP id t28-20020a05620a035c00b00648e0da8a64mr8275709qkm.73.1645929533361; Sat, 26 Feb 2022 18:38:53 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id f7-20020a05622a104700b002d4b318692esm4376280qte.31.2022.02.26.18.38.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:53 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:48 -0500 Message-Id: <20220227023450.1877215-23-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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 The Racket variant of Chez Scheme can be used to support platforms that are not yet supported by upstream Chez Scheme. * gnu/packages/chez.scm (chez-scheme-for-racket): New variable. (chez-scheme-for-racket-bootstrap-bootfiles)[version, supported-systems]: Derive from 'chez-scheme-for-racket'. * gnu/packages/racket.scm (%racket-version): Update comment. --- gnu/packages/chez.scm | 97 ++++++++++++++++++++++++++++++++++++++--- gnu/packages/racket.scm | 3 +- 2 files changed, 91 insertions(+), 9 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 5d5108a2b1..e7ddab0d1f 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -52,6 +52,21 @@ (define-module (gnu packages chez) chez-machine->threaded unpack-nanopass+stex)) +;; Commentary: +;; +;; The bootstrapping paths for Chez Scheme and Racket are closely +;; entwined. Racket CS (the default Racket implementation) is based on (a fork +;; of) Chez Scheme. Racket's variant of Chez Scheme shares sources for +;; nanopass and stex with upstream Chez Scheme. +;; +;; Racket's variant of Chez Scheme can be bootstrapped by an older Racket +;; implementation, Racket BC, which can be bootstrapped from C. Porting that +;; code to work with upstream Chez Scheme (or finding an old version that +;; does) is our best hope for some day bootstrapping upstream Chez Scheme from +;; source. +;; +;; Code: + (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string naming the nonthreaded machine type for the same architecture and OS as @@ -327,6 +342,78 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-for-racket + (package + (inherit chez-scheme) + (name "chez-scheme-for-racket") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source #f) ; avoid problematic cycle with racket.scm + (inputs + (modify-inputs (package-inputs chez-scheme) + (delete "libx11" "util-linux:lib"))) + (native-inputs + (modify-inputs (package-native-inputs chez-scheme) + (replace "chez-scheme-bootstrap-bootfiles" + chez-scheme-for-racket-bootstrap-bootfiles))) + (arguments + (substitute-keyword-arguments (package-arguments chez-scheme) + ((#:configure-flags cfg-flags #~'()) + #~(cons "--disable-x11" #$cfg-flags)) + ((#:phases those-phases #~%standard-phases) + #~(let* ((those-phases #$those-phases) + (unpack (assoc-ref those-phases 'unpack))) + (modify-phases those-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme")))))))) + (supported-systems (filter nix-system->chez-machine + %supported-systems)) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Variant of Chez Scheme extended for Racket") + (description "This variant of Chez Scheme is extended to support the +implementation of Racket. It may be useful on platforms that are not yet +supported by upstream Chez Scheme. + +Main additions to Chez Scheme in the Racket variant: +@itemize @bullet +@item +AArch64 support +@item +Portable bytes (@code{pb}) support, which is mainly useful for bootstrapping +a build on any supported platform +@item +Unboxed floating-point arithmetic and flvectors +@item +Type reconstruction during optimization (especially for safe code) +@item +Continuation attachments +@item +Parallel garbage collection, in-place garbage collection for old-generation +objects (instead of always copying), and reachability-based memory +accounting +@item +Ordered finalization, immobile (but collectable) objects, weak/ephemeron +generic hash tables, and reference bytevectors +@item +Faster multiplication and division for large exact numbers +@end itemize") + (license asl2.0))) + +;; +;; Bootfiles: +;; + (define-public chez-scheme-bootstrap-bootfiles (package (inherit chez-scheme) @@ -368,11 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (package (inherit chez-scheme-bootstrap-bootfiles) (name "chez-scheme-for-racket-bootstrap-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. + (version (package-version chez-scheme-for-racket)) (source #f) ; avoid problematic cycle with racket.scm (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) ;; TODO: cross compilation @@ -398,8 +481,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt")))))))) - (supported-systems (filter nix-system->chez-machine - %supported-systems)) + (supported-systems + (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, ;; but it's designed to be a friendly landing place for people diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index c96bebe325..98dab6f743 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -195,8 +195,7 @@ (define* (racket-vm-for-system #:optional racket-vm-cs racket-vm-bc)) -(define %racket-version "8.4") -;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! +(define %racket-version "8.4") ; Remember to update chez-scheme-for-racket! (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin From patchwork Sun Feb 27 02:34:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 573 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 9B86027BBEA; Sun, 27 Feb 2022 02:40:41 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 E586227BBE9 for ; Sun, 27 Feb 2022 02:40:40 +0000 (GMT) Received: from localhost ([::1]:42600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9UG-0000jo-2H for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:40:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Tk-0000Q9-Ku for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34485) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Tg-0006sh-5x for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Tg-0004Mb-37 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592957516711 (code B ref 53878); Sun, 27 Feb 2022 02:40:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:35 +0000 Received: from localhost ([127.0.0.1]:56613 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9TC-0004LN-Um for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:35 -0500 Received: from mail-qv1-f41.google.com ([209.85.219.41]:39642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sh-0004Hp-0R for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:06 -0500 Received: by mail-qv1-f41.google.com with SMTP id a1so9820053qvl.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=; b=ipGjYQK9quEnWd3gaKrREA0GsKSW/Q8jcj/RBmfjjDy+1FKMyn0zNmORAW6ET9XhRJ hMzuBUk27efuJAfSzvBKzQ4bHXTgLc3lX/4IqICXF1FjSMVQmuqQIg9WZ5AWi5jpwk36 ZjdlN2WYseGDez/N1g6i0tYnQgQ6wDbvCCaIHHnLm+M/zsq/dhMG6uYa8xNK2hXEdlFA uYaMG5G1tg3g/Lu3EWGmzDRVKo1xY4iLdVNISMOdH2O7bGvkihoK5k5716EZLvVF3CFr s/MvH7UbXIfLwz/YmPHStT+K4+nGN1/BcvCaQ9AxuDjJxRdVioLXNk+qo63Rwmn+G1z3 L+Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=; b=j6QujG6L3d1TmqQaI7re4OtvmuuzijsZkkxa+WztkHhcAN6+R3X9YUHMtMjEWHvwPz MHKZeMhfKVimJWUuwtNYEYVD4iA6twxu+oCsEX9W08e3K1nVNimXF2AwQogYVl3kYRAE WlT5BsF8SP/YrNOv3ES1G/HtamQOioPI/eiq1DgJEof+Uqja7G1J4xngM0fn/pn57Ns1 Ruwagev56KPOf5t8EssokR+bn8ioag5O4s5Kwgt7WUIABn93ZgcHgyOrYprIiVqjUURc /t9GYwCFR6D3zZDhdWMG71Qkgf1VdpXRjDf/0aEHDCn8NPwNcmn+e4BbM55LJono2ded JQdg== X-Gm-Message-State: AOAM532j5ij3vhSEsLHesyUuwXdpvSE4yz+yDz8qbB0ZcaeGj8/yvlqC uDYyr8JbS8gWG2KK+HKPWsdyI1r1zW1P6ucZ+Wo= X-Google-Smtp-Source: ABdhPJxUNXSzgY9v2kzmBtKZzBoe5VlbFtxJNO+nHvg1kFNssp62zj8L6EMk7vCyDDUZdelDZFRu2w== X-Received: by 2002:ad4:5f06:0:b0:433:6f6:e2b7 with SMTP id fo6-20020ad45f06000000b0043306f6e2b7mr1928841qvb.114.1645929537469; Sat, 26 Feb 2022 18:38:57 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id p20-20020a05620a22b400b00648ca1458b4sm3252776qkh.5.2022.02.26.18.38.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:38:57 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:49 -0500 Message-Id: <20220227023450.1877215-24-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/chez.scm (chez-scheme-for-system): New procedure. (chez-srfi, chez-web, chez-sockets, chez-matchable, chez-irregex, chez-fmt, chez-mit, chez-scmutils): Use 'chez-scheme-for-system'. * gnu/packages/loko.scm (loko-scheme): Likewise. * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): Likewise --- gnu/packages/chez.scm | 33 ++++++++++++++++++++++++--------- gnu/packages/emacs-xyz.scm | 2 +- gnu/packages/loko.scm | 2 +- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index e7ddab0d1f..b3aadf3a78 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -47,7 +47,8 @@ (define-module (gnu packages chez) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:export (nix-system->chez-machine + #:export (chez-scheme-for-system + nix-system->chez-machine chez-machine->nonthreaded chez-machine->threaded unpack-nanopass+stex)) @@ -67,6 +68,20 @@ (define-module (gnu packages chez) ;; ;; Code: +(define* (chez-scheme-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return 'chez-scheme' unless only 'chez-scheme-for-racket' supports SYSTEM, +including support for native threads." + (if (or + ;; full support upstream + (and=> (chez-upstream-features-for-system system) + (cut memq 'threads <>)) + ;; no support anywhere + (not (nix-system->chez-machine system))) + chez-scheme + chez-scheme-for-racket)) + (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string naming the nonthreaded machine type for the same architecture and OS as @@ -751,7 +766,7 @@ (define-public chez-srfi (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -782,7 +797,7 @@ (define-public chez-web (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) ghostscript ;; FIXME: This package fails to build with the error: ;; mktexpk: don't know how to create bitmap font for bchr8r @@ -847,7 +862,7 @@ (define-public chez-sockets (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) chez-web (texlive-updmap.cfg (list texlive-pdftex)))) (arguments @@ -933,7 +948,7 @@ (define-public chez-matchable (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -965,7 +980,7 @@ (define-public chez-irregex (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -996,7 +1011,7 @@ (define-public chez-fmt (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "chez-check" @@ -1059,7 +1074,7 @@ (define string->uninterned-symbol (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -1090,7 +1105,7 @@ (define-public chez-scmutils (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list chez-mit chez-srfi)) (arguments diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ef98088100..df53df61c7 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -451,7 +451,7 @@ (define-public emacs-geiser-chez (string-append "(eval-after-load 'geiser-impl '" all ")")))))))) (inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list emacs-geiser)) (home-page "https://nongnu.org/geiser/") diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm index ef9312afe3..449c62f1f0 100644 --- a/gnu/packages/loko.scm +++ b/gnu/packages/loko.scm @@ -71,7 +71,7 @@ (define-public loko-scheme #t))))) (native-inputs `(("akku" ,akku) - ("chez-scheme" ,chez-scheme) + ("chez-scheme" ,(chez-scheme-for-system)) ("struct" ,guile-struct-pack) ("laesare" ,guile-laesare) ("pfds" ,guile-pfds) From patchwork Sun Feb 27 02:34:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 571 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 0735C27BBEA; Sun, 27 Feb 2022 02:40:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_FMBLA_NEWDOM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS 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 C57AA27BBE9 for ; Sun, 27 Feb 2022 02:40:30 +0000 (GMT) Received: from localhost ([::1]:42178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9U5-0000R5-W5 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 21:40:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Tk-0000Q8-KM for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Te-0006ho-O5 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Te-0004MI-Lb for guix-patches@gnu.org; Sat, 26 Feb 2022 21:40:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 24/24] gnu: racket-vm-cs: Build with "--enable-scheme". Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592957416697 (code B ref 53878); Sun, 27 Feb 2022 02:40:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:34 +0000 Received: from localhost ([127.0.0.1]:56609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9TC-0004LD-5Y for submit@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:34 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]:43677) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Sl-0004IG-K4 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 21:39:08 -0500 Received: by mail-qk1-f171.google.com with SMTP id z66so7796457qke.10 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 18:39:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fj1dWJncDJUK1qH5QCJQCmUNDvNHURG6D3Wt3WwOE4k=; b=HJfG07H2LXaShfBmfe9QZ8B3b/555PGBGUujIr6cUxH0JPq0m8uwNrV3QPBhvw5RBN JkzjkOSV8lzUlOQkTrmnKAQtqwofxztk9Y3afBOgjPuGdhELtSTRr13OYF56Ot8xNday 1BBuH5NSmT7j+HE2wSWfvW/Q2Qt+Nm1pLGyRR+04hCq6vBzy1zWQSWUiE1ypf7RMvqjY DXeoLu6AGwzACh1C8rQzAfZQGzbjEWBBwuHOrtMP+hmKl+8/OQYfbia6qyoHad5px/qg lWSDWIL4pc1DSAqsTfguWIWv3/u0VNO0/pNg4uXfL3ph/qSUi+vrwMisveVGILWseseL /DxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fj1dWJncDJUK1qH5QCJQCmUNDvNHURG6D3Wt3WwOE4k=; b=mw9I2g+TeskQN5peXagDk/pc/x2NuwDZF0fDkA4VrXWNrhYMdQpnYAMpel0PfthGW7 x7V0/Jgdjzv5sBrzYBoWfm6/Lwbcfcx5INCms0suYJ1++u5fHTezs/0LR3QN7Dd+WiDN mJepJzK+pUvfKIGDyMUB8Hzjgwpehny4znsdH+pQ6a4crMZhdl455+K6JsCBQRvlu4E9 lWDDrVZNSR70gcS0AsVVaZZYtDn3tGzap0HJwbIlJG1gWnBaq+FpRN23jxOXQ++otPVH 8LeXhIL/ZNEhBHEcbCZVEeGl6iJAMMvPXUeIUbpZfE6C4ObrrcIgpCmn2zVCbZQMzD4W 3s3w== X-Gm-Message-State: AOAM532OFqx3nbe2V6OSoNiL3IiJH+z+pOpkjtIJBirR9idHcn6Y9Vth NqKZuA0p9s3+CXhHRW1OQYL5GSSFfeNpXJVUzhg= X-Google-Smtp-Source: ABdhPJxqw5GSjxiNC4xjE+NYk0ehDUVaF9tJvDnRezevVvrp5lrIqWl6ar1FfBa5Wpbyg4aENl1emA== X-Received: by 2002:ae9:e8cc:0:b0:506:c9aa:cd9f with SMTP id a195-20020ae9e8cc000000b00506c9aacd9fmr8234757qkg.395.1645929542098; Sat, 26 Feb 2022 18:39:02 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id w13-20020a05622a190d00b002dd2600afc2sm4453384qtc.62.2022.02.26.18.39.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 18:39:01 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 21:34:50 -0500 Message-Id: <20220227023450.1877215-25-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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/packages/racket.scm (racket-vm-cs)[native-inputs]: Remove 'chez-scheme-for-racket-bootstrap-bootfiles'. Add 'chez-scheme-for-racket'. [arguments]<#:phases>: Delete 'unpack-bootfiles'. <#:configure-flags>: Add "--enable-scheme". --- gnu/packages/racket.scm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 98dab6f743..952bec6aa9 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -399,7 +399,7 @@ (define-public racket-vm-cs (native-inputs (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") - (prepend chez-scheme-for-racket-bootstrap-bootfiles + (prepend chez-scheme-for-racket chez-nanopass-bootstrap racket-vm-bc))) (arguments @@ -409,18 +409,15 @@ (define-public racket-vm-cs (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" - #$unpack-nanopass+stex))) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (search-input-directory (or native-inputs inputs) - "lib/chez-scheme-bootfiles") - "boot")))))) + #$unpack-nanopass+stex))))) ((#:configure-flags _ '()) #~(cons* "--enable-csonly" "--enable-libz" "--enable-lz4" + (string-append "--enable-scheme=" + #$(this-package-native-input + "chez-scheme-for-racket") + "/bin/scheme") #$(racket-vm-common-configure-flags))))) (synopsis "Racket CS implementation") (description "The Racket CS implementation, which uses ``Chez Scheme'' as