From patchwork Sat Feb 26 13:02: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: 37476 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 993A627BBEA; Sat, 26 Feb 2022 13:06: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 524EB27BBE9 for ; Sat, 26 Feb 2022 13:06:41 +0000 (GMT) Received: from localhost ([::1]:55758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmW-0002Ik-Fp for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwjz-0006rW-IY for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwjz-0003AR-8j for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwjy-0005WU-Ul; Sat, 26 Feb 2022 08:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 01/22] gnu: Use license prefix in (gnu packages racket). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588059221015 (code B ref 53878); Sat, 26 Feb 2022 13:04:02 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:12 +0000 Received: from localhost ([127.0.0.1]:54418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjA-0005St-Ei for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:12 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:38638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwj3-0005S5-Vr for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:06 -0500 Received: by mail-qv1-f52.google.com with SMTP id d3so8855086qvb.5 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:05 -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=Za+KvRwxcUARq3f9OYCEGH62Ix1IOOyYdyjHBTxQxPF6azPjocsqjUMnbp1vJOnOLO 6C6FIWe2eqlm+oFDW/WhYdPII5L8dYRiw8yjbmHaM8IarzZkDY6zmnDtpQOA8dOaGrAO conEdExzhBINVrbFimw1WvoEliB7TlTP+AbIn74kelHz4DHq+2FuhaJ7ehjlUzXvRGTP bunlFwhD7lF73sxAVI6ZUF+p/i7ZTBAJErpUVhAbiB/AO5ws02wBd5LePKZcsleVc3v5 8PWOFYR6birLOr0AeAH5EJpZWX8hrRPeOmwIPqIrH5yccwAGSYh7aDZppdPPogxJ/Vrw ZvgA== 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=4xAK7W+Aa+KxiSMQV5YIy0A4EEVxSQficZ33fpHF/S0dwxWhn0EMRiYd31mS9d97cL 5AAKWK/R+bP/ROME36SsfWqZAc2JCgy/WY2cDnV9sN/W4MKf4UoY2BCpbmfsO9KJ7vPl ZY0B2Foc9j2UivbOPlc6d2BbanBW8MMo+PJ7uJMi7kFJPLRUrGY9rLFWGnctUy2h/Z2y r3rqAEToNrHKRmSOhC2s1VSb1rGwy8bStL/fobh0ykQ6K36pgngyddbZG7KYllfg1xYz kBdP08V0MuysMFk3b9Zc2Q1fmod2LITHqWZl5ZxSsLsEDxgAqpjxOWa8y+FAWAhH5rfB 9eFQ== X-Gm-Message-State: AOAM530mdJun9IuNerkym3gayTtv4vVEzhrBIFuy2xsnTAIgIqPCosXZ uGOb0ComZq5PQfBL16f12kHBWY4RyKz+Y03cVb8= X-Google-Smtp-Source: ABdhPJwQPA3WPuiUigF8iTuYzBKj+Dj6pZBgnJ+v96cbEusk/woEwI4FbJd6eGI/rNhrknxue3x+eA== X-Received: by 2002:a05:6214:1c5:b0:42c:1227:c542 with SMTP id c5-20020a05621401c500b0042c1227c542mr9187268qvt.11.1645880580182; Sat, 26 Feb 2022 05:03: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 t9-20020a05622a148900b002de2dfd0ee2sm3321627qtx.70.2022.02.26.05.02.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:02:59 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:33 -0500 Message-Id: <20220226130254.1301333-2-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 Sat Feb 26 13:02:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37478 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 5D80C27BBEA; Sat, 26 Feb 2022 13:07: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6B7D027BBE9 for ; Sat, 26 Feb 2022 13:07:10 +0000 (GMT) Received: from localhost ([::1]:56148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmz-0002bQ-JR for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:07:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk0-0006ru-DU for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60560) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwjz-0003Ae-Up for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwjz-0005Wl-Pr; Sat, 26 Feb 2022 08:04:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 02/22] gnu: racket: Update to 8.4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588060721064 (code B ref 53878); Sat, 26 Feb 2022 13:04:03 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:27 +0000 Received: from localhost ([127.0.0.1]:54422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjH-0005TK-Q7 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:27 -0500 Received: from mail-qt1-f175.google.com ([209.85.160.175]:41824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwj8-0005Sf-EE for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:13 -0500 Received: by mail-qt1-f175.google.com with SMTP id n11so4993662qtk.8 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03: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=z0pcZSlzKw/cUO7uj/U8mdQ+2/FnmZU2cO/RKK1LnLk=; b=IaUmIHfYHEe+NmI5my1RiTl41/byXOdcdxHp8gFNbOK9DN50tZGhskezkrXLxdIC3Z Jgf2Uh3dvg99e1wTea8hZgQIF+roy3tRHrYIBkYhs4CycksAPJeTzP5PQhswQmQGRyRV kdmVU3CFnyGBfRxYRFdxydHPNh8/IfjCMCypBSPrRsGwy1LqRUzb9oN49lK15v/Lhhoe ty8PExs9UBcv3e9RezAD2/1OhzaYnkxJiEJ7KR6C/6RHbspmph3FmTnwh+Bsx5fpV2S1 RAH+GuGcFYJ+BvDEzCroasgDtO5jsvm28ONkvCLhh+9l1sA/N+BasbEf5ca5EzH3hGRG 67Yw== 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=w7+3YwGq2dMIK0fgYGLdtWU4ZG9lGdv41OMAQkhOMr4nMavwXOXK4Fd/fuR2mEPLrd 0XY0w4L6lIKyjM6jNmwvumhDOoqpIQwfjnS01K99jGR0AraIxJNMzM64NFZkJO8RPpi1 RuSK3oHIXpm5cZYW9w5X0047zTX8FusxnzrUiSYEgfox7Y3dQSPnPZb7I7cBoXbQr5vF 85mqamoFNdSJMX6Kfi+nFyFHQF4Y/y3Sp0VE43PxmBi73WInn1/aLIEI3/ozivIIppUV xKuIsNQ9Lcu5nFRm/SmBhgwxuWCzrcVg2Q8ZV9rokbPLjYxDGC+3oCznU6FBD8T5F3mW HtGw== X-Gm-Message-State: AOAM530OwOg8R3mkKKkmDVKogV1G3DSYX/xQYN1iMHA2/p/93h8kDXvg Ij2VBLjn52Om5WEdsAoKFFwQQ9sr2GG3bcqx0PI= X-Google-Smtp-Source: ABdhPJww9HPCjaMcJkCgdz/y49sCXGx6laI3LkksKpaAqCvMuXq0nzZq23fDVHB6qnRrFCd57Md9Yg== X-Received: by 2002:ac8:5950:0:b0:2dc:a139:4f36 with SMTP id 16-20020ac85950000000b002dca1394f36mr10743672qtz.646.1645880584348; Sat, 26 Feb 2022 05:03: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 y11-20020a05622a004b00b002dea2052d7dsm3322222qtw.12.2022.02.26.05.03.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:04 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:34 -0500 Message-Id: <20220226130254.1301333-3-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 Sat Feb 26 13:02:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37462 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 0990E27BBEA; Sat, 26 Feb 2022 13:04:28 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D9E0D27BBE9 for ; Sat, 26 Feb 2022 13:04:25 +0000 (GMT) Received: from localhost ([::1]:50560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkJ-0006w9-93 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:04:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk1-0006tL-2N for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk0-0003As-OB for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk0-0005X9-Ie; Sat, 26 Feb 2022 08:04:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588061221087 (code B ref 53878); Sat, 26 Feb 2022 13:04:04 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:32 +0000 Received: from localhost ([127.0.0.1]:54426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjP-0005Th-MV for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:32 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:33595) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjD-0005Sp-9B for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:18 -0500 Received: by mail-qt1-f174.google.com with SMTP id bt3so4981304qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:15 -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=+BvNzpgA0Sa5dJaEYu3Z+w2XiFLrdSAi9brEj12I1ds=; b=WeSemoWmFfvDlhbPOdoC6rubi9dTHMvPqDk0MBvH/aSZWxXucJ8O+tqplzGzi6NELX XKDvxQ4ZF02W6bi7Hk3Xwzv6rdPVZvPc03+8S8bgMkF2syv0reCKbVD5fsmDqF/VvZM5 EqMdK+BLuxHVU0RNa3H4VjpMSaOERcS8ltfz9OhRo/bDQf6EjCNGXMkmOV6wygXspvMx tSnN0y5n8a0RZ9zgvnvfT5LmOpEr9Sho/2KHg7NRsy2NxP23LTyW5uN288qMckcPVSC9 OopSYJHEpJanbLHDIfn8Jb012cWP1nRYZ9O/gxH4LD2vNF/07NpTGWyDed46vLUnOUE7 judA== 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=+BvNzpgA0Sa5dJaEYu3Z+w2XiFLrdSAi9brEj12I1ds=; b=v9eNgPD6I5B9TTB0XYyWYpm4hKYC6ghQEG362KK7WCPLv4YxNuTVTPwEu7HU3GPIqk cCWs5fRX+2wXZi1dY6BWP6bv5l9FvEHtF1fdG3hHcwgObAVpb+9HL/T22UKct1oJ7DS3 Athn/7PtJyyYkZN7xhLDDOwFNz+X+MBS0RM73qnPXeE07+TJQ/Pye2TLsdekgPQmp09H wtyZSqAEWzOYnRFgIgxCoie7ZILks5MxW/xpc2veNTNMU7l9lSIIVfCNkTCJoph0a9sO 1gEKBzJTlqGEZgoZ+Oo75gmpY+rYrRd6nTIBjsxQLoXeyotpWRm+upzITHO8XClD7Sjf LWyQ== X-Gm-Message-State: AOAM530US9J9znBXV26IWgbcx5ShIlzW2cwMwwjtaXV21EK8TwrpXI/N 5baiMrbJFOBkoBlgIR46Avj5MRYhGG+Oj5EzYkE= X-Google-Smtp-Source: ABdhPJxrMW7YWEHpk1XkVg+oEkBst/bPodP81/GXX2ysJIdFhZFGHRzuevIqTSQKjdIeH0oYJU6PmA== X-Received: by 2002:a05:622a:134d:b0:2df:e996:8814 with SMTP id w13-20020a05622a134d00b002dfe9968814mr5074450qtk.245.1645880588647; Sat, 26 Feb 2022 05:03:08 -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 h17-20020ac87d51000000b002de919e3187sm3460377qtb.28.2022.02.26.05.03.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:08 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:35 -0500 Message-Id: <20220226130254.1301333-4-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 (extract-package-source, extract-package-source*): New procedures. (extend-layer): Rename to ... (make-installation-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 'make-installation-layer.rkt'. --- ...acket-gui-tethered-launcher-backport.patch | 6 +- gnu/packages/racket.scm | 1151 ++++++++++++++--- 2 files changed, 975 insertions(+), 182 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..9970dacedb 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,939 @@ (define-public racket-bootstrap-chez-bootfiles Chez Scheme.") (license (list license:asl2.0))))) +(define (extract-package-source origin spec) + "Extract the source for a Racket package specified by SPEC from ORIGIN into +a new file-like object. In the resulting file-like object, the package source +will be in the directory \"/share/racket/pkgs/NAME/\", where NAME is the Racket +name for the package. -(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/" - )) - -(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")) +SPEC is a list of the form: + (NAME PATH) + +where PATH is the path to the package source relative to ORIGIN---possibly +`\".\"`. As a special case, SPEC may also be given a string, which is +equivalent to: + + (NAME NAME) + +Examples: + + +- \"expeditor\" +- (\"main-distribution\" \".\") +- (\"racket-lib\" \"pkgs/racket-lib\")" + (match (match spec + ((? string? name) + (list name (file-append origin (string-append "/" name)))) + ((name ".") + (list name origin)) + ((name path) + (list name (file-append origin (string-append "/" path))))) + ((name src) + (computed-file + (string-append "racket-pkg-" name) + (with-imported-modules `((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p (string-append #$output "/share/racket/pkgs")) + (copy-recursively #$src (string-append #$output + "/share/racket/pkgs/" + #$name)))))))) + +(define (extract-package-source* source-groups) + "Return a list of file-like objects containing the sources of the Racket +packages specified by SOURCE-GROUPS, a list of the form: + + ((ORIGIN SPEC ...) ...) + +The result is equivalent to: + + (append (list (extract-package-source ORIGIN SPEC) ...) ...)" + (append-map (match-lambda + ((origin . specs) + (map (cut extract-package-source origin <>) + specs))) + source-groups)) (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))) + (cons* + 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 + (extract-package-source* + `((,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/2d") + (commit %racket-commit))) + (sha256 (base32 + "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")) + (file-name + (git-file-name "racket-2d" %racket-version))) + "2d" "2d-doc" "2d-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/algol60") + (commit %racket-commit))) + (sha256 (base32 + "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx")) + (file-name + (git-file-name "racket-algol60" %racket-version))) + ("algol60" ".")) + (,%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")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/cext-lib") + (commit %racket-commit))) + (sha256 (base32 + "00w38jpv88fpl4pgj6ndnysvn0s21rjvj0xhznay80msan0vc341")) + (file-name (git-file-name "racket-cext-lib" %racket-version))) + "cext-lib" "dynext-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/class-iop") + (commit %racket-commit))) + (sha256 (base32 + "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l")) + (file-name (git-file-name "racket-class-iop" %racket-version))) + "class-iop-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/compatibility") + (commit "37f11132cdad7ef27386b68383d073f275d67c31"))) + (sha256 (base32 + "0bfqwscjpyi325br5pa6g62g9c8lq18a80zp5g3d2qzn3n3mi6x0")) + (file-name + (git-file-name "racket-compatibility" %racket-version))) + "compatibility" "compatibility-doc" "compatibility-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/contract-profile") + (commit "95d980a076126b8e4e4284e912f2a7d9d3ab6860"))) + (sha256 (base32 + "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3")) + (file-name + (git-file-name "racket-contract-profile" %racket-version))) + ("contract-profile" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/data") + (commit "e32d012b394e32e102e8a9adfcc885bb0541ab51"))) + (sha256 (base32 + "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55")) + (file-name (git-file-name "racket-data" %racket-version))) + "data" "data-doc" "data-enumerate-lib" "data-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/datalog") + (commit "7d160a86451af8298093d07674a2eb0e1a0161a4"))) + (sha256 (base32 + "0n5j5gnqh7g31mvgx19ggl18hirzbvq2r189lbngmnrmbc7b73fp")) + (file-name (git-file-name "racket-datalog" %racket-version))) + ("datalog" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/db") + (commit %racket-commit))) + (sha256 (base32 + "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5")) + (file-name (git-file-name "racket-db" %racket-version))) + "db" "db-doc" "db-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/deinprogramm") + (commit %racket-commit))) + (sha256 (base32 + "1is6fapgv6rxfjz47nh6qf3kh7y7sjdinakaxqffi46gf1al8prd")) + (file-name + (git-file-name "racket-deinprogramm" %racket-version))) + "deinprogramm" "deinprogramm-signature") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/distributed-places") + (commit %racket-commit))) + (sha256 (base32 + "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0")) + (file-name + (git-file-name "racket-distributed-places" %racket-version))) + "distributed-places" + "distributed-places-doc" + "distributed-places-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/draw") + (commit %racket-commit))) + (sha256 (base32 + "1xgjfbh70hqw67z88iqqajg98d04qwbzn6im2wj47rs28jxlm9ly")) + (file-name (git-file-name "racket-draw" %racket-version))) + "draw" "draw-doc" "draw-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/drracket") + (commit %racket-commit))) + (sha256 (base32 + "0m3l4an3nq2ycd1h287s1az2v2zprjbzd8if2x7d5r71vaj4i00c")) + (file-name (git-file-name "racket-drracket" %racket-version))) + "drracket" + "drracket-plugin-lib" + "drracket-tool" + "drracket-tool-doc" + "drracket-tool-lib" + "drracket-tool-text-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/ds-store") + (commit "949ca63dd00522b3ab8aec2d71c543ece8266872"))) + (sha256 (base32 + "0ajr27kipp4dr1qlisaghsb3h7lhhjwrfw2r79b5myczsa1mp661")) + (file-name (git-file-name "racket-ds-store" %racket-version))) + "ds-store" "ds-store-doc" "ds-store-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/eli-tester") + (commit "036e07d43a1f478ea1750881d5591d983ce1ffaf"))) + (sha256 (base32 + "0icx6wn14gjm8kdmq1jppqgq87sxkras4qb5xmdr6wigxafhjqyk")) + (file-name (git-file-name "racket-eli-tester" %racket-version))) + ("eli-tester" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/eopl") + (commit %racket-commit))) + (sha256 (base32 + "1fmiixj6rxsgzwvgva8lvrvv0gl49v2405mp3s0i7ipis5c4n27s")) + (file-name (git-file-name "racket-eopl" %racket-version))) + ("eopl" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/errortrace") + (commit %racket-commit))) + (sha256 (base32 + "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip")) + (file-name (git-file-name "racket-errortrace" %racket-version))) + "errortrace" "errortrace-doc" "errortrace-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/expeditor") + (commit %racket-commit))) + (sha256 (base32 + "07djzxs6307l51mcsk3yr2g4g47ayxa3878g7sf5xhqdr4hd9vxf")) + (file-name (git-file-name "racket-expeditor" %racket-version))) + "expeditor" "expeditor-doc" "expeditor-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/frtime") + (commit %racket-commit))) + (sha256 (base32 + "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5")) + (file-name (git-file-name "racket-frtime" %racket-version))) + ("frtime" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/future-visualizer") + (commit %racket-commit))) + (sha256 (base32 + "1758qq769m0r14xf64sl2ix2l9z340kvapar0j7s5kdg42lmvnhm")) + (file-name + (git-file-name "racket-future-visualizer" %racket-version))) + "future-visualizer" + "future-visualizer-pict" + "future-visualizer-typed") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/games") + + (commit %racket-commit))) + (sha256 (base32 + "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d")) + (file-name (git-file-name "racket-games" %racket-version))) + ("games" ".")) + (,(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") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/gui-pkg-manager") + (commit %racket-commit))) + (sha256 (base32 + "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5")) + (file-name + (git-file-name "racket-gui-pkg-manager" %racket-version))) + "gui-pkg-manager-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/htdp") + (commit %racket-commit))) + (sha256 (base32 + "0r4ykybcpr10y2db9rlza9pr0xh58nd7ac389mjcxp8g386hgihl")) + (file-name (git-file-name "racket-htdp" %racket-version))) + "htdp" "htdp-doc" "htdp-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/html") + (commit %racket-commit))) + (sha256 (base32 + "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x")) + (file-name (git-file-name "racket-html" %racket-version))) + "html" "html-doc" "html-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/icons") + (commit %racket-commit))) + (sha256 (base32 + "1s5a6j11fg3fdr6b7vm2q7q178d7q8b8igy73bs211r27qrd1gg7")) + (file-name (git-file-name "racket-icons" %racket-version))) + ("icons" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/images") + (commit %racket-commit))) + (sha256 (base32 + "0rpjxqw34bq5m08kh1ldl1mr7s9z1lyydxxcyzb292kqh9qiqvfl")) + (file-name (git-file-name "racket-images" %racket-version))) + "images" "images-doc" "images-gui-lib" "images-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/lazy") + (commit %racket-commit))) + (sha256 (base32 + "176ylzgbdsbmqknpihaz519afq71pyjkv1h87j5v8jfbpbddyfsf")) + (file-name (git-file-name "racket-lazy" %racket-version))) + ("lazy" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/macro-debugger") + (commit %racket-commit))) + (sha256 (base32 + "14hyrwbkffr61fk44l02xb47bhv5zccw0ymaa9kxld86hvyqhqbm")) + (file-name + (git-file-name "racket-macro-debugger" %racket-version))) + "macro-debugger" "macro-debugger-text-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/main-distribution") + (commit %racket-commit))) + (sha256 (base32 + "0m2n9s32s8a4a2gn4ywrm9l8jycdm5ayi5w9kh5wchhrrw7qzq7y")) + (file-name + (git-file-name "racket-main-distribution" %racket-version))) + ("main-distribution" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/make") + (commit %racket-commit))) + (sha256 (base32 + "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa")) + (file-name (git-file-name "racket-make" %racket-version))) + ("make" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/math") + (commit %racket-commit))) + (sha256 (base32 + "02sqbnvxvmvslk33b44fx4v93zafcvhva0cx8z21jqbl5wp217ac")) + (file-name (git-file-name "racket-math" %racket-version))) + "math" "math-doc" "math-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/mysterx") + (commit %racket-commit))) + (sha256 (base32 + "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48")) + (file-name (git-file-name "racket-mysterx" %racket-version))) + ("mysterx" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/mzcom") + (commit %racket-commit))) + (sha256 (base32 + "0rc9pfj7gwm5azghqvcibz6si1x5s2v8mr2yngk7ssq9gzfbi6a4")) + (file-name (git-file-name "racket-mzcom" %racket-version))) + ("mzcom" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/mzscheme") + (commit %racket-commit))) + (sha256 (base32 + "192c52zi726h5wjamxrhivjw2waq1im0zpyxhbrkrxknm8x84bs9")) + (file-name (git-file-name "racket-mzscheme" %racket-version))) + "mzscheme" "mzscheme-doc" "mzscheme-lib") + (,(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") + (,(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" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/option-contract") + (commit %racket-commit))) + (sha256 (base32 + "026b7n5l0c3024nymshz8zp1yhn493rdzgpflzfd52hj7awafqhk")) + (file-name + (git-file-name "racket-option-contract" %racket-version))) + "option-contract" "option-contract-doc" "option-contract-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/parser-tools") + (commit %racket-commit))) + (sha256 (base32 + "08pvz4zramirzm3j64hbhjm0mmh5zfy37iv4s3vmq0rj49cr8fl3")) + (file-name (git-file-name "racket-parser-tools" %racket-version))) + "parser-tools" "parser-tools-doc" "parser-tools-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/pconvert") + (commit %racket-commit))) + (sha256 (base32 + "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1")) + (file-name (git-file-name "racket-pconvert" %racket-version))) + "pconvert-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/pict") + (commit %racket-commit))) + (sha256 (base32 + "0g1iwdr6qh1xb0crhj96830vjjnbds409xbpqn7j5sh0ksy6vr5x")) + (file-name (git-file-name "racket-pict" %racket-version))) + "pict" "pict-doc" "pict-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/pict-snip") + (commit %racket-commit))) + (sha256 (base32 + "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x")) + (file-name (git-file-name "racket-pict-snip" %racket-version))) + "pict-snip" "pict-snip-doc" "pict-snip-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/picturing-programs") + (commit %racket-commit))) + (sha256 (base32 + "1g6xr39hx1j03gb3d4dljm3v91xcj2gfpq3dgy5xvplzr6cmmxgr")) + (file-name + (git-file-name "racket-picturing-programs" %racket-version))) + ("picturing-programs" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/plai") + (commit %racket-commit))) + (sha256 (base32 + "0i983sh0r0zm2ng4j44m5aw9669kh5fhp91bzpc9jm280rfcqvyl")) + (file-name (git-file-name "racket-plai" %racket-version))) + "plai" "plai-doc" "plai-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/planet") + (commit %racket-commit))) + (sha256 (base32 + "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9")) + (file-name (git-file-name "racket-planet" %racket-version))) + "planet" "planet-doc" "planet-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/plot") + (commit %racket-commit))) + (sha256 (base32 + "07kq32si34ybcwz8idxxcrzssg8diyrp1nfgkcj0mmvr45321zm7")) + (file-name (git-file-name "racket-plot" %racket-version))) + "plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/preprocessor") + (commit %racket-commit))) + (sha256 (base32 + "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg")) + (file-name (git-file-name "racket-preprocessor" %racket-version))) + ("preprocessor" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/profile") + (commit %racket-commit))) + (sha256 (base32 + "179i86lyby29nywz60l4vnadi02w8b12h7501nm5h5g4pq9jjmbb")) + (file-name (git-file-name "racket-profile" %racket-version))) + "profile" "profile-doc" "profile-lib") + (,(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" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/r5rs") + (commit %racket-commit))) + (sha256 (base32 + "1g3cysj7z88r38vkzvi8g2fb2hn4yg1fdhy5smxw303jxgl3inp6")) + (file-name (git-file-name "racket-r5rs" %racket-version))) + "r5rs" "r5rs-doc" "r5rs-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/r6rs") + (commit %racket-commit))) + (sha256 (base32 + "0b1ymzdp10r0flw2acbidjsh5ma1pm5hy54jss37sxf89z3xbvm4")) + (file-name (git-file-name "racket-r6rs" %racket-version))) + "r6rs" "r6rs-doc" "r6rs-lib") + (,(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" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racklog") + (commit %racket-commit))) + (sha256 (base32 + "1rgrvwy3kr9b9w5cghsffiv3ly00yfvvzr5xaaw83g1w7yin0mnb")) + (file-name (git-file-name "racket-racklog" %racket-version))) + ("racklog" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/rackunit") + (commit %racket-commit))) + (sha256 (base32 + "057z31rja6h3nabh5b2xgwfrzmlm6h1cv1qcgf3xfy4g2q5dqn5p")) + (file-name (git-file-name "racket-rackunit" %racket-version))) + "rackunit" + "rackunit-doc" + "rackunit-gui" + "rackunit-lib" + "rackunit-plugin-lib" + "rackunit-typed" + "schemeunit" + "testing-util-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/readline") + (commit %racket-commit))) + (sha256 (base32 + "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn")) + (file-name (git-file-name "racket-readline" %racket-version))) + "readline" "readline-doc" "readline-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/realm") + (commit %racket-commit))) + (sha256 (base32 + "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi")) + (file-name (git-file-name "racket-realm" %racket-version))) + ("realm" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/redex") + (commit %racket-commit))) + (sha256 (base32 + "0vlgxbnbgrlihk1hh5zd6hsc4566ldi4q76f87z5vai54dxkwy2f")) + (file-name (git-file-name "racket-redex" %racket-version))) + "redex" + "redex-benchmark" + "redex-doc" + "redex-examples" + "redex-gui-lib" + "redex-lib" + "redex-pict-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/sasl") + (commit %racket-commit))) + (sha256 (base32 + "0ibh4wb4gn8pggx6gkv4vk4d6rwzn5nrvjibhvkzhaynf6lhb824")) + (file-name (git-file-name "racket-sasl" %racket-version))) + "sasl" "sasl-doc" "sasl-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/scheme-lib") + (commit %racket-commit))) + (sha256 (base32 + "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x")) + (file-name (git-file-name "racket-scheme-lib" %racket-version))) + ("scheme-lib" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/scribble") + (commit %racket-commit))) + (sha256 (base32 + "0rgvnsykrxkah6s5fw1vyp9lxsb4z9w6hgwk5j6wbwjp2gsfczbm")) + (file-name (git-file-name "racket-scribble" %racket-version))) + "scribble" + "scribble-doc" + "scribble-html-lib" + "scribble-lib" + "scribble-text-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/serialize-cstruct-lib") + (commit %racket-commit))) + (sha256 (base32 + "1rq3n1fa7ldjwx3lrh9ybhig7jlsw1crpzyklbzp3xqdw6jymfnz")) + (file-name + (git-file-name "racket-serialize-cstruct-lib" %racket-version))) + ("serialize-cstruct-lib" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/sgl") + (commit %racket-commit))) + (sha256 (base32 + "0nkymhdyjrwi5h199j4w5zh7y3x3ai42gsiwxzh0hy7yqrqqg9zv")) + (file-name (git-file-name "racket-sgl" %racket-version))) + ("sgl" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/shell-completion") + (commit %racket-commit))) + (sha256 (base32 + "04m144gy2mp4fiq6rcbf12wjr8mws8k9scfhg9lc38vqppp4lxsj")) + (file-name + (git-file-name "racket-shell-completion" %racket-version))) + ("shell-completion" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/simple-tree-text-markup") + (commit %racket-commit))) + (sha256 (base32 + "0fyd9gfz6bnv0m1901wv5mnhc05rm8hw9i6ddrqx33hs6qsg2zqr")) + (file-name + (git-file-name "racket-simple-tree-text-markup" %racket-version))) + "simple-tree-text-markup" + "simple-tree-text-markup-doc" + "simple-tree-text-markup-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/slatex") + (commit "47e1d3e3e33d826bc2b26f9e8998eb235b23a9a5"))) + (sha256 (base32 + "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0")) + (file-name (git-file-name "racket-slatex" %racket-version))) + ("slatex" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/slideshow") + (commit %racket-commit))) + (sha256 (base32 + "1znv1i2d0610hhy71q932xy7wka00q3q50in1xfnk8ibg7nzkagm")) + (file-name (git-file-name "racket-slideshow" %racket-version))) + "slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" + "slideshow-plugin") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/snip") + (commit %racket-commit))) + (sha256 (base32 + "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj")) + (file-name (git-file-name "racket-snip" %racket-version))) + "snip" "snip-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/typed-racket") + (commit %racket-commit))) + (sha256 (base32 + "1462kj9yswsxbnw71casylzlvhd7cxrml2v9j7rcsnn9hmrqx4vv")) + (file-name (git-file-name "racket-typed-racket" %racket-version))) + "source-syntax" + "typed-racket" + "typed-racket-compatibility" + "typed-racket-doc" + "typed-racket-lib" + "typed-racket-more") + (,(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") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/string-constants") + (commit %racket-commit))) + (sha256 (base32 + "1qizjq4n0hzdgdcjjpr94464gsywpsk2g9mnvwzqr7dcqbrsfvn6")) + (file-name + (git-file-name "racket-string-constants" %racket-version))) + "string-constants" "string-constants-doc" "string-constants-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/swindle") + (commit %racket-commit))) + (sha256 (base32 + "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67")) + (file-name (git-file-name "racket-swindle" %racket-version))) + ("swindle" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/syntax-color") + (commit %racket-commit))) + (sha256 (base32 + "1vf2fc3qvx8a1igi7swsg8gaqhx786sa0vqxd18xhbsidfgb5ywp")) + (file-name (git-file-name "racket-syntax-color" %racket-version))) + "syntax-color" "syntax-color-doc" "syntax-color-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/trace") + (commit %racket-commit))) + (sha256 (base32 + "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia")) + (file-name (git-file-name "racket-trace" %racket-version))) + ("trace" ".")) + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/unix-socket") + (commit %racket-commit))) + (sha256 (base32 + "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y")) + (file-name (git-file-name "racket-unix-socket" %racket-version))) + "unix-socket" "unix-socket-doc" "unix-socket-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/web-server") + (commit %racket-commit))) + (sha256 (base32 + "1zgb6jl7zx6258ljs8f3lvryrq5n5zpd71dqzr698m92kw3x2pkn")) + (file-name (git-file-name "racket-web-server" %racket-version))) + "web-server" "web-server-doc" "web-server-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/wxme") + (commit %racket-commit))) + (sha256 (base32 + "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b")) + (file-name (git-file-name "racket-wxme" %racket-version))) + "wxme" "wxme-lib") + (,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/xrepl") + (commit %racket-commit))) + (sha256 (base32 + "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3")) + (file-name (git-file-name "racket-xrepl" %racket-version))) + "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 + ;; `make-installation-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 + #$make-installation-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 +1333,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 make-installation-layer.rkt (scheme-file - "extend-layer.rkt" + "make-installation-layer.rkt" `(module - extend-layer racket/base + make-installation-layer racket/base (require racket/cmdline racket/match racket/file + racket/port racket/list racket/pretty) (define config-file-pth @@ -584,8 +1356,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 +1393,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"] + ;; workaroung 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 Sat Feb 26 13:02:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37463 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 3E71227BBEA; Sat, 26 Feb 2022 13:04: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0F78B27BBE9 for ; Sat, 26 Feb 2022 13:04:40 +0000 (GMT) Received: from localhost ([::1]:50966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkZ-0007G7-5o for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:04:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk1-0006un-OZ for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk1-0003B2-FX for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk1-0005XH-9b; Sat, 26 Feb 2022 08:04:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 04/22] gnu: racket-minimal: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588061321098 (code B ref 53878); Sat, 26 Feb 2022 13:04:05 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:33 +0000 Received: from localhost ([127.0.0.1]:54429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjU-0005U5-CO for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:33 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:40541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjG-0005T1-RT for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:19 -0500 Received: by mail-qt1-f180.google.com with SMTP id t28so4991336qtc.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03: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=x2ByxCnfjdIJ0pbvJh/yOhytZtvQCAowFzArNWCWjBU=; b=XoUYU20zVzD0kh6X+ZIe6V9wUA2Kpwtak9z0fF62y6b7MuE5HfKmCqSSIE19HvVvPQ FDxSuedowxwCAO872P8lubwPnNSyANnUo0HCja3OtaN1Ri5LTJm7/emRVlG4UPowuAiA 2P1uKugnoHLR5Ac51o6bckbc50RSrRx6H/iRFdNEmF6lH+yWtiDAyJiuxiKdzlsSTvfq fb4g8jIlduU5gbpKpGxzfgbs0moV4fa99YKkeP7a/a1Pk7f6YVmi6nKNgcgMkykvFCD3 B4R2juiK3mfT5sShNRe+1UHA5ZinT5LWKO1FCAEQ2vtSky5FtDjxNjTbZLxr9dbU8+9N jMFQ== 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=x2ByxCnfjdIJ0pbvJh/yOhytZtvQCAowFzArNWCWjBU=; b=IlYvCmMbF2Pv5IfDB2Tp9ksDgc8RvQoD1DuKwN5n2SlX7D4myA2ycvNy0o9J1nvtY7 fZQ5Svkq7I7ga8diMPEdF8XlSOW8eDSaOf7GHhsR7mafl39m8WTIPono5RuSALv7jsqj WaeUaU2fpunPt0huKvRKCPhYOUdyBQVLluuy2B6kYSRsI97iGdfkTP8vHidP1qUeU15k nZt1BSDH3mQ/khyRmkY+zJvKACv1oJpFvz82z/Ydfq5UcyiNxmN4amLJ4J3GSjpyXNUF Pu4yDTiKPArQcV7SdJ48LONy3peAlp7QozQKg1NxxxPzQgKsflsJ0T5YVvW593yU09ZR C0fA== X-Gm-Message-State: AOAM530ZKP2MpHkoP8Griwd3uolRHI1eXPL2PIgygyoVIpM6fvGEVsh/ Xby5A6er1re6tOavwv4S37VRZUxGEX1OgeYSOYk= X-Google-Smtp-Source: ABdhPJxwS1jbrCUkWO06zBylQ/4tAZ3xrR8RIRSUhxKJgUikYGo+ZV5Kr4StsNzlyRGQgDZ60zaBkQ== X-Received: by 2002:a05:622a:13d2:b0:2dd:6c76:2e32 with SMTP id p18-20020a05622a13d200b002dd6c762e32mr10543466qtk.610.1645880592787; Sat, 26 Feb 2022 05:03:12 -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 d186-20020a379bc3000000b006490a4e507esm2494008qke.70.2022.02.26.05.03.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:12 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:36 -0500 Message-Id: <20220226130254.1301333-5-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 9970dacedb..55514148cb 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. + ;; TODO: Refactor enough to share this directly. + ;; Thunked to avoid evaliating 'chez-scheme' too early. + #~(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 (extract-package-source origin spec) "Extract the source for a Racket package specified by SPEC from ORIGIN into From patchwork Sat Feb 26 13:02: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: 37464 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 A7FCA27BBEA; Sat, 26 Feb 2022 13:04: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 723F827BBE9 for ; Sat, 26 Feb 2022 13:04:47 +0000 (GMT) Received: from localhost ([::1]:51510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkg-0007da-It for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:04:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk2-0006wi-LU for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60570) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk2-0003BF-Ca for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk2-0005XZ-7A; Sat, 26 Feb 2022 08:04:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 05/22] gnu: racket-minimal: Don't configure non-existant catalogs. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588062021124 (code B ref 53878); Sat, 26 Feb 2022 13:04:06 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:40 +0000 Received: from localhost ([127.0.0.1]:54433 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjc-0005Ud-FT for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:40 -0500 Received: from mail-qt1-f178.google.com ([209.85.160.178]:44926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjK-0005TA-EF for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:22 -0500 Received: by mail-qt1-f178.google.com with SMTP id v3so4985076qta.11 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:22 -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=Bznu0zrmYZ/IW38lGJi0vbbQr6qr5iOfSkbslRTHEQ0=; b=YzoR5IYcxl9aQ8jXxUjQq+GcLr7Hwz5Pz1ZcbGk9IxZ9dSYENHw4OIUWCJJMaRI7Y6 7k4vsWQtuDnbyVli+9XL3YrjAI3BRKAAGkS2dmN6EhjfXSdrSKSRba7rruS9Gs/mSOz9 o94ljy/EQk8RQhsv7OBUZyfK6G4O1g2KB9XJHZtpaz7imkWhQnGdwH6HrBrc2AWpk6dK DGoMQMrkxJyXDot8YH3Zrx+JCpTNjfTeuZXkfd9MvEOuxA0bj4A6Y4LOoai+oHh4F1RE WP8GamJI2dKueMQrudFSzjWxViyW60QcbwMWccpQaIpy/VsUzejndG6tsCVvROSriYKG 1lVw== 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=Bznu0zrmYZ/IW38lGJi0vbbQr6qr5iOfSkbslRTHEQ0=; b=xvEkZBORtpVmSB0On1ktF3gyrYsOBF7IvkBDWDcs/LqrOVXeGuugg0pVNEPCNQLW6S 9GHuQ6NGz1QX4z/jbMz70VsEhS/7sEgbkXNo2gCpQmT4zvqdhikwM3K3ZfS8K2g4J2f4 YIrqmh7fr4gP+PfpOpEQ/Cc871Zh41bDJj+Myh6qcGU7LwMGtfwL7/ShXigMIqfbXidb 6VBa0nvnwo/+nXU6xeUl8Fudihm3JYV5UXW0yMwQ0im8mVc/Ubv5gZArwMOFXWW/VSI0 NyGNaigTFa7Kk4W+10jkVQBiEqqh399ZNRoUiwx2vVdu83Dg6ZMhuge1fOMjmzv3kKBp iFEQ== X-Gm-Message-State: AOAM531LdzQ6BJyiM3CqBPYkrbC9m6dsDfgdhSAkBxEGUTqXWFOIiDDh sspcwUnrAQzYwmM+8obzztgt/RjLPFFr8er3yJk= X-Google-Smtp-Source: ABdhPJyx/bpmRYtIiA+l3OYhnFJL9noZFZ0g/nASotf9tDDjUh6hJ3oCOTOnPkKGh3ss3rz8+PZ23A== X-Received: by 2002:ac8:7f52:0:b0:2de:3c4c:bfbc with SMTP id g18-20020ac87f52000000b002de3c4cbfbcmr10765320qtk.611.1645880596867; Sat, 26 Feb 2022 05:03:16 -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 b13-20020ac85bcd000000b002d6a901ad4csm3408981qtb.73.2022.02.26.05.03.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:16 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:37 -0500 Message-Id: <20220226130254.1301333-6-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 55514148cb..abcd9658b2 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 Sat Feb 26 13:02:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37479 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 7AF4B27BBEA; Sat, 26 Feb 2022 13:07:25 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 627EC27BBE9 for ; Sat, 26 Feb 2022 13:07:24 +0000 (GMT) Received: from localhost ([::1]:56432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwnD-0002n0-Hs for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:07:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk3-0006xx-4p for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk2-0003BP-SB for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk2-0005Xo-ON; Sat, 26 Feb 2022 08:04:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 06/22] gnu: racket-minimal: Change inheritance to follow bootstrapping. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588062421147 (code B ref 53878); Sat, 26 Feb 2022 13:04:06 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:44 +0000 Received: from localhost ([127.0.0.1]:54435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjc-0005Uf-PA for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:44 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:40547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjO-0005TQ-LF for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:27 -0500 Received: by mail-qt1-f177.google.com with SMTP id t28so4991534qtc.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:26 -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=evebLUfr/oCnUYVfbsObW4FFLlcC6pEpmbRuPlrqxz0=; b=SZMWEhhIQVgzFKRkfFjwmzX0tIZLYjVeTirzeKQJLvx82jf7clhsWcn/vCgtzZIh9F IFlgajCe/AMeaKpjFdVynAah5azCQs7xkOdrWafNpqjBTkSRG9w6THn5uBn5ekGQGhhh rElkioDV5BoHhKk/D6W4RzpfLG0tiXN0PichF7MwZ3vkvLS5oghPQmBSSC8l/E9O+haw CGwFZljVnAjzWGCg4HNto0g59WPfKXW/73CpUp6Yy+8DhKkIbX3xwjS8QZBPrewG1DJ7 /vY8FZsgWooZjF7xljwcDJCZ9T64bVaJqDbL9iUq6AYwEgW2pYFVq7yUm1+Gp5pmEGCN +4vg== 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=evebLUfr/oCnUYVfbsObW4FFLlcC6pEpmbRuPlrqxz0=; b=RjL3VWmXoMYmkevKC8zse/JUsOwd0rg8gOEBWHLTX11SUqHP8zVTru79MGRJUUq6Bq JBVyn/u2IqmNN5Y4kS8a5Xr1wUxQckFLVE0VCR9ygQ4fS3kdhWTbcAKEJUb49rDfy9Kv V3XI+et/oTGkf5WqgrPffF3fqqOX3i6DkE0pF09LDgYA+aXNXAxkLKvvvU4LYPF/mp6S 32yJEgUcVC1+yDMefSrF68DxJeyXwQAuxVi9U4FfY0F86AYxXjqYAnaBKdBWMzvazxFL nDtgw7YoATQJ3D+L7NKqHJCcXTE+7ogNxn7c2j942wsO0M045hhhav6Rf35S0F3fEE8j H1AQ== X-Gm-Message-State: AOAM533bah6zUlVgxR38fbbsNjROhd6oWpVqOuhGDlip4EpES9V+BRIf gM0GvM/87FU6LTx2eT7D5kLldZt58/xwUC2/zng= X-Google-Smtp-Source: ABdhPJzJyKCsutUaEPNIPF5pFa8vgC9d0q8rkXPt9JdxoUOKsDdX+6hkyGXNJGDzQw3pxirvktLhMA== X-Received: by 2002:a05:622a:58f:b0:2de:92c7:8859 with SMTP id c15-20020a05622a058f00b002de92c78859mr10432901qtb.191.1645880600971; Sat, 26 Feb 2022 05:03:20 -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 o7-20020a05620a228700b005f18f39a5e3sm2422833qkh.50.2022.02.26.05.03.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:20 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:38 -0500 Message-Id: <20220226130254.1301333-7-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 | 294 ++++++++++++++++++++-------------------- 1 file changed, 147 insertions(+), 147 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index abcd9658b2..f5a8091be0 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,99 +172,157 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) +(define-public racket-minimal-bc-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") + (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 +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 +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 + (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 +set of architectures than the current default runtime system, Racket CS (based +on ``Chez Scheme''). + +This package is the normal implementation of Racket BC with a precise garbage +collector, 3M (``Moving Memory Manager'')."))) + (define-public racket-minimal (package + (inherit racket-minimal-bc-3m) (name "racket-minimal") - (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 CS - zlib - lz4)) + (modify-inputs (package-inputs racket-minimal-bc-cgc) + (prepend zlib lz4) + (delete "libffi"))) (native-inputs - (list chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m)) - (build-system gnu-build-system) + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (delete "libtool") + (prepend chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m))) (arguments - (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 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")) - (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") + (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-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, @@ -275,69 +333,11 @@ (define maybe-release-catalog 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 racket-minimal-bc-3m - (hidden-package - (package - (inherit racket-minimal) - (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))) - (arguments - (substitute-keyword-arguments (package-arguments racket-minimal) - ((#:configure-flags _ '()) - #~(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 -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''). - -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))))) - -(define-public racket-minimal-bc-cgc - (package - (inherit racket-minimal-bc-3m) - (name "racket-minimal-bc-cgc") - (native-inputs (list libtool)) - (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) - ((#: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. - -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."))) - (define-public chez-scheme-for-racket-bootstrap-bootfiles (package (name "chez-scheme-for-racket-bootstrap-bootfiles") From patchwork Sat Feb 26 13:02: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: 37480 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 342C027BBEB; Sat, 26 Feb 2022 13:07: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F2BD627BBEA for ; Sat, 26 Feb 2022 13:07:30 +0000 (GMT) Received: from localhost ([::1]:56642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwnK-0002vw-5R for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:07:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk3-0006yr-It for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk3-0003BX-9f for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk3-0005Xx-4h; Sat, 26 Feb 2022 08:04:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 07/22] gnu: racket-minimal: Add "debug" output. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588062521154 (code B ref 53878); Sat, 26 Feb 2022 13:04:07 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:45 +0000 Received: from localhost ([127.0.0.1]:54438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjg-0005V2-IW for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:44 -0500 Received: from mail-qk1-f169.google.com ([209.85.222.169]:33787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjS-0005Td-Mj for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:30 -0500 Received: by mail-qk1-f169.google.com with SMTP id bm39so6844192qkb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:30 -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=lsNjYzUGajVoFvbyMqbzXrOKUUe838jsLMfMm5+vOeM=; b=ibvgFZv6B15yRVZE2IFi1biFRJSmOPiIrfrf+P9JmEsZqscdJb8rreRi3EqFYTcclc S9Md9I9Fd4b2PazcH5mw6iwC3ODBigEhx5LHI2yaeN3231TtSdHo86buxJyqIeKk3H7A 9RONFAvT+CmI0wyByagF4TcSpzf74bC+nGvU4LdXJsd5R7Ly1sD3f/EOWXkhO7E+eBYc C1IQbuzmV5btC9DC9a3Pf531OQDf5H9MXAViZrmEG++oU+LcMyLfetGprnNh1TbqVHsz HmKDY4yUs522eC8L4vuABaLwk1NcIhu+xJNc74nIYatEnaUpjborELstRRD9cGhQCyMH M1WA== 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=lsNjYzUGajVoFvbyMqbzXrOKUUe838jsLMfMm5+vOeM=; b=H/827nPwhZeknSewRs7C8MkYCbaRm9ut3fYVaxe84h7C0o6zzBtoZFuN1hAQT2AyYG ncgG/NWWReFtPQFim2EBHT/r8tBT91qCZ5vFzrmFHka+7ELYdfyR4Vik6TKUB5M128so /XUr5AgNTgBhg57Re7P+hW6tSElfRiJeEra7Kgfls2zL0SriS9/Y9cPSwOPWYOFrhuJ1 ZkfBHS3wIcxGqJ9dPPmXjLPVdEY3xPtJH9dzsi0c8GGt+pyB78RlMaz7WBucdKtF/OsH NMngZ62NTDVCQ+BifZmNPSNcKyeQp0sHlGifCUrt0g0QDB1NS/k5u07WIdb044w7+hN/ WX7w== X-Gm-Message-State: AOAM530N5bUDRfsqMyH6b6UcvTdaXBx6Jt1QRWBI8Ek0oTVsKiEImZMP Fde2eqXQjxuPOwPKL1i1Jj+kY5dMRvLT2YPxjMs= X-Google-Smtp-Source: ABdhPJxvx6DWc1wNXi6eHCMNIk4Mn+zx4dGmv2PI2cWyb32I5imepTSVd40mi2AxLRGs37huhdDBHA== X-Received: by 2002:a37:9ac5:0:b0:60d:f165:8b0b with SMTP id c188-20020a379ac5000000b0060df1658b0bmr7220855qke.656.1645880605082; Sat, 26 Feb 2022 05:03:25 -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 p68-20020a378d47000000b006491d2d1450sm2558978qkd.10.2022.02.26.05.03.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:24 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:39 -0500 Message-Id: <20220226130254.1301333-8-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 f5a8091be0..ddbeb68a37 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 Sat Feb 26 13:02: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: 37465 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 723ED27BBEA; Sat, 26 Feb 2022 13:04: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D793327BBE9 for ; Sat, 26 Feb 2022 13:04:53 +0000 (GMT) Received: from localhost ([::1]:51790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkm-0007ql-VZ for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:04:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk4-00070A-1G for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk3-0003Bf-MH for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk3-0005Y6-HU; Sat, 26 Feb 2022 08:04:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 08/22] gnu: make-installation-layer.rkt: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588062521161 (code B ref 53878); Sat, 26 Feb 2022 13:04:07 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:03:45 +0000 Received: from localhost ([127.0.0.1]:54440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjg-0005V9-SH for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:45 -0500 Received: from mail-qk1-f173.google.com ([209.85.222.173]:36470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjW-0005Tu-P8 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:35 -0500 Received: by mail-qk1-f173.google.com with SMTP id g24so6816189qkl.3 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:34 -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=/ykUrrV+AsCKmY04Y1T+UOzhOPgVKEdMra2E59t4oOE=; b=cLPXlDM0l3/IqWaJw+2eRR7UFnVGiMFvKXCEIVAgOpQrg3Lk5/NBEimKV+hFoSIE/R foQAHo1RLia23ER/mMWRwPBvNy76x4TKRQ5UdsmPUnIZUGLhO+GBW5cN6cwaEitrA2Fc 1BrFjI4sG2INpgHVddMfBVfafSvRSE1JGMx5BdoU3GderbkyfOO+BZhPUb1N6Kb9d3kT W6yvB1+T1OY6Mtyf7X2mHL2qM3JQFSKHwkMuY0o8KJzf5bsvuSmjvKBpM4YlBwpMaXRc cAkyC9J9eMEO10wIPHOfF12CEN3SKGu2fW9la8j6CuPnW27RG3bo5g9Nt8dho/1NUs+2 BnAw== 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=/ykUrrV+AsCKmY04Y1T+UOzhOPgVKEdMra2E59t4oOE=; b=2JDoxyhIR1wNzxfFRhL5OIvnymHBKgqJUDtI5wpfxGvvXpB2xVHG6DnibqQXiZGcBV OMs8q39OdOj3z+Iu5shm79nxSaNePW1UbSliaQ6eF7CfM0bkykIn5pN94UR6wPLQMbwO xOFKI+kEk6G0IzfNw8ruUCHT/YAbnQl2wgPTBX0zXkAB4CrgKpoAbC0zi1bLiS5Det/c DuhV1Rui0HRgI7Vugrrovhil6BLrw67jezCBunn+uDCwzQpkmLHZq/NhNCuos9MDpmsC Ftgb4xJbrMrMb6ps0zN9QJyTZ9VoooGpqf5TKkM6eb77F4dVG99wJcVAFoRAQTInX/gU +ltQ== X-Gm-Message-State: AOAM530MpC8CBB5IBytgz35KzDc29Z8flb4S+0Bhxq9bKpSm/FOxgSWK 8n9LM/nUk6xZQGiffXgWC6ag6W8KFXf7O45Dq7Q= X-Google-Smtp-Source: ABdhPJw5/2uHWe75rTO1+jKaBk1VENublSO6BiNzkhyU8tl6buhmiqRGE6qi38BklG8DTnE06M3Ptg== X-Received: by 2002:a37:5503:0:b0:4e1:2b66:dc53 with SMTP id j3-20020a375503000000b004e12b66dc53mr7102819qkb.706.1645880609197; Sat, 26 Feb 2022 05:03:29 -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 r14-20020a05622a034e00b002de72634a7asm3197129qtw.37.2022.02.26.05.03.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:29 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:40 -0500 Message-Id: <20220226130254.1301333-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 (make-installation-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 ddbeb68a37..1670f478ff 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -1358,84 +1358,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"] - ;; workaroung 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"] + ;; workaroung 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 Sat Feb 26 13:02:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37467 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 9C9CB27BBEB; Sat, 26 Feb 2022 13:05:07 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AE46C27BBEA for ; Sat, 26 Feb 2022 13:05:04 +0000 (GMT) Received: from localhost ([::1]:52460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkx-0008IP-Mk for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk4-00071c-DN for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk4-0003Bo-41 for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk4-0005YF-05; Sat, 26 Feb 2022 08:04:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 09/22] gnu: racket-minimal: Separate from the Racket VM. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064221226 (code B ref 53878); Sat, 26 Feb 2022 13:04:07 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:02 +0000 Received: from localhost ([127.0.0.1]:54445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjw-0005Vz-CO for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:02 -0500 Received: from mail-qv1-f47.google.com ([209.85.219.47]:44570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjb-0005UO-Fi for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:41 -0500 Received: by mail-qv1-f47.google.com with SMTP id v18so8804845qvh.11 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:39 -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=FF/6TmHiuvjut7gq51UUTOFodzTiSRWpqbyRXQTiXws=; b=dzT9LFhLLz3tsRRY68XiWEr1DylDJPBEnZ3t6UlOatmvPpS5n0HjKNjFhEseQHLhM2 jTc34HHot6L8yLyrU6gUy8QY/lyTybIc+dPaThnIhu7Suiz/UOl9YZF4FlP9nzRQFmIr zKahOvGAU3ubC6Fqd8ixolO0sxlmrnztvvVul/V5d9foD7EzaRzxjLyW9KUyNxu0GjjJ s2zVvP9Dgqv1Le5/dhCkd4Rre26mHEvWheZgbEudBkHb8KbuIZrRph3I2+bqM3ywQ64W XvmQSbgHU4Tnh3YWsyBhy0SZynoOgIodwjEeVz+SA+ukJxJoChxb6yu3THZwWynKDnMN MxfA== 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=FF/6TmHiuvjut7gq51UUTOFodzTiSRWpqbyRXQTiXws=; b=CVzDzRJj4zYQPG8qqZxjeACZCeK9tjhe4yQs59KZ1inpb1q4V6ZO+9ITGzEgWxyj5k 3Hs4/OGd8CpN0XYhFhjZRr5pbw4PSr1LB33Az8KaAxjiKEXSA3a1PNstj/L39buGC3kr cu1064wpE53xDcIyTi/XaLYw2WGJ772hpG5C/t+dI1eYvuTvDTdYrqsJwHGqCx91nlWy HUQ4dgTEWBefzk/OloYyKJL0EH0++RyBmISmF2v68Hhfao+8/55jF5hZRdYUdFFgs72k H+GN4M06NObOP2JffuZkiqpgVT3hcM3PYpf7mTD7ooyBMZTxSXjFNwdT5vbKbGlCmw27 xclg== X-Gm-Message-State: AOAM532uQWsxjuXORy/NqUgQv6AVrcZci5ItNXN3QzhyxU90UbmvDqhu XOtxPP5lDI8yuVY/by7v9nLa5j1WOIvFD5aLGiM= X-Google-Smtp-Source: ABdhPJzON4OE2zDbUU27tHlen4ZU5iUuKH6nCSgjS7SZbYifvgF/xoY6VS/1EmU3evotoQLznLCqKg== X-Received: by 2002:a0c:fd82:0:b0:432:5ff0:8e70 with SMTP id p2-20020a0cfd82000000b004325ff08e70mr8817740qvr.54.1645880613350; Sat, 26 Feb 2022 05:03:33 -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 x12-20020ac85f0c000000b002de8931d4d6sm3327426qta.77.2022.02.26.05.03.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:33 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:41 -0500 Message-Id: <20220226130254.1301333-10-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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'. (make-installation-layer.rkt): Adapt to support in-place VM build with possible intermediate layer. --- gnu/packages/racket.scm | 598 ++++++++++++++++++++++++++-------------- 1 file changed, 385 insertions(+), 213 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 1670f478ff..a7704f1afe 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,53 +366,54 @@ (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'')."))) -(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" @@ -325,17 +430,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)))) @@ -350,7 +452,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 @@ -368,7 +470,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, @@ -447,10 +549,116 @@ (define (extract-package-source* source-groups) specs))) source-groups)) +(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 + (cons* openssl + sqlite + racket-vm-cs ;; TODO (racket-vm-for-system) + (extract-package-source* + `((,%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 `make-installation-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 + #$make-installation-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 (cons* @@ -469,6 +677,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) (extract-package-source* `((,(origin (method git-fetch) @@ -491,8 +700,6 @@ (define-public racket (git-file-name "racket-algol60" %racket-version))) ("algol60" ".")) (,%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") @@ -1238,93 +1445,40 @@ (define-public racket "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3")) (file-name (git-file-name "racket-xrepl" %racket-version))) "xrepl" "xrepl-doc" "xrepl-lib"))))) - (build-system gnu-build-system) (arguments - ;; We're using #:configure-flags to pass flags for - ;; `make-installation-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 - #$make-installation-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, @@ -1334,10 +1488,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 make-installation-layer.rkt (scheme-file @@ -1350,41 +1501,53 @@ (define make-installation-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 @@ -1393,7 +1556,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 @@ -1427,15 +1593,21 @@ (define-values [rkt old-foreign-dirs] ;; workaroung 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 Sat Feb 26 13:02: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: 37470 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 6FE5E27BBEA; Sat, 26 Feb 2022 13:05: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C012E27BBE9 for ; Sat, 26 Feb 2022 13:05:38 +0000 (GMT) Received: from localhost ([::1]:53142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlV-0000L3-Ub for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk4-00072w-SX for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk4-0003C9-JU for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:08 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk4-0005YN-Dl; Sat, 26 Feb 2022 08:04:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 10/22] gnu: racket: Move Chez bootfiles to (gnu packages chez). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064321245 (code B ref 53878); Sat, 26 Feb 2022 13:04:08 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:03 +0000 Received: from localhost ([127.0.0.1]:54448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjy-0005WI-8m for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:02 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:33623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjf-0005Ua-BE for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:43 -0500 Received: by mail-qt1-f173.google.com with SMTP id bt3so4981997qtb.0 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:43 -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=QWGrAxMsRalG9YbMvxWhRRakQjhDJePWTZEStznge9s=; b=Mficudk9PCCa4zZEls4pALTJ7J0NRSKQMwj0OViq6JxJBMRsospK+mCfKaksNmFMUj apMxdmn4sgvGH2XlgEdUneUQBXR/RS2V3D6iQHnVH2+mCulbgCMBN7/owwO1V/tJyACE MqYN6lwtkkEgia0WUCSkPSJz4EkcCI2r6R3Vf1xHUmjtv+LfWhcjUhpy5V2rZbrHGhdJ /E7iZsRrEtYMHevekbutDEBNzxyVFtr7BbVp2cGgS5Bdu4CLuQI6IctkRzrKgK9rdxyh 65sIZBkjHO1R97MnPsu55dzcWKUQ0CPyh0TaZOa3GXiXDdWI1tXUf+wrpkMlbbLA0Zlf XFNw== 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=QWGrAxMsRalG9YbMvxWhRRakQjhDJePWTZEStznge9s=; b=4GTvIJMoA7az3YQscK7CHzITEmVFULMF44GPt1dT/aBpnbE4lzvlO4Hgzh/aqGZ92X AqmkDiiZfyus28p4pgqSDG2oZ2ymxrYq783gAqW5dOUq+xB4SjXQDwXnONctiLe+sH/0 jenHkel2bTXdG7bueWAknzy3DeDFjFv7TDPCQ9EHAJpyd8q2jHSxL6TneYFt1fF3eGsX gyUdLcRcvLsQkBoZSi6gdrik0pFXCKGVrFrbCqqgwm6Z2VNu4OeYR0QC8l45eHxCG0BQ Uv71m1vHOUBsEBbmLWmzkMkuvDJeSwFWlHQn4C9Owtk1vq9EpSfZsg7NI+YDbIc1uwG4 /4NA== X-Gm-Message-State: AOAM532Y+AZiy50HHQJtyfXWIl2243hCig358OkItV5LULLmQtNbEIcg cTwpkjF38fITG9wMKuiFJTaU+5PWoldFryTMaPU= X-Google-Smtp-Source: ABdhPJzDmaxN6aUrm27+j7EZL+eG7npAK8v7x9V6buhZU0N4n5iX6vaUZ7+YgqaRrhNiVSrm/Rl5vg== X-Received: by 2002:a05:622a:90:b0:2de:57e3:c77a with SMTP id o16-20020a05622a009000b002de57e3c77amr10490334qtw.488.1645880617753; Sat, 26 Feb 2022 05:03:37 -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 b137-20020ae9eb8f000000b00648f9736ab0sm2503052qkg.124.2022.02.26.05.03.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:37 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:42 -0500 Message-Id: <20220226130254.1301333-11-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 a7704f1afe..ba958b6101 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -442,58 +442,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 (extract-package-source origin spec) "Extract the source for a Racket package specified by SPEC from ORIGIN into a new file-like object. In the resulting file-like object, the package source From patchwork Sat Feb 26 13:02: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: 37472 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 C37A827BBEA; Sat, 26 Feb 2022 13:06:04 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 176B427BBE9 for ; Sat, 26 Feb 2022 13:06:04 +0000 (GMT) Received: from localhost ([::1]:53878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlv-0000zJ-82 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk5-00074H-Cq for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:09 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60582) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk5-0003CN-3W for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk4-0005YW-Tg; Sat, 26 Feb 2022 08:04:08 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 11/22] gnu: chez: Add utilities for Chez machine types. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064321258 (code B ref 53878); Sat, 26 Feb 2022 13:04:08 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:03 +0000 Received: from localhost ([127.0.0.1]:54452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjz-0005WY-0Z for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:03 -0500 Received: from mail-qk1-f182.google.com ([209.85.222.182]:41507) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjj-0005Ut-HJ for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:48 -0500 Received: by mail-qk1-f182.google.com with SMTP id d84so6786149qke.8 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:47 -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=MFwR+BllMo6vD6nqhDC2Pbup/TnBXRWm58D6VBfRPC2ts6x4Th6Th3Ozsz2q4ai34c WQD9LPiC1uFQj3wwbLur4RWLkktv9R0LW5eYZ64A1qMyh+VO356KV252vtHHgOuuJ4d5 CEtSQRg1IDSAlYUjZAsaDkfZF/rCOVkxKFTznAb/ispnaoF4+ALA5FnFInRl6+y4lXFq 8wFvujB1eX9IQD/SIA42isrw7LXXzFOhJkI6GYKcVH1mrc3mm/aarKU0evVHvPY+/mJt zAEly6gefgaFNGiB4clFXqnzbIIYsVU1UI+QUxx4pEOKLizcxArVM9xsnEXt5QwZOoX9 YQbw== 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=rMPY1kZO4DDrxzp04ITq+ndn+u0kkK9EnK/vlx1JBWtxKuMtWZqpP/DM6q12NFzCj2 qLGWBBpzPOk281A01YiNGqP6mYtSk4wNqpXFLIksmJ2vuS0tCEig7S72KlDrRwwp650p lDISla4b94bboqiTxxXGk7agRJXySP1j9tA/nZ5qeoNGrcIlmgSb+AnZK+diIDyQgYj0 ikN9bqcz5s0n31p4J7IW1xhvrMToC9FuNY4rR4KLDaSZzIbyPgVbhvf1Q2WiIuHBzkBU Cx9EEpixgoW97U9VRIzq4BOLmZArRMn86ZjFKEKgbGSzSkWrCvbSdYXwFWQM1azrmDGX zv5g== X-Gm-Message-State: AOAM530B50ns8MY5FQxXtcRCxqQBRqBFqHN3dEpLE5V8kpxPFNw+T+86 IHwLXSU0AeCk9Y7VrZ+9NqWQKq1HA1hUOUgeOk8= X-Google-Smtp-Source: ABdhPJyM41EvnKU2hkGODW8f5uwdwQm24sORkWPjr83+TvvaU+up5BgrIezNBi4ejTBZfKubtLWujA== X-Received: by 2002:a37:610c:0:b0:5f1:83b8:a6c9 with SMTP id v12-20020a37610c000000b005f183b8a6c9mr7116053qkb.196.1645880621774; Sat, 26 Feb 2022 05:03:41 -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 192-20020a3704c9000000b00648d50e398asm2531270qke.109.2022.02.26.05.03.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:41 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:43 -0500 Message-Id: <20220226130254.1301333-12-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 Sat Feb 26 13:02: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: 37466 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 BDF7A27BBEA; Sat, 26 Feb 2022 13:04:57 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 814DC27BBE9 for ; Sat, 26 Feb 2022 13:04:57 +0000 (GMT) Received: from localhost ([::1]:52150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwkq-00085r-MU for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:04:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk6-00076T-3B for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk5-0003Ce-NW for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk5-0005Yj-Ja; Sat, 26 Feb 2022 08:04:09 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 12/22] gnu: racket: Add 'racket-vm-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04:09 +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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064421270 (code B ref 53878); Sat, 26 Feb 2022 13:04:09 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:04 +0000 Received: from localhost ([127.0.0.1]:54456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjz-0005Wn-Oq for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:04 -0500 Received: from mail-qv1-f46.google.com ([209.85.219.46]:39733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjn-0005VM-DW for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:51 -0500 Received: by mail-qv1-f46.google.com with SMTP id a1so8843897qvl.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03: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=k/9MRYKwBQb0a6Gw7ObTuv3AcCArpX+jq+jv49oz8T4=; b=kIr/h5AuoMMZN27ZaZ1UBDfY7KshbDGmC1yq1XxPl9oVqKDWpKJ89kuu78nzUy26rn 7I76aaUhxEil2K7ikjhG+/ml/d57z7VKGuV8I3EreZRAyVrRKRms1BVZ+B3AvTP/MJNW um2yesIISen7Ovrinx3Mxq5cMZe6Bota0oAz6c9Y1kprULlBAPoWJtqG3dUzBzEDg9Ea ilc2zs/CDBb191u/w/qVAXQAvbDKgF5N9a0KhkPfOgL5MW0bXGKoA9XzUqnT/afOEh67 WkfB9CfkQoJ71vmoLiuqVfGg9L9/bgH6FqPoc7rErVsFdfHPw7DVRx90mF5Skp26Qc3c Egbw== 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=k/9MRYKwBQb0a6Gw7ObTuv3AcCArpX+jq+jv49oz8T4=; b=7yhdZuR2qQWcJEONe1mLdkDH/JBSST0H7lZWK32D+cZCMQoZKXch7LKUpTRqRxYvLH ML4b5OmzAw0rcJfxDmlqq0bjLy4wACekNSnfLV0jWSKPujv+3Yv3YscvW9T1fEknsJuP sAGPJz4TnjKIJ4ovTcW2ILWIyMD29x6J3SiV/IOFFhkLXT270wzY+mxXQb3wxV7xCYRt XzLHfiX0n4t4dCnG4PLYKJ7cOUsv23iSyjd2CZ2Qtahtv9y9hau+GRB4PZ+tm02qezJs AvxpXWrRaJtrv+D/8oStc/2BtrOeUS9MdbkTtM7AAyLhhUBPv4lM6gsOYR1yXixBKOEO 89+w== X-Gm-Message-State: AOAM533jEwQlyT2SnNg4ecZ7XUjm5UVfGjRISZcture5mRvLaRqeXUqH ZBxSa3lAkv/fNBH2xYTzGFiTye0pwm2NGBvgbrg= X-Google-Smtp-Source: ABdhPJwGC+7A5yJoL6E4CjPyUzTcIjfb7VYT3JtgkbeF+nmXOLt5zbeKRPPoZg7MX6r+qer/HmT4Gw== X-Received: by 2002:a05:6214:c89:b0:432:c49b:41a5 with SMTP id r9-20020a0562140c8900b00432c49b41a5mr4905379qvr.48.1645880625874; Sat, 26 Feb 2022 05:03: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 c6-20020ac87d86000000b002ddd9f33ed1sm3138312qtd.44.2022.02.26.05.03.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:45 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:44 -0500 Message-Id: <20220226130254.1301333-13-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 ba958b6101..93e5eea158 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 @@ -508,7 +516,7 @@ (define-public racket-minimal (inputs (cons* openssl sqlite - racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-vm-for-system) (extract-package-source* `((,%racket-origin ("base" "pkgs/base") @@ -625,7 +633,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) (extract-package-source* `((,(origin (method git-fetch) From patchwork Sat Feb 26 13:02: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: 37468 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 D8E3E27BBEA; Sat, 26 Feb 2022 13:05:23 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7489527BBE9 for ; Sat, 26 Feb 2022 13:05:22 +0000 (GMT) Received: from localhost ([::1]:52730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlD-0008TV-Qf for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwk6-00077g-Gb for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwk6-0003D3-67 for guix-patches@gnu.org; Sat, 26 Feb 2022 08:04:10 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwk6-0005Ys-13; Sat, 26 Feb 2022 08:04:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 13/22] gnu: chez-scheme: Use "lib/chez-scheme" for search path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:04:09 +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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588064621311 (code B ref 53878); Sat, 26 Feb 2022 13:04:09 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:06 +0000 Received: from localhost ([127.0.0.1]:54461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwk0-0005X1-69 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:06 -0500 Received: from mail-qv1-f42.google.com ([209.85.219.42]:35367) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjs-0005Va-2l for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:03:57 -0500 Received: by mail-qv1-f42.google.com with SMTP id 8so8885444qvf.2 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:03:56 -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=MWndrRDXHspBq1QQkgbSJoc4I680TI0JaiSKrL8aU30=; b=AywK4IwF+PSuV2SILcCvZiqa0J78f85cNNWVTH1GzTVu9bC8IKBb/k/2/NOAVknPGY mkDBDPA5y0b232Kfvi2GLpdThPjh5fN32T/9wddHhUODSpa0qCZRbHQPQ6wGijIIW9m3 3+e0Gq2+rtvhQ5Juu0rlXWUPpnId+PJZ9931LpYzn4u1emJ6dKwdgBWv0vSuB6KAquD3 VgiTRiJ0XwpnEnH9VKIbUTY6xecrh6hSsKNY31Se5HMI8vc7VUeJtgQZk3mXbv5I3JlA FaWAuxdELjydyQGUDCdrx/iX8uQ+S39r+/2IrVtclPTlRa7EzYX9l1qhHAB4CJfF1iVY 43lg== 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=MWndrRDXHspBq1QQkgbSJoc4I680TI0JaiSKrL8aU30=; b=EYI7yG4VYIKU+LuBT2ZtiDbz5nHNFjKr/sAztJxnZIwDDuWLcBTKhvgUe9EymrUMhY 8kTnwkhD9ruRriqRjXsRqzZK0LfyUpwGnL7IZHEsW8Fzt8xoEUwg75NmFrOIlV2yoTuL +uCneJx59/uRzH95iIwvOV6/tzy8n/sl/nPtQsgvWEg+9doaw67R+fQOuROCIMRAVzbT k6L63QuWI00e45S3enWNb+oyORZHQZS810ljWiEePxzjOLF2ffggaKk0XFtroE5VQ6C4 xdf83uytryk2DP02/aPmqfBxTBVXk2C/Mzk0R/s9+uM5ZfsrbwS8vxTb36kwbOgjhFLP /s3Q== X-Gm-Message-State: AOAM532eGruHXFmHYaHHfUhR/J2gy/qdi2Xu/FgDag+/AIIolp/Fs4vO boUesZK7v/SkZmYb58v3DcFyPzF4lVsmjnNencs= X-Google-Smtp-Source: ABdhPJxaZxJSYdZOg+3bkP1VQa5fCNffVRlFKVTFDrBDcZ2B1KM13lFNw5SX3LWI7B0INnuMrA63JQ== X-Received: by 2002:a0c:f8c3:0:b0:432:5482:d1b6 with SMTP id h3-20020a0cf8c3000000b004325482d1b6mr8845413qvo.60.1645880630021; Sat, 26 Feb 2022 05:03:50 -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 j10-20020ac85f8a000000b002dde6288fa7sm3364146qta.83.2022.02.26.05.03.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:49 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:45 -0500 Message-Id: <20220226130254.1301333-14-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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-srfi, chez-web, chez-sockets, chez-matchable, chez-irregex, chez-fmt, chez-mit, chez-scmutils): Update accordingly. Also, remove input labels and use G-expressions. --- gnu/packages/chez.scm | 382 +++++++++++++++++++++--------------------- 1 file changed, 194 insertions(+), 188 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 603fc4201e..0a84a07247 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 (list (string-append "lib/chez-scheme")))))) (outputs '("out" "doc")) (arguments `(#:modules @@ -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 '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)))) + (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,74 @@ (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) - "-site/arcfide"))) - (for-each (lambda (f d) (install-file f d)) - '("sockets.pdf" "sockets.so") - (list doc chez-site)) - #t)))))) + (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/chez-scheme/arcfide"))) + ;; 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/chez-scheme/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 +663,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 +695,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 +726,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 +767,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 +800,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 Sat Feb 26 13:02: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: 37469 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 2513127BBEA; Sat, 26 Feb 2022 13:05:38 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AF29D27BBE9 for ; Sat, 26 Feb 2022 13:05:37 +0000 (GMT) Received: from localhost ([::1]:53020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlU-0000Er-RE for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwkx-0000DC-1H for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwkw-0003Rg-ND for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwkw-0005c0-HA; Sat, 26 Feb 2022 08:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 14/22] gnu: chez-scheme: Use shared zlib and lz4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068121481 (code B ref 53878); Sat, 26 Feb 2022 13:05:02 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:41 +0000 Received: from localhost ([127.0.0.1]:54493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkb-0005aO-Gt for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:41 -0500 Received: from mail-qk1-f180.google.com ([209.85.222.180]:41514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwjw-0005Vl-QO for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:01 -0500 Received: by mail-qk1-f180.google.com with SMTP id d84so6786419qke.8 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:00 -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=cMhM4Hgg9U6jTMLRrhG0O3LswFRxbkC1hIDPaNTSRQc=; b=M7sGxU0O/9IWP7S1vnTpUoUNrI6tF/graDvi0wgapsezGE5rG7z54Qm92Rg9mCbPmC j38kOTM6Map509+Pc/Tk2BVtcUlP+B5Fr6D7LqAglM6Trz0yHA4Ypm8/dZ1W9RQHXkrH kfFTF7mGKU4BLCjjH3hqRz3xwn0asiCb32mEadBEw9sYf7DfeC5CFTyISryXrS+UjNbO C/UQDvhsIdD+0v8G/FjFua/AfC+FnTZQxgR5n/FWCDtLJSpYUcMtCKrAsZ+RM6SLw7cy 3mU4epZFGCfnEwcXOhDZD4M4ElnuNJKZyeh1PW/dds7SCRiI9mQc/bNT2x4ftECGrLCc gTmA== 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=cMhM4Hgg9U6jTMLRrhG0O3LswFRxbkC1hIDPaNTSRQc=; b=6an9o/z1BvaB4+YjDXJDjdj5Yj4VSHzwgSl9mwVxacbFwXSAEGF6FlIlCIzb4+/RXV lZPKOYl2AQhvlqbGYvZaDuCkMkRgPSUkuUbk+tJkkAj/klmkFRuCm/yd1fWh5wW9sdSU 5a5vlFLAsjMeg9y8zu4PHZL+rFTKkrPrOfI7I94XiMvY+r5wJBGMQR4KsuzqVX+vUqQc 3lliufn+FqxCA8p/vQ2uRMum6g6tlL9fTZrzSgcqQocGwt+D/nPJKFTVTkXDJYQKm2+g 0/lF01/exVJRKbCB6PMfUa4EqSKW6ICylBxTGmrbvpH+Ned80OmOSpzS4mpjy/+62YP7 /+Mg== X-Gm-Message-State: AOAM530UsSzTXP9cArs6AZoXiVthqPt6WLXIcLDHPByrH9ZSjQArHG8F T7RmMt2VngdkoP1TfYYQbKvyxPnG1G6miEDqxKs= X-Google-Smtp-Source: ABdhPJzvW6IUpVMs91xSLe98fXdOUT8sI4vPNPAeJr0Bczx9rN+XoO52cx3qR5xUryIC3s5oKdexgQ== X-Received: by 2002:a05:620a:1729:b0:648:a992:cd47 with SMTP id az41-20020a05620a172900b00648a992cd47mr7462423qkb.53.1645880634306; Sat, 26 Feb 2022 05:03:54 -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-20020a378883000000b006491db6dbb1sm2486706qkd.84.2022.02.26.05.03.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:53 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:46 -0500 Message-Id: <20220226130254.1301333-15-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 0a84a07247..43332c06ad 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 Sat Feb 26 13:02: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: 37481 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 731EA27BBEA; Sat, 26 Feb 2022 13:07:49 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7CB9427BBE9 for ; Sat, 26 Feb 2022 13:07:48 +0000 (GMT) Received: from localhost ([::1]:56964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwnb-00038Z-Lz for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:07:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwkx-0000Es-QS for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwkx-0003XQ-E4 for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwkx-0005cB-6v; Sat, 26 Feb 2022 08:05:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 15/22] gnu: chez-scheme: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068221489 (code B ref 53878); Sat, 26 Feb 2022 13:05:03 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:42 +0000 Received: from localhost ([127.0.0.1]:54495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkb-0005aQ-Px for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:42 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:37707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwk0-0005Vx-2m for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:05 -0500 Received: by mail-qt1-f177.google.com with SMTP id q10so4989780qtw.4 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:04 -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=H6h99RZO4mXEFBHmgdJmKzbn218TAYMqE39IhXoMJBk=; b=QA+fkHiU1fnLsZvKup9O8dIbXgdQW8DiQbektmLKQGE9709lJdy2wfc/IYDF9/uK55 yz3kZsjiJNOE4nPeHXCGGET+r7Yv2ygkJhbGnhoQpzW3wzwIolsj4dGmk5VNEgLLFMNC cGTdGxGzolx4bjYKMmOVToABwjoB+s9SAjShDehKzZ2mgS1mflqlzLvifbi3ND6uM29R VhVYM8Im1/luJ/jsVFGquzegQhUPDfHM4c4v9z4G0EfMuy04Q/JJ+r5uK7CeGzt5ESWC vRMdtFqExv9SBKb+g1DPrZ/zwlWTapSpimUO5U0gmmrCEQcl9xs3v7OQEKAEqK6WC30J tqMw== 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=H6h99RZO4mXEFBHmgdJmKzbn218TAYMqE39IhXoMJBk=; b=m9rrrRmb34EAKSrOgZ7SB7cAZoUf1yU9V0kIwVy4D2Tf0AYo+1Ami5R9ctKt9Q1Hqe bmd6Xgi1bJnv3Y17GycpFQStu/6n5iwWtBavaggWEeKn2CdN/aQo86ws8kmHg4TXyvkd 5jRxJc6LE31BwVmdgCeVTkalvyxrce8+uNJxF67rzkhUDCfYBg3i4/E/zS5Id+gqnmtp JAjj5B7gBuLqQhHq++HkWBrSfXuEfM0WmHx5wKpuCqOUSbTLiTPuVT4xCPMVzZBrYsxv 3REjBzuAvuvL9d35l6piZ1MCEg6M+hMcKJQlGpNc4hKSrKh27dImYNC3pkeTwzNe91mQ 8TGA== X-Gm-Message-State: AOAM530hHyPmFlz6q6Du/lsEU9XdlYOHEyXP7qZayapLo0nHIa9b5BcM ap7EaF47hCYP5FoyGBPaiYIkcwyHF3vMRfjSxNE= X-Google-Smtp-Source: ABdhPJwx29zTq7bVGEVJ5vSrgerO8uNnM0i1MjtR5aHWquzk9dBnDSqMjXNrmdPWxuLyGJxF+NMXwg== X-Received: by 2002:ac8:5e49:0:b0:2de:90a8:307e with SMTP id i9-20020ac85e49000000b002de90a8307emr10518659qtx.671.1645880638382; Sat, 26 Feb 2022 05:03:58 -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-20020a05622a03ca00b002de9f8e660dsm3396411qtx.63.2022.02.26.05.03.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:03:58 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:47 -0500 Message-Id: <20220226130254.1301333-16-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 43332c06ad..a130f2f41a 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 (list (string-append "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 93e5eea158..3ba1438014 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -257,10 +257,7 @@ (define (make-unpack-nanopass+stex) ;; Thunked to avoid evaliating 'chez-scheme' too early. #~(begin (copy-recursively - #$(match (assoc-ref (package-native-inputs chez-scheme) - "nanopass") - ((src) - src)) + #$nanopass "nanopass" #:keep-mtime? #t) (mkdir-p "stex") From patchwork Sat Feb 26 13:02: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: 37482 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 CC28A27BBEA; Sat, 26 Feb 2022 13:07:57 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 03B7927BBE9 for ; Sat, 26 Feb 2022 13:07:57 +0000 (GMT) Received: from localhost ([::1]:57182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwnk-0003JS-1r for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:07:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwky-0000GW-AD for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwkx-0003Yn-Vt for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwkx-0005cJ-QJ; Sat, 26 Feb 2022 08:05:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 16/22] gnu: Add stex. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068321496 (code B ref 53878); Sat, 26 Feb 2022 13:05:03 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:43 +0000 Received: from localhost ([127.0.0.1]:54497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkc-0005aY-EO for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:42 -0500 Received: from mail-qv1-f53.google.com ([209.85.219.53]:43622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwk4-0005Wj-DA for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:09 -0500 Received: by mail-qv1-f53.google.com with SMTP id c14so4016801qvk.10 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04: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=vxW4XQP+MDoF2BylzCMVbI/zhkM8gWIfVo6540Fy93M=; b=UNGon/Cq6Q63fXkHe+N+mMdwrT3KQEkyTcs2jrTkNSaGy6gAm0zHsD5y+DS/6CbWvJ TEo5QrIkBt4xgA3xUiv8kpgS22lfaVdYM82MPO5wgDN9I6nijIRwEx+fvcHuybh8avBN P9KqaOpy4BFT8VbMelIzLM9nNRAL8TGavVrxurwxzpIO4AKxBOgvA7Y3W0wxrR7lt5w/ Hvi9WcUa9DFgJ0Cr8cWtrq+fvD+obMkzHO/yJKIelB/CNRAc8TLy7qUBfjkabYwWKtMX KGlNfsdQsTo+qvCZImWLgts+DjPFU1nYaqKiEAf8BTACoKkfOHbpeXnWJX+qcxsSZicd f6pA== 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=vxW4XQP+MDoF2BylzCMVbI/zhkM8gWIfVo6540Fy93M=; b=FsmdcXEeHr+1aiLeIYJ8oPH8S9TNu4zlv6Sfi/mOV8kUmWUd7H7JZWgI/mTKiQIJRn eqm72YWbX+rEkyYctZXcC4/uM8IWPFpEdSF6fsjJBK6Mtt3nehrNJRVVNXEQ3uec12oC ROjEJz5jrLSwBem3jiWKSrjIofbd9itQKx8vF7178Ar1o9Ohfk7Q3o5ZSH7xzfdEtPVR jklm9hWIlZYlux5Xvq1YmuT+wP7I2E4FcPU6b0ijBjHnCv6QGQ1HBgZpjrxf/BXbgyc+ SHOZSScjosIJBsTI66fBrc74owUvWxHUXjlMMhbEV4DGLks5yKADocgV8oasV1j02YEb z28Q== X-Gm-Message-State: AOAM530Gj2IkDNstudHyZTF6NZOH/2TtsJDkQJD1NASnpP5ldn4UJ/2w 7e7ONEw9CyKuCiUzZQ7XvDhQiLhnVnozncrfgn4= X-Google-Smtp-Source: ABdhPJy7w+sV4YULKuIkpZ0jPIT1IIrQo8F+WZT9u1U6NKA4yQ85xnlPNKoZ62sD0jotTGTmW2gNFw== X-Received: by 2002:a05:6214:5296:b0:432:5c5b:5b23 with SMTP id kj22-20020a056214529600b004325c5b5b23mr8776223qvb.106.1645880642720; Sat, 26 Feb 2022 05:04: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 m29-20020a05620a215d00b0047ec917d4b9sm2446474qkm.56.2022.02.26.05.04.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:02 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:48 -0500 Message-Id: <20220226130254.1301333-17-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 a130f2f41a..99a250154f 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 Sat Feb 26 13:02: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: 37474 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 CE7BD27BBEA; Sat, 26 Feb 2022 13:06:23 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 13C0327BBE9 for ; Sat, 26 Feb 2022 13:06:23 +0000 (GMT) Received: from localhost ([::1]:54632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmE-0001YB-82 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45130) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwky-0000J4-R8 for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwky-0003Z1-Go for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwky-0005cS-A8; Sat, 26 Feb 2022 08:05:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 17/22] gnu: Add chez-nanopass. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068321504 (code B ref 53878); Sat, 26 Feb 2022 13:05:04 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:43 +0000 Received: from localhost ([127.0.0.1]:54499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkd-0005af-0T for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:43 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:35719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwk8-0005Y5-JQ for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:13 -0500 Received: by mail-qt1-f179.google.com with SMTP id w1so4998946qtj.2 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:12 -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=PK+j54/R03k9wq48VyNtT/gU/3tF/wy2U7nSt7Dij50=; b=BhwJaEfC/xEHxit1Th9I9lGzYcr9iErAHIoxE7nlpJPG2kThfWjLitmyiqjInBQfza FW65LSEnDqADO+7tGyvBViKJd4osCqgFukkBF8Tnk9jX7l8hNr/r/Y/OR/hb1biGqdYO /GFDkfQl/U6VC16C+pGKLnOCAa8V7t09Y7OoqsVHVY1fbQ5AgizQ9NscFnv14rS/qrpW yPQsgSPXQMLTzvvRDYDgOYP1Eggn/OteyA/zU3YN9sekCfFqUnZgFGWMM5X4CGWfhoMl Ix/knOLafCXO76XOGti4ioLL5ZFM3cuh4Q+AIkrWEFU/Puil37I8dOl1GxqEPFuwyEfI tCNA== 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=PK+j54/R03k9wq48VyNtT/gU/3tF/wy2U7nSt7Dij50=; b=Kh1IyQI7wHMwDd1WvvzRxwCH7sMsYWW5fFbypFp/FR/Vjytoq7TAGHPcjS9Kct99ij 3DgO/Keesku8S9PwQ12CZY5L9rT3UfQtMZ84e+a9sG4yFbQVYFJ9ftfLt1wQiSdWYgy0 /ZKY+ZrLSRWosG8PFjK8zGl5qMOk2Q678BtMvMakK+lFUmR6DMaKnM+sWfRPhVM1/pfS XifesMUfjPrPrTyx9QwwD/Xej/YQF6wd1/rmWqco8xK/v00akazMSSOAihTJtKLsJmcK Na8jxV7FhFYvefV67Vex58l8+xXYioQWSK2YFcP5jW2V8Bs/K8ejjCTlE7hDtfG/YKL7 d68Q== X-Gm-Message-State: AOAM532W+5y3qGgEAJducdE2VugIdl+j9BLbnro7S30pwbreuKfKI13x Da2UODGstxtiFFQsXR7Xkb0hUDa9eKPicTD8r+0= X-Google-Smtp-Source: ABdhPJxZu9Qx+BsuA7ykvJp4VdLcZbBNlQa4v2cCCqqvV1BJY44T17fEnslqG1UtXu1qxD0aC6MPEw== X-Received: by 2002:a05:622a:8:b0:2dc:915a:9d20 with SMTP id x8-20020a05622a000800b002dc915a9d20mr10897038qtw.74.1645880646861; Sat, 26 Feb 2022 05:04:06 -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 t128-20020a37aa86000000b0060ddf2dc3ecsm2532874qke.104.2022.02.26.05.04.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:06 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:49 -0500 Message-Id: <20220226130254.1301333-18-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 99a250154f..ba555e6830 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 3ba1438014..9ed57e6154 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. - ;; TODO: Refactor enough to share this directly. - ;; Thunked to avoid evaliating 'chez-scheme' too early. - #~(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. @@ -414,6 +398,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) @@ -422,7 +407,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 Sat Feb 26 13:02: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: 37471 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 5CDB727BBE9; Sat, 26 Feb 2022 13:06:01 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AFD5E27BBEA for ; Sat, 26 Feb 2022 13:06:00 +0000 (GMT) Received: from localhost ([::1]:53804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwlr-0000wF-Qn for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:05:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwkz-0000Kb-Ab for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwkz-0003ZC-0d for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwky-0005cb-QD; Sat, 26 Feb 2022 08:05:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 18/22] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068421512 (code B ref 53878); Sat, 26 Feb 2022 13:05:04 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:44 +0000 Received: from localhost ([127.0.0.1]:54501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkd-0005an-J2 for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:44 -0500 Received: from mail-qt1-f170.google.com ([209.85.160.170]:34567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkC-0005ZB-K5 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:17 -0500 Received: by mail-qt1-f170.google.com with SMTP id c4so4997738qtx.1 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:16 -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=oYUHSTg3r8HpZEFMQJCIvUqDi5n3JqyJ7y5RwAPsPqI=; b=a+k2tMM+p6Kdjkypy+MjPaNsSPO4+forCTEaKD4kBDg8t1g9gmHgTd6h7+jjBrzrYP LFlzj2rc4W4d91doPu58V+2iu9FsFUZPWsTvRtsjBDAAzGmJm3b2MAhJ65vCBsn2NLoF Utpqd0ac6pzeJvwqZlMdL2Udlw7AzvPmfs6966KtVTtuOIqn53CMXh2PTQeVKeJK5rlR rzJP5AYdYKEC1jfgjxUxVPwxKy+BQW+vwmfNZGvy9f0EvXiKBWon7NCzbTQojQS6Xylp 8rsFl5bxj06c3nMtLho/2GiEpBmvKawnBEhOnJCQyNnttX7gy9rCUf1tgqjNQqkVEYbu WWFQ== 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=oYUHSTg3r8HpZEFMQJCIvUqDi5n3JqyJ7y5RwAPsPqI=; b=01JqLQMqs0kj9FV/wsvc8mPoRTO2AT5N5tALbR1Z7JZ87p1pEY1HRsM7lZL6p0fJc+ KJZiGuZAUGLoPI2n4IQt7b92uj7OJ+c/L4IQEH4aaOEitlrCwopRYbMnojUEraB06Pmj aL4v6W15tNzWF7eJxq53mXP7qIrEdO3s49fY3AWilgvNX18HXKwmtaJIqg4RxwlGIPhS tTIly0SB8gqoK1/0xJ5wfTmMk8SSgmV2O9vGvPwd5wGLt9zCYRR/EI/+CYFXuymzGsKK SPnjBDGcgOOi/gfFWEKKdpLx1SkTj6bZVMvNtI6xZ+zBZVXAFSrGH1J3tSWRiH5zlzTF Qyqw== X-Gm-Message-State: AOAM533n88pAIXPYakp/pT4+O+ne4IX7WuYM9U2wfevXUVIqPjKlzFHS nID7MziXnK2bDHlM6KW44iXpqbpucXQUWnviNLw= X-Google-Smtp-Source: ABdhPJytAHTFUiQO3jS/1dop+C6B5Kgoh9FNtWH5fuaEmZcVyHzvzPLOqPcTLa+UtKs0OazhvMvr5w== X-Received: by 2002:a05:622a:24c:b0:2d7:1d1b:c98d with SMTP id c12-20020a05622a024c00b002d71d1bc98dmr10421932qtx.592.1645880650986; Sat, 26 Feb 2022 05:04:10 -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-20020a05622a048c00b002de8f67b60dsm3415826qtx.58.2022.02.26.05.04.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:10 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:50 -0500 Message-Id: <20220226130254.1301333-19-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 ba555e6830..4818e59837 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 Sat Feb 26 13:02:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37475 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 2914C27BBEA; Sat, 26 Feb 2022 13:06:32 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E59D427BBE9 for ; Sat, 26 Feb 2022 13:06:31 +0000 (GMT) Received: from localhost ([::1]:55286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmN-0001za-3W for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwkz-0000MK-Td for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwkz-0003ZK-Jf for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwkz-0005cm-Do; Sat, 26 Feb 2022 08:05:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 19/22] gnu: chez-mit: Support chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068421520 (code B ref 53878); Sat, 26 Feb 2022 13:05:05 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:44 +0000 Received: from localhost ([127.0.0.1]:54503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwke-0005av-3h for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:44 -0500 Received: from mail-qk1-f171.google.com ([209.85.222.171]:40457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkG-0005ZO-Mx for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:21 -0500 Received: by mail-qk1-f171.google.com with SMTP id c7so6795166qka.7 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:20 -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=BgU2hyGGjB/CJxFAU4QxdKNvS+uNqyA0HU4oahBzgCU=; b=VZrHHMDB6ugT5OIcCx+9CUza/QBEXf2cH9JAbw01jF7fBlcKOs6ebEYhIrPa5Rb7s/ YNsdXM/R507HH/kquBEj8mddC+LN3joHYLwj7/8T3HVK/uP846g2Y8SahgqjBkumV5kW OeB0kH3g/Mf79uXeLmg8xcvvoYYKkgqL4Enkq4nVbEvsWp0iVSmD/fhhx2iS/h96zW4k PsbsZ/gCUyfj3zyi6crlynitGNsZZxxO67ezmWMviFi8bb5GA8hA1kaJjBwfFo8UUYdK qiTdHeukeic0nQpP0HHNPK84S41GcT1gO49a9A7uIIyFIZ5xV3OL3YHlHXcGwmQjsHHt sHbg== 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=BgU2hyGGjB/CJxFAU4QxdKNvS+uNqyA0HU4oahBzgCU=; b=xtd48dFxdEDZ72reUcxHUUhuBpdqeAlU5G5t21hPNkGNGVT6RVlXDpU7yFNuaeR2RY FnR/Zsc+hqfrBpwuP9kED1lT7WWZKtmVxysnHbt5TT4Pxuc2j8t5+e2esazVfvDf9mJV BSDJx0hAN4RJuOuAT5zLjIUnCvb5CnU1cH1Rfeu3oi1P6MQy7cJjtYMQzx3PZCFJA1yL PnHhfBLnQ511dhBmCW7uxZ4ypEgdUknYUkMLJ2/i4z+G/uj7EXFcA6OBvjRUn4Q1i2+3 KeF4loXZFiHicU0w2vck1OVKWTWgx/f691AUm0BQEZrvuxrJtcp2LZf33hEXBhmcXfTn mfJQ== X-Gm-Message-State: AOAM531LL3JJzl7Tld9QqZ6diXYQFaaizDFSXcyqwKwIKDVGwr4LRcIH q/wpb0frcpMM+ZcMULh2vmBBlkExKCGnvLlCa6I= X-Google-Smtp-Source: ABdhPJwY77J1H2bXyuE7FCEGzabuSTczna7F829uuRi06Z8EyGMwGtdp5FU+RRpCw0xLiNt2a6bdQw== X-Received: by 2002:a37:e312:0:b0:5e9:57ac:76f5 with SMTP id y18-20020a37e312000000b005e957ac76f5mr7095965qki.204.1645880655223; Sat, 26 Feb 2022 05:04: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 x12-20020ac85f0c000000b002de8931d4d6sm3328260qta.77.2022.02.26.05.04.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:14 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:51 -0500 Message-Id: <20220226130254.1301333-20-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 4818e59837..f258732baf 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 Sat Feb 26 13:02:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37483 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 122F427BBEA; Sat, 26 Feb 2022 13:08:05 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 655A227BBE9 for ; Sat, 26 Feb 2022 13:08:04 +0000 (GMT) Received: from localhost ([::1]:57416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwnr-0003T1-K5 for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:08:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwl0-0000Nk-Cf for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwl0-0003ZS-2y for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwkz-0005cu-Sl; Sat, 26 Feb 2022 08:05:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 20/22] gnu: Add chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068521527 (code B ref 53878); Sat, 26 Feb 2022 13:05:05 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:45 +0000 Received: from localhost ([127.0.0.1]:54505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwke-0005b3-EP for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:44 -0500 Received: from mail-qv1-f43.google.com ([209.85.219.43]:39761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkK-0005ZZ-Q9 for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:25 -0500 Received: by mail-qv1-f43.google.com with SMTP id a1so8844556qvl.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:24 -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=2Q1OWzRy3rV8t62kCwyjvj9dpd5izLsNY6H8+3NMcuU=; b=GOcqZASsRSiKGBVbAwtSv6TMJ4XBP/w2ICVrcx7oGtIqo5ejqyNPK58ozph8wgD/L3 HlO8TUFCKBtr3+eXtqFjdB32/BzrBd7kEUhuBZgowkbtOf/e0oZM/4Q7v2dvfpc/T/Nt M4h1Q0t4s3i/ulgmuxGi6gD1sjPdEL/ZGJIvT7xTecV2jPBjzUAzKwTkrsspXLemja3c 3QO9FaM177YnJZT/W3txeySFBgcEpo7RE8zxjyYPgzfvkXzgJfSRtMfKDzEYT+4jNfxk KUXQO/7DgtxrQjqDSpV9HJSigU0nLM8dcOK47nmbp8V0LBzweUMn1dW2XurngjvdFJgx En6g== 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=2Q1OWzRy3rV8t62kCwyjvj9dpd5izLsNY6H8+3NMcuU=; b=G1e1Lhj+TkhntqnKllwFH5/yNVEgSoihZMJpD7k/EDT5bJXL/tjjd4IcFHkXR7EQHq GtaiPP1ro0Pb+P9vcnsum7nR3auuXZWlsfhtkhlawjPTa8gxSavhmMeah7PXDGYyoOwb Gdq9wyOwRoN8G9ViMp3YVnDUCirUpH1beWb82GT1HAFwCzVn3VCeCLH6EJ4y4Ayy9Uq3 VIeldvZv+1YDA7q+WeBvzuMtyCZhVkX48tFZUMlPuSdOWykatzynDkgNFX0lrBY6TkXP tkIKgQ0K0fBWGJaJxedgbEsVZEDvMAmO6eMdfZPD6hH7KaG3pUQHZqBWtF4T4xSe/AER I6Mg== X-Gm-Message-State: AOAM531NtKAKP+E2B9O+OMk9NWQcChqIAsAZOdTONy9SyD6F1SBWnpS6 l/woGVnoXnmMg6WHYnVeNFdHZprc5gin9n7QM2w= X-Google-Smtp-Source: ABdhPJzwLzKtznRbruQAL8h0m5ckm1SWhQW0S/8enAP5Ojn13n+x/DbRJpLM/nwpCIhXkhCOduEtNQ== X-Received: by 2002:a0c:e0c4:0:b0:432:ad8a:a38f with SMTP id x4-20020a0ce0c4000000b00432ad8aa38fmr7971823qvk.65.1645880659265; Sat, 26 Feb 2022 05:04: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 c11-20020a05622a024b00b002ddb43850fdsm3266931qtx.15.2022.02.26.05.04.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:19 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:52 -0500 Message-Id: <20220226130254.1301333-21-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 f258732baf..a6b5952819 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 9ed57e6154..3f73d6bc83 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 Sat Feb 26 13:02:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37477 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 3B05D27BBEA; Sat, 26 Feb 2022 13:06:43 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9C85D27BBE9 for ; Sat, 26 Feb 2022 13:06:42 +0000 (GMT) Received: from localhost ([::1]:55702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmX-0002Ga-8h for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwl0-0000PW-ST for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60626) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwl0-0003ZY-IW for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwl0-0005d2-Cq; Sat, 26 Feb 2022 08:05:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 21/22] gnu: chez: Add 'chez-scheme-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588068821540 (code B ref 53878); Sat, 26 Feb 2022 13:05:06 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:48 +0000 Received: from localhost ([127.0.0.1]:54507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwke-0005bA-VJ for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:48 -0500 Received: from mail-qv1-f46.google.com ([209.85.219.46]:39767) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkO-0005Zl-RM for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:29 -0500 Received: by mail-qv1-f46.google.com with SMTP id a1so8844619qvl.6 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:28 -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=/83ED+dFe8Q625+tAL6Gg/EtduG34MLZfJ5u1q+LKK8=; b=YnWg4NZhyhVr4b1bzcwjoyApq+DMj05oMGCgbaU7SoHSvuFscetPTxUFCmAAlHJBF4 o8/NoaSqWmS6t4lIFcD60YVEE2zgK693ujoYppPWYE8R2Szvdu3fTugFSlBY+7XjMc1u NXe+/K5t6B2B88gtz+KyZvuGdp4rNIwZGKf9/X5/7p09H3nnscDVKB9B9Rx6IXNLvdq0 vK1v9smm61d57lTq6vPLnO92//a7E1QoVdDS0ynr06i7CO5zMeOo4Lh1waTu6OtCnaNx gNYrs2wB2wJlcnmG+Td4tQIccbQUuhALseQZAgu99qIVj4+wZ5NfzUnW83Fg/m+mi6Cw o8Qw== 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=/83ED+dFe8Q625+tAL6Gg/EtduG34MLZfJ5u1q+LKK8=; b=q+JM4BsEjj1/LmcIiILuP8ES+1LUl+8DbEygPemYiDwDnKdVvJvkiJHPNji8yguwgw yybf618zxobJ1FcHXr+bam8YUGdNYeoQU+OMZXdAvn39IQr4ayCck+dw3docTa5c2M8g Ov9mXrspk3N5697ev3i8VrO7NzQpUPxJup4WGpHwYohPfFGHrGkoDkNXAvZxb0K9OkKm KHK6+1T71qHgy/KsCgjECfm8tkMF1HUoTvB0YHGMvgloNav1wUtbMQBtdJHjLt6jv4Sr CQ+9wkL1rVUQUHH4erOuYH1XGkGTc8z7hBf3wleEnY9mrvxNTz8AeHXpt2OxVy+dVyEA 44Dw== X-Gm-Message-State: AOAM531QKVhpsWQmNKNH64vrmbQV+myHGsoRWdxZ0ItgKc8K/dh4pIDp COyzVFHghrZg/1Fyd6soFlhc8GTGZocGFug5CVI= X-Google-Smtp-Source: ABdhPJymvH5qLpCDiqT2J6NExqixQ6XP209YHYN1LxYyUwlfk1m7V2eJstjs18TVt98lQ4gDTbDU7g== X-Received: by 2002:a0c:ec8a:0:b0:432:a04f:d225 with SMTP id u10-20020a0cec8a000000b00432a04fd225mr8276962qvo.83.1645880663447; Sat, 26 Feb 2022 05:04:23 -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 y16-20020a05622a121000b002deaa0af9e2sm3322929qtx.49.2022.02.26.05.04.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:23 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:53 -0500 Message-Id: <20220226130254.1301333-22-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 a6b5952819..c7505a14bd 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 Sat Feb 26 13:02:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37473 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 40D2527BBEB; Sat, 26 Feb 2022 13:06: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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D19BC27BBEA for ; Sat, 26 Feb 2022 13:06:21 +0000 (GMT) Received: from localhost ([::1]:54464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nNwmB-0001QB-Ow for patchwork@mira.cbaines.net; Sat, 26 Feb 2022 08:06:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nNwl1-0000Qb-PN for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60628) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nNwl1-0003Zt-42 for guix-patches@gnu.org; Sat, 26 Feb 2022 08:05:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nNwl0-0005dB-TZ; Sat, 26 Feb 2022 08:05:06 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v5 22/22] gnu: racket-vm-cs: Build with "--enable-scheme". Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Sat, 26 Feb 2022 13:05: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: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxime Devos , Attila Lendvai , Malte Gerdes , raingloom , philip@philipmcgrath.com X-Debbugs-Original-Xcc: philip@philipmcgrath.com Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164588069821559 (code B ref 53878); Sat, 26 Feb 2022 13:05:06 +0000 Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 13:04:58 +0000 Received: from localhost ([127.0.0.1]:54509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwki-0005bN-TE for submit@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:57 -0500 Received: from mail-qk1-f178.google.com ([209.85.222.178]:44007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nNwkT-0005Zw-1R for 53878@debbugs.gnu.org; Sat, 26 Feb 2022 08:04:33 -0500 Received: by mail-qk1-f178.google.com with SMTP id z66so6783471qke.10 for <53878@debbugs.gnu.org>; Sat, 26 Feb 2022 05:04:33 -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=N+2gyL8pmfuxcTmxtpruPrY5oDy7Z0DNw/HklWOdTFY=; b=AFJwB+ADT8obLcGXQGuFTFynU/duYU1bSKc8KBIpnLy+05guD91GwyC0rmmp2i1ab3 EzBgaddkPYersJmCcu/Els0wMkanVKLvqUVBZq/w1qINuNHT7nWjI6x1M7sv2uN2VZH7 7Kb4D3KQT9ZVmEuqlaUZTeVirIjaZK9ojn3Bfk/xpREbyxPnehK3VZTJZfxH5+GHNmJK wZYmxs9k+/CW/v/B+9EvGkM4pqrqhCJBSEDldWFNnibZHpvzw9naUm8mnwjm+wfZhi2A X7Kwc7zgcp8ESmOLzBb1F/9JHB1Cp4/YLMThWvt5TNNR4hDDlFLgOve4Vs0c+3U3MPvd 7F7w== 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=N+2gyL8pmfuxcTmxtpruPrY5oDy7Z0DNw/HklWOdTFY=; b=2VLxDFP++9DFdYZkEnxA+aMxzaOslnmRx2jS8U7+ZgSe4llARbaQ0w/G5a0UDrabhx x/F5MK4GElVv6bsY9flPSEneoUIkPd9nWu/RMCfhV+iaEZ6rIbA4HCl5SMM/1X5/sHwN y3+qiWCB2YecWarkcdSVx+Pe11Cgw5U3GQxWkdkgLP9EboJJcqIRIWFdaeSl1860KpzY JSUkU9ml/QS3dajlt22kjl4h71hwOaGdyonjr+aZdrIib2PKSypDWkWjGV7DqZKcC8Ll /tGW4YCCoRczj/XL4r8lZG8oIartUuCLx3XQsyo5119fHrbRTba8a/5ychVbKut8nJ4X RWJQ== X-Gm-Message-State: AOAM532mY3II/Z4lQV5MnTbF2q/rVlMMcX4UHP/3gJyd+5BSzyz6RCWg qu2JECEEtiJCwZ0hSqmvbtlFdeQWxpE86sGlfaA= X-Google-Smtp-Source: ABdhPJzBtrLghowVJLDw6gNxI3AMaP+4iK2uLvJJyqfY3T1+2yjGRF9WMIwYHxyvPAuGdnm0AXEESw== X-Received: by 2002:ae9:edc6:0:b0:60c:8807:712f with SMTP id c189-20020ae9edc6000000b0060c8807712fmr7373062qkg.14.1645880667582; Sat, 26 Feb 2022 05:04:27 -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 s10-20020a05620a080a00b0062ce6f3f5d7sm2487655qks.16.2022.02.26.05.04.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 26 Feb 2022 05:04:27 -0800 (PST) From: Philip McGrath Date: Sat, 26 Feb 2022 08:02:54 -0500 Message-Id: <20220226130254.1301333-23-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220226130254.1301333-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220226130254.1301333-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 3f73d6bc83..f70b027160 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -396,7 +396,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 @@ -406,18 +406,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