From patchwork Sun Feb 27 21:28:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37530 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 5482427BBED; Sun, 27 Feb 2022 21:31:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 C36B227BBEC for ; Sun, 27 Feb 2022 21:31:15 +0000 (GMT) Received: from localhost ([::1]:57424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8M-0007WV-Sm for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8B-0007VL-E2 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37213) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8B-0005Ii-3p for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8B-0008Dw-0U for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 01/24] gnu: Use license prefix in (gnu packages racket). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599741431434 (code B ref 53878); Sun, 27 Feb 2022 21:31:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:14 +0000 Received: from localhost ([127.0.0.1]:59319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7O-0008Av-1A for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:14 -0500 Received: from mail-vs1-f42.google.com ([209.85.217.42]:41642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7I-00089Q-Qq for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:10 -0500 Received: by mail-vs1-f42.google.com with SMTP id y26so11060427vsq.8 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=im2eB4m2cw9htGdEwc+CW/YqzVpAKz+5GUbS5TUWUbs=; b=G5FfUzU2/NyreN9q3FycSgczDtf9aLyhYTXxVXZqrV/F953MKaDF7pQDM0IYFK7mrf RaRnAkYFuCpB+g1AktKPXl2lGAYUHgtzR/sjGBonii/es2Wr/gX8EhlR7v/fuPo4GGjW E2TO/jVWoAFCcPIp3bBZdM4rj/OsC5n/l46R3U+sX1rnYEnWsTG5SJQAswx5zDHec7oz h76jm+oKeKe5/ll2Sv8DLWEuCIyRG5XmCpwUQbjmn+E2o/7sBIYNosQBSh2k6l5uVIlq bXEX9l8MEbPZCW7F/pbRuMx26u57oyXPhz1eQOu5W0bEl+Z8A+cfOdcuoMvEIba17ivi JkIQ== 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=WKKSUQa2L22SmisMBO2hgIv4+reTwptX2bDETjV/KtzesI6OvYlK+R8U/msyaosaul k6ihtgguUhWmNHqb4MAoZdlbr30dqIGNvQbOd4mVdD9BHjduxwsuRxUAWTYN+c/e8DZ9 6eLkDfDRPkN7LGOMxsMB6ae/2L1qQV/rJop/9KqCWq8HpwiVZeqXlKe8dCNqH7GxgTlY kV29ojOyf5isv26ws1jmCttGY9z4NqhXfRsyXpfPcpTtEE9pUxW+rJyhJrmj+PoXDSLF NnV2lx0FqX1dJtIg/VnH6GUKvyECKUOVWmoHWNjuRqbEHiyS5HbU2VT6yNcDAC0ZfSeb ffrw== X-Gm-Message-State: AOAM5332n+6HTqz8chR4Kb86HTobotSkjxKwloT7bYvgeLjeoGvrXQah EJv6AEXGIgjjuE9DNRIwppg+H/pJuqq9CN2pcbE= X-Google-Smtp-Source: ABdhPJyRBo2gNvMsu89h8byfldCpi02kvnU4dmjyMTMR6BMBtvoKki366H8LNP7vSCnzU19JHNrppg== X-Received: by 2002:a67:f545:0:b0:31c:1bc2:9d5d with SMTP id z5-20020a67f545000000b0031c1bc29d5dmr5566935vsn.79.1645997403194; Sun, 27 Feb 2022 13:30:03 -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 q65-20020a1fa744000000b0032db512ac39sm1348926vke.46.2022.02.27.13.30.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:02 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:28:57 -0500 Message-Id: <20220227212920.2009000-2-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/racket.scm (racket-minimal, racket-minimal-bc-3m, racket-bootstrap-chez-bootfiles): Use license prefix. --- gnu/packages/racket.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index d0a5ca494b..ec9e836a4c 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -21,8 +21,6 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages racket) - #:use-module ((guix licenses) - #:select (asl2.0 expat lgpl3+)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -47,7 +45,8 @@ (define-module (gnu packages racket) #:use-module (gnu packages multiprecision) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages xorg) + #:use-module ((guix licenses) #:prefix license:)) ;; Commentary: ;; @@ -254,7 +253,7 @@ (define (write-racket-hash alist) DrRacket IDE, are not included.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list asl2.0 expat)))) + (license (list license:asl2.0 license:expat)))) (define-public racket-minimal-bc-3m @@ -295,7 +294,7 @@ (define-public racket-minimal-bc-3m collector, 3M (``Moving Memory Manager'').") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list lgpl3+ asl2.0 expat))))) + (license (list license:lgpl3+ license:asl2.0 license:expat))))) (define-public racket-minimal-bc-cgc @@ -372,7 +371,7 @@ (define-public racket-bootstrap-chez-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream Chez Scheme.") - (license (list asl2.0))))) + (license (list license:asl2.0))))) (define %installer-mirrors From patchwork Sun Feb 27 21:28:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37532 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 9572C27BBEA; Sun, 27 Feb 2022 21:31: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 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 DFA1327BBE9 for ; Sun, 27 Feb 2022 21:31:17 +0000 (GMT) Received: from localhost ([::1]:57454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8O-0007YM-UR for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8B-0007Vf-PQ for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8B-0005JA-Gl for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8B-0008E4-Dc for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 02/24] gnu: racket: Update to 8.4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599743131492 (code B ref 53878); Sun, 27 Feb 2022 21:31:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:31 +0000 Received: from localhost ([127.0.0.1]:59323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7X-0008BX-FO for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:31 -0500 Received: from mail-ua1-f50.google.com ([209.85.222.50]:39737) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7N-0008A7-MN for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:17 -0500 Received: by mail-ua1-f50.google.com with SMTP id 102so5119170uag.6 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:13 -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=hdj2quz1oshdRkEO7pEEjftaX9ASnbXw6ZBtTdv7rIq4rGh/eECieu/1hETWMtbxU7 nHbe6KvYycsJpXZh2BwuQwQsYlxlhC6EQtuf72ffKz62GpVlhP7PCKPJ6rd0XYulTRwU piI7jkAQF8ekeF0tt4Zehz+9GkcwjACAWf1Tvgomj+7y1lYg6eFTS6/UWqY/hOO7UQa7 iX54aVnZ4kvHljVN2yous7I/sHe3jFLfb805lb8RWL2mtl0DXdScRfDcJXszerqY4Sw0 QAGklNJO+RiZBcucE/GtR4Z+fdV8c9o7y2ZRU7DLR39VBZy7OmQ2ojXasieOV2g1Y5zQ IyUQ== 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=WF1CeWuuebJcc9+Sb62XYfyHTZDtBaw5iuHwf7HrC37Mqjor4OpjAsYCBFOnRImOtq PtD0PN5gW7cBcK5rryNS4pYtPUp01c1Nrd9CR0DwT7Iil4shePDEZJwOeiSaIp+PBqip CreT4JM+JQbWFb9D8wcF0fGZAAcg0h+vXu4q2KnsG8JCzDCvV/sattRwCTYDY+7n0u3u FcrbeCfLNkVd3ka6a/3KNTgl846Fm50UYyRcUFoS3ynMbq+UcVoqtYUriYC3iGxf9zgt HkBAUuQQGxlCfOt4BB8BXac1A2ScYjk89mHdLYBUdzjhcvgtYWxtBqytOtkr9JBObdif 5lqw== X-Gm-Message-State: AOAM531V/Bpfe/MgOK9JR27XMc3TiL9dA9RqFSp9f6q0+NefxDVA1B6S iSlNmzaddQtolyU++SiDS5/LqJRMxL47T9SyWMM= X-Google-Smtp-Source: ABdhPJylB0j0YULSHJ0xT8Rw1SdTaHICWcsmie+WZPZWD+Mgjld80UJFIyTMfRIVDepGcUTg1Uqq3g== X-Received: by 2002:ab0:60b1:0:b0:341:543e:c388 with SMTP id f17-20020ab060b1000000b00341543ec388mr6682142uam.80.1645997407725; Sun, 27 Feb 2022 13:30:07 -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 d13-20020a056102222d00b0031b437600fasm1084650vsb.14.2022.02.27.13.30.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:07 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:28:58 -0500 Message-Id: <20220227212920.2009000-3-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/racket-enable-scheme-backport.patch, gnu/packages/patches/racket-gui-tethered-launcher-backport.patch: New patches. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/racket.scm (%racket-version): New variable. (%racket-commit): New variable. (%racket-origin): New variable. [patches]: Add "racket-enable-scheme-backport.patch". (racket-minimal): Update to 8.4. [version]: Use '%racket-version'. [source]: Use '%racket-origin'. [inputs]: Add 'ncurses'. Remove 'zlib:static' and 'lz4:static'. (racket-minimal-bc-3m)[inputs]: Adjust accordingly. (racket-bootstrap-chez-bootfiles)[version]: Use Chez Scheme's '(scheme-fork-version-number)'. (racket)[version]: Use '%racket-version'. [native-inputs]: Use '%racket-origin'. [source]: Update to 8.4. : Use "racket-gui-tethered-launcher-backport.patch". : Remove "srfi-doc-nonfree". --- gnu/local.mk | 4 +- .../racket-enable-scheme-backport.patch | 465 ++++++++++++++++++ ...acket-gui-tethered-launcher-backport.patch | 26 + gnu/packages/racket.scm | 99 ++-- 4 files changed, 557 insertions(+), 37 deletions(-) create mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch create mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch diff --git a/gnu/local.mk b/gnu/local.mk index 98f2d4ac30..cf34905431 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -41,7 +41,7 @@ # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling # Copyright © 2021 Greg Hogan -# Copyright © 2021 Philip McGrath +# Copyright © 2021, 2022 Philip McGrath # Copyright © 2021 Arun Isaac # Copyright © 2021 Sharlatan Hellseher # Copyright © 2021 Dmitry Polyakov @@ -1749,6 +1749,8 @@ dist_patch_DATA = \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ %D%/packages/patches/rtags-separate-rct.patch \ + %D%/packages/patches/racket-enable-scheme-backport.patch \ + %D%/packages/patches/racket-gui-tethered-launcher-backport.patch \ %D%/packages/patches/racket-minimal-sh-via-rktio.patch \ %D%/packages/patches/remake-impure-dirs.patch \ %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \ diff --git a/gnu/packages/patches/racket-enable-scheme-backport.patch b/gnu/packages/patches/racket-enable-scheme-backport.patch new file mode 100644 index 0000000000..3a5a4a3d82 --- /dev/null +++ b/gnu/packages/patches/racket-enable-scheme-backport.patch @@ -0,0 +1,465 @@ +From 8d7687842f099e3e7e60d3a83fed58b2c6a92863 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 10:36:09 -0700 +Subject: [PATCH 1/2] Chez Scheme: adapt bootfile build for supplied `Scheme=` + +(cherry picked from commit fca1e02349664060e10278ca2ce6577a949bebf5) + +(Fixed conflicts by dropping pbchunks and pbarch changes.) +--- + racket/src/ChezScheme/configure | 15 ++++++++++++++- + racket/src/ChezScheme/s/Mf-base | 4 ++-- + racket/src/ChezScheme/s/Mf-cross | 4 +++- + 3 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/racket/src/ChezScheme/configure b/racket/src/ChezScheme/configure +index 4515ffc105..0098829091 100755 +--- a/racket/src/ChezScheme/configure ++++ b/racket/src/ChezScheme/configure +@@ -45,6 +45,7 @@ threads=yes + nothreads=no + temproot="" + help=no ++forceworkarea=no + gzipmanpages=yes + installowner="" + installgroup="" +@@ -205,6 +206,9 @@ while [ $# != 0 ] ; do + --pb) + pb=yes + ;; ++ --force) ++ forceworkarea=yes ++ ;; + --installprefix=*) + installprefix=`echo $1 | sed -e 's/^--installprefix=//'` + ;; +@@ -439,6 +443,7 @@ if [ "$help" = "yes" ]; then + echo " --toolprefix= prefix tool (compiler, linker, ...) names" + echo " --[no]gzip-man-pages compress manual pages ($gzipmanpages)" + echo " --workarea= build directory ($w)" ++ echo " --force configure even without boot files" + echo " CC= C compiler" + echo " CPPFLAGS= C preprocessor flags" + echo " CFLAGS= C compiler flags" +@@ -721,8 +726,16 @@ case "${flagsmuni}" in + ;; + esac + ++if [ "$w" = "$m" ] ; then ++ configuringin="" ++else ++ configuringin=" in $w" ++fi ++ + if [ -f boot/$m/scheme.boot -o -f "$srcdir"/boot/$m/scheme.boot ] ; then +- echo "Configuring for $m" ++ echo "Configuring for $m$configuringin" ++elif [ "$forceworkarea" = yes ] ; then ++ echo "Configuring for $m$configuringin despite missing boot files" + else + if [ "$m" = "" ] ; then + maybem="" +diff --git a/racket/src/ChezScheme/s/Mf-base b/racket/src/ChezScheme/s/Mf-base +index cc6178c973..1f4a967998 100644 +--- a/racket/src/ChezScheme/s/Mf-base ++++ b/racket/src/ChezScheme/s/Mf-base +@@ -94,7 +94,7 @@ endif + # that Scheme and SCHEMEHEAPDIRS are set by Mf-cross to point to the host Scheme + # implementation + Scheme = ../bin/$m/scheme${ExeSuffix} +-export SCHEMEHEAPDIRS=../boot/%m ++export SCHEMEHEAPDIRS=../boot/$m + export CHEZSCHEMELIBDIRS=. + + # Define the libdirs separator character +@@ -691,4 +691,4 @@ reset-one: + + .PHONY: run + run: +- env SCHEMEHEAPDIRS=../boot/$m/ ../bin/$m/scheme $(ARGS) ++ env SCHEMEHEAPDIRS=${SCHEMEHEAPDIRS} ${Scheme} $(ARGS) +diff --git a/racket/src/ChezScheme/s/Mf-cross b/racket/src/ChezScheme/s/Mf-cross +index d796cbb459..397af59a28 100644 +--- a/racket/src/ChezScheme/s/Mf-cross ++++ b/racket/src/ChezScheme/s/Mf-cross +@@ -43,5 +43,7 @@ x$(xm).$(m): + $(MAKE) -f Mf-cross m=$(m) xm=$(xm) i=f o=3 d=0 xpatch + mv xpatch x$(xm).$(m) + ++ifneq ($(SCHEMEHEAPDIRS),:) + # Ensure that cross-compiling "nanopass.so" is rebuilt if the host compiler changed +-nanopass.so: ${SCHEME} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++nanopass.so: ${Scheme} ${SCHEMEHEAPDIRS}/petite.boot ${SCHEMEHEAPDIRS}/scheme.boot ++endif +-- +2.32.0 + + +From 26c8e2c1d9b02ad85acef8bda40d92154cf0b699 Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Sun, 6 Feb 2022 11:03:30 -0700 +Subject: [PATCH 2/2] configure: make `--enable-scheme` work with an executable + +When the same Chez Scheme version as used by Racket is already +available, then `--enable-scheme=...` can supply an executable. For +cross builds, `--enable-scheme=...` can still supply a build +directory, instead, as before. + +(cherry picked from commit 4f0e76855ce7e86107de495292a553469daf0b3f) +--- + racket/src/ChezScheme/makefiles/Makefile.in | 3 ++ + racket/src/README.txt | 30 +++++++++++--- + racket/src/configure | 8 +++- + racket/src/cs/README.txt | 6 ++- + racket/src/cs/c/Makefile.in | 44 ++++++++++++++++----- + racket/src/cs/c/configure | 24 +++++++++-- + racket/src/cs/c/configure.ac | 21 ++++++++-- + 7 files changed, 112 insertions(+), 24 deletions(-) + +diff --git a/racket/src/ChezScheme/makefiles/Makefile.in b/racket/src/ChezScheme/makefiles/Makefile.in +index c396efc851..3998ef9ccd 100644 +--- a/racket/src/ChezScheme/makefiles/Makefile.in ++++ b/racket/src/ChezScheme/makefiles/Makefile.in +@@ -59,6 +59,9 @@ reset: + %.boot: + (cd $(workarea) && $(MAKE) $*.boot) + ++auto.boot: ++ (cd $(workarea) && $(MAKE) $(defaultm).boot) ++ + # .bootquick to build boot files for + # with o=3 d=0 for the cross compiler, and only after + # building the kernel for the configured machine +diff --git a/racket/src/README.txt b/racket/src/README.txt +index 98647aebce..d77310b4a4 100644 +--- a/racket/src/README.txt ++++ b/racket/src/README.txt +@@ -354,6 +354,10 @@ variant of MinGW without "libdelayimp.a", get the implementation of + ======================================================================== + + Cross-compilation requires at least two flags to `configure`: ++`--host=OS` and either `--enable-racket=RACKET` or (for Racket CS) ++`--enable-scheme-SCHEME`. ++ ++More information: + + * `--host=OS`, where OS is something like `i386-gnu-linux` to + indicate the target platform. +@@ -374,11 +378,27 @@ Cross-compilation requires at least two flags to `configure`: + run `configure` again (with no arguments) in a "local" subdirectory + to create a build for the current platform. + +-An additional flag is needed for building Racket CS, unless the flag +-`--enable-racket=auto` is used: +- +- * `--enable-scheme=DIR`, where DIR is a path that has a "ChezScheme" +- directory where Chez Scheme is built for the host system. ++ * `--enable-scheme=SCHEME`, where SCHEME is a Chez Scheme executable ++ executable that runs on the build platform; the executable must be ++ the same version as used in Racket built for the target platform. ++ ++ Supplying `--enable-scheme=DIR` is also supported in cross-build ++ mode, where DIR is a path that has a "ChezScheme" directory where ++ Chez Scheme is built for the host system. ++ ++The `--enable-racket=RACKET` and `--enable-scheme=SCHEME` flags are ++allowed for non-cross builds, too: ++ ++ * For Racket CS, supplying either selects a Racket or Chez Scheme ++ implementation used to create boot files to the build platform. ++ Suppling Chez Scheme is a much more direct path, but when Racket is ++ supplied, its version does not have to match the version being ++ built. ++ ++ * For Racket BC, `--enable-racket=RACKET` selects a Racket for ++ prepare C sources to cooperate with garbage collection. Its version ++ needs to be close to the one being built, and potentially exactly ++ the same version. + + Some less commonly needed `configure` flags are for Racket BC: + +diff --git a/racket/src/configure b/racket/src/configure +index c9f3ba4419..1b53ec7ce2 100755 +--- a/racket/src/configure ++++ b/racket/src/configure +@@ -9,6 +9,7 @@ pb_dir="$dir/ChezScheme/boot/pb" + use_cs=maybe + use_bc=maybe + supplied_racket=no ++supplied_scheme=no + enable_boothelp= + + # We don't have to detect conflicts like `--enable-csdefault --enable-bcdefault`, +@@ -34,6 +35,9 @@ for arg in $*; do + --enable-racket=*) + supplied_racket=yes + ;; ++ --enable-scheme=*) ++ supplied_scheme=yes ++ ;; + --help | -h) + echo $0: + echo see --help-bc or --help-cs, since the Racket CS build and the +@@ -70,8 +74,8 @@ elif test "$use_cs" = "maybe" ; then + fi + + if test "$use_cs" = "yes" ; then +- if test $use_bc = no -a $supplied_racket = no -a ! -d "$pb_dir" ; then +- echo $0: must have $pb_dir or --enable-racket=... for --enable-csonly ++ if test $use_bc = no -a $supplied_racket = no -a $supplied_scheme = no -a ! -d "$pb_dir" ; then ++ echo $0: must have $pb_dir, --enable-racket=... or --enable-scheme=... for --enable-csonly + exit 1 + fi + +diff --git a/racket/src/cs/README.txt b/racket/src/cs/README.txt +index 2ece417b78..8e6fc57b74 100644 +--- a/racket/src/cs/README.txt ++++ b/racket/src/cs/README.txt +@@ -39,6 +39,11 @@ build: + installed in the "../ChezScheme/boot/pb" directory as described by + "../ChezScheme/BUILDING". + ++ Supplying `--enable-scheme=...` is also an option if you alerady ++ have the same version of Chez Scheme built on the current platform. ++ Another build will be created, anyway, but more quickly than ++ without Chez Scheme. ++ + * Racket is needed to generate the files in the "schemified" + directory from the sources in sibling directories like "../io". The + Racket version must be practically the same as the current Racket +@@ -48,7 +53,6 @@ build: + Unlike Chez Scheme boot files, the files generated in "schemified" + are human-readable and -editable Scheme code. That provides a way + out of bootstrapping black holes, even without BC. +- + + + ======================================================================== +diff --git a/racket/src/cs/c/Makefile.in b/racket/src/cs/c/Makefile.in +index 54a644a1d9..d73993f0fc 100644 +--- a/racket/src/cs/c/Makefile.in ++++ b/racket/src/cs/c/Makefile.in +@@ -12,7 +12,9 @@ CS_HOST_WORKAREA_PREFIX = @CS_HOST_WORKAREA_PREFIX@ + SCHEME_HOST_WORKAREA = $(CS_HOST_WORKAREA_PREFIX)$(SCHEME_WORKAREA) + SCHEME_BIN = $(SCHEME_HOST_WORKAREA)/$(MACH)/bin/$(MACH)/scheme + SCHEME_INC = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH) +-SCHEME = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_built = $(SCHEME_BIN) -B $(SCHEME_INC)/petite.boot -B $(SCHEME_INC)/scheme.boot ++SCHEME_existing = @MAKE_SCHEME_SCHEME@ ++SCHEME = $(SCHEME@USE_SCHEME_MODE@) + + TARGET_MACH = @TARGET_MACH@ + SCHEME_TARGET_INC = $(SCHEME_WORKAREA)/$(TARGET_MACH)/boot/$(TARGET_MACH) +@@ -88,7 +90,7 @@ mainsrcdir = @srcdir@/../.. + @INCLUDEDEP@ @srcdir@/../../version/version.mak + + cs: +- $(MAKE) scheme@T_CROSS_MODE@ ++ $(MAKE) scheme@MAKE_SCHEME_MODE@ + $(MAKE) racket-so + cd rktio; $(MAKE) + $(MAKE) racketcs +@@ -121,9 +123,13 @@ racket-so: + + RACKET_SO_ENV = @CONFIGURE_RACKET_SO_COMPILE@ + ++TARGET_MACH_built = $(TARGET_MACH) ++TARGET_MACH_existing = xc-$(TARGET_MACH) ++XPATCH_FILE = $(SCHEME_WORKAREA)/$(TARGET_MACH@USE_SCHEME_MODE@)/s/xpatch ++ + CS_PROGS = SCHEME="$(SCHEME)" + CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@ @ENABLE_OR_DISABLE_WPO@ +-CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch" ++CS_OPTScross = $(CS_OPTS) CSO=$(MACH) CROSS_COMP="--xpatch $(XPATCH_FILE)" + PASS_COMPILE_DEPS = EXTRA_COMPILE_DEPS="$(SCHEME_INC)/petite.boot $(SCHEME_INC)/scheme.boot" + + build-racket-so: +@@ -163,6 +169,15 @@ pb-bootquick: + cd $(SCHEME_WORKAREA) && $(MAKE) reset + $(SHELL) $(srcdir)/ready_boot.sh $(MACH) $(SCHEME_WORKAREA) + ++scheme-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot ++ $(MAKE) mach-make ++ ++$(SCHEME_WORKAREA)/boot/$(MACH)/scheme.boot: ++ mkdir -p $(SCHEME_WORKAREA) ++ $(MAKE) config-scheme CONFIG_SCHEME_MODE="$(CONFIG_SCHEME_MODE) --force" ++ cd $(SCHEME_WORKAREA) && $(MAKE) $(MACH).boot Scheme="$(SCHEME)" SCHEMEHEAPDIRS=: o=3 d=0 what=all ++ + mach-make: + $(MAKE) config-scheme + cd $(SCHEME_WORKAREA) && $(MAKE) +@@ -182,24 +197,33 @@ config-scheme: + + scheme-cross: + env MAKE_BOOT_FOR_CROSS=yes SCHEME_SRC="$(SCHEME_DIR)" SCHEME_WORKAREA=$(SCHEME_WORKAREA) MACH="$(TARGET_MACH)" $(BOOTSTRAP_RACKET) "$(SCHEME_DIR)"/rktboot/make-boot.rkt ++ $(MAKE) finish-scheme-cross ++ ++finish-scheme-cross: + $(SHELL) $(srcdir)/reset_boot.sh $(TARGET_MACH) $(SCHEME_WORKAREA) + cd $(SCHEME_WORKAREA) && "$(UP_SCHEME_DIR)"/configure @SCHEME_CROSS_CONFIG_ARGS@ $(SCHEME_CONFIG_VARS) + cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/c && $(CHOST_HACK@T_CROSS_MODE@) $(MAKE) o=o cross=t +- $(MAKE) $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch ++ $(MAKE) $(XPATCH_FILE) ++ ++scheme-cross-via-scheme: ++ $(MAKE) $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot MACH=$(TARGET_MACH) ++ $(MAKE) finish-scheme-cross + + # Rebuild patch file and cross "petite.boot" and "scheme.boot" when older +-# than the build-host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files +-XPATCH_DEPS = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \ +- $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot ++# than the build- use as Racket for build; or "auto" to create +- --enable-scheme= use as host's build directory for cross ++ --enable-scheme= use as host build for cross + --enable-mach= use Chez Scheme machine type + --enable-target= cross-build for Chez Scheme machine type + --enable-portable prefer portable to host-specific +@@ -2867,7 +2870,7 @@ show_explicitly_enabled "${enable_xonx}" "Unix style" + show_explicitly_enabled "${enable_libzo}" 'Compiled ".zo" files moved to lib' + + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + show_explicitly_enabled "${enable_portable}" "portable" +@@ -4745,9 +4748,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -6012,6 +6027,9 @@ SCHEME_CROSS_CONFIG_ARGS="--machine=${TARGET_MACH} --disable-x11 ${cs_auto_flags + + + ++ ++ ++ + + + +diff --git a/racket/src/cs/c/configure.ac b/racket/src/cs/c/configure.ac +index 464ebe1760..aaee88156d 100644 +--- a/racket/src/cs/c/configure.ac ++++ b/racket/src/cs/c/configure.ac +@@ -23,7 +23,7 @@ AC_ARG_ENABLE(compressmore, [ --enable-compressmore compress compiled code ev + AC_ARG_ENABLE(compressboot, [ --enable-compressboot compress boot files]) + m4_include(../ac/path_arg.m4) + AC_ARG_ENABLE(racket, [ --enable-racket= use as Racket for build; or "auto" to create]) +-AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host's build directory for cross]) ++AC_ARG_ENABLE(scheme, [ --enable-scheme= use as host build for cross]) + AC_ARG_ENABLE(mach, [ --enable-mach= use Chez Scheme machine type ]) + AC_ARG_ENABLE(target, [ --enable-target= cross-build for Chez Scheme machine type ]) + m4_include(../ac/portable_arg.m4) +@@ -81,7 +81,7 @@ show_explicitly_disabled "${enable_compressboot}" "Compressed boot files" + show_explicitly_enabled "${enable_xonx}" "Unix style" + m4_include(../ac/path_show.m4) + show_explicitly_set "${enable_racket}" "Racket" +-show_explicitly_set "${enable_scheme}" "Chez Scheme build directory" ++show_explicitly_set "${enable_scheme}" "Chez Scheme for build" + show_explicitly_set "${enable_mach}" "machine type" + show_explicitly_set "${enable_target}" "cross-build machine type" + m4_include(../ac/portable_show.m4) +@@ -504,9 +504,21 @@ esac + + SCHEME_DIR=${srcdir}/../../ChezScheme + MAKE_BUILD_SCHEME=checkout ++USE_SCHEME_MODE="_built" ++MAKE_SCHEME_MODE="${T_CROSS_MODE}" + + if test "${enable_scheme}" != "" ; then +- CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ if test -d "${enable_scheme}" ; then ++ # Directory exists, so use it as a build directory ++ echo "Using supplied Scheme path as a build directory" ++ CS_HOST_WORKAREA_PREFIX="${enable_scheme}/" ++ else ++ # Directory does not exist, so assume it's an executable ++ echo "Using supplied Scheme path as an executable" ++ MAKE_SCHEME_MODE="${T_CROSS_MODE}-via-scheme" ++ MAKE_SCHEME_SCHEME="${enable_scheme}" ++ USE_SCHEME_MODE="_existing" ++ fi + fi + + if test "${enable_racket}" != "" ; then +@@ -821,6 +833,9 @@ AC_SUBST(DIFF_MACH) + AC_SUBST(CROSS_MODE) + AC_SUBST(T_CROSS_MODE) + AC_SUBST(TT_CROSS_MODE) ++AC_SUBST(MAKE_SCHEME_MODE) ++AC_SUBST(MAKE_SCHEME_SCHEME) ++AC_SUBST(USE_SCHEME_MODE) + AC_SUBST(SETUP_BOOT_MODE) + AC_SUBST(OSX) + AC_SUBST(NOT_OSX) +-- +2.32.0 + diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch new file mode 100644 index 0000000000..abf253486f --- /dev/null +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -0,0 +1,26 @@ +From aa792e707b1fbc5cc33691bfaee5828dc3fbebaa Mon Sep 17 00:00:00 2001 +From: Matthew Flatt +Date: Mon, 31 Jan 2022 15:31:22 -0700 +Subject: [PATCH] fix creation of tethered launchers + +Related to racket/racket#4133 + +(cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) +--- + share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt +index b1691472..9ef06c53 100644 +--- a/share/pkgs/gui-lib/mred/installer.rkt ++++ b/share/pkgs/gui-lib/mred/installer.rkt +@@ -72,4 +72,5 @@ + (list "-A" (path->string (find-system-path 'addon-dir))))) + + (define (config-flags) +- (list "-G" (path->string (find-config-dir)))) ++ (list "-X" (path->string (find-collects-dir)) ++ "-G" (path->string (find-config-dir)))) +-- +2.32.0 + diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index ec9e836a4c..00ec587eeb 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -43,6 +43,7 @@ (define-module (gnu packages racket) #:use-module (gnu packages libedit) #:use-module (gnu packages libffi) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages xorg) @@ -95,6 +96,41 @@ (define-module (gnu packages racket) ;; ;; Code: +(define %racket-version "8.4") +;; ^ Remember to update racket-bootstrap-chez-bootfiles! +(define %racket-commit + (string-append "v" %racket-version)) +(define %racket-origin + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/racket") + (commit %racket-commit))) + (sha256 + (base32 "1vpl66gdgc8rnldmn8rmb7ar9l057jqjvgpfn29k57i3c5skr8s6")) + (file-name (git-file-name "racket" %racket-version)) + (patches (search-patches "racket-minimal-sh-via-rktio.patch" + ;; Remove by Racket 8.5: + "racket-enable-scheme-backport.patch")) + (modules '((guix build utils))) + (snippet + #~(begin + (use-modules (guix build utils)) + ;; Unbundle Chez submodules. + (with-directory-excursion "racket/src/ChezScheme" + ;; TODO: consider putting this in a (guix ...) or (guix build ...) + ;; module so it can be shared with the upstream Chez Scheme origin + ;; without cyclic issues. + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib"))) + ;; Unbundle libffi. + (delete-file-recursively "racket/src/bc/foreign/libffi"))))) + (define cfg-flag:sh-for-rktio `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" (assoc-ref %build-inputs "sh") @@ -128,41 +164,17 @@ (define src (define-public racket-minimal (package (name "racket-minimal") - (version "8.3") ; note: remember to also update racket! - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/racket/racket") - (commit (string-append "v" version)))) - (sha256 - "1i1jnv1wb0kanfg47hniafx2vhwjc33qqx66lq7wkf5hbmgsyws3") - (file-name (git-file-name name version)) - (patches (search-patches "racket-minimal-sh-via-rktio.patch")) - (modules '((guix build utils))) - (snippet - (with-imported-modules '((guix build utils)) - #~(begin - ;; Unbundle Chez submodules. - (with-directory-excursion "racket/src/ChezScheme" - ;; Remove bundled libraries (copied from 'chez-scheme'). - (for-each delete-file-recursively - '("stex" - "nanopass" - "lz4" - "zlib"))) - ;; Unbundle libffi. - (delete-file-recursively "racket/src/bc/foreign/libffi")))))) + (version %racket-version) + (source %racket-origin) (inputs `(;; common to all racket-minimal variants: ("openssl" ,openssl) ("sqlite" ,sqlite) - ("sh" ,bash-minimal) + ("sh" ,bash-minimal) ;; <- for `system` + ("ncurses" ,ncurses) ;; <- for #%terminal ;; only for CS ("zlib" ,zlib) - ("zlib:static" ,zlib "static") - ("lz4" ,lz4) - ("lz4:static" ,lz4 "static"))) + ("lz4" ,lz4))) (native-inputs `(("bootfiles" ,racket-bootstrap-chez-bootfiles) ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) @@ -263,9 +275,8 @@ (define-public racket-minimal-bc-3m (name "racket-minimal-bc-3m") (inputs (modify-inputs (package-inputs racket-minimal) - (delete "zlib" "zlib:static" "lz4" "lz4:static") - (prepend libffi ;; <- only for BC variants - ))) + (prepend libffi) ;; <- only for BC variants + (delete "zlib" "lz4"))) (native-inputs `(("libtool" ,libtool) ("racket" ,(if (%current-target-system) @@ -327,6 +338,11 @@ (define-public racket-bootstrap-chez-bootfiles (package (inherit racket-minimal) (name "racket-bootstrap-chez-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. (inputs `()) (native-inputs `(("racket" ,(if (%current-target-system) @@ -416,7 +432,7 @@ (define-public racket (package (inherit racket-minimal) (name "racket") - (version (package-version racket-minimal)) ; needed for origin uri to work + (version %racket-version) (source (origin (method url-fetch) @@ -425,7 +441,11 @@ (define-public racket %installer-mirrors)) (sha256 (base32 - "0jdr0y7scvv2a3sq456ifrgq0yfsbiwavdf2m86zmrapp481mby4")) + "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) (snippet #~(begin (use-modules (guix build utils) @@ -442,7 +462,14 @@ (define-public racket (with-directory-excursion "share/pkgs" (for-each delete-file-recursively '#+%main-repo-main-distribution-pkgs)) - #t)))) + ;; Minimal workaround for FSDG issue: + ;; see . + ;; We will backport a better fix once we use Git + ;; origins for Racket packages. + (delete-file-recursively "share/pkgs/srfi-doc-nonfree") + (substitute* "share/pkgs/srfi/info.rkt" + (("\"srfi-doc-nonfree\"") + "")))))) (inputs `(("cairo" ,cairo) ("fontconfig" ,fontconfig) @@ -461,7 +488,7 @@ (define-public racket (native-inputs `(("racket" ,racket-minimal) ("extend-layer" ,extend-layer) - ("main-repo" ,(package-source racket-minimal)))) + ("main-repo" ,%racket-origin))) (arguments `(#:phases (modify-phases %standard-phases From patchwork Sun Feb 27 21:28:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37535 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 6F7EE27BBE9; Sun, 27 Feb 2022 21:31:34 +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 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 5077827BBEA for ; Sun, 27 Feb 2022 21:31:32 +0000 (GMT) Received: from localhost ([::1]:58238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8d-0008AM-CO for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40354) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8C-0007Vq-5c for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8B-0005JU-Tj for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8B-0008EB-Q6 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 03/24] gnu: racket: Use Git origins for Racket packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599743331501 (code B ref 53878); Sun, 27 Feb 2022 21:31:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:33 +0000 Received: from localhost ([127.0.0.1]:59327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7f-0008Bt-5O for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:33 -0500 Received: from mail-vk1-f176.google.com ([209.85.221.176]:36409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7T-0008B3-Ma for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:21 -0500 Received: by mail-vk1-f176.google.com with SMTP id w128so4243558vkd.3 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:19 -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=ULmt+DzNuFEXzkr1s7B+yAFbUDhx9z7yn8VsJwwxOt0=; b=Wp4d6ZbwBu0eXKZVujzMjb5pWGd9+2uIj8//v5jmR5qVY00zVDEZK5gRLyZP+6qhGY WTl5/48QVce9r9YcjTQlukuQDJhxpezqQKdNFLheKVXLYrJdYP6sglHpzgGVtvzX7Q1O 7A+fxuQchiGwTKlruhTtfc1BmB1/wBJOOZGBgQ2Ghf8/mimr33OEd6t1kTEMRksZHT2V 6fsEzw7ltA726YJel5rVYlEUqw2PkIuY3DW16JYQ+zmBzHB3O8oWxlSH909cL4JSJdv3 CjLZxuHWf9wNLpCbhp837WvfBRcBEC9IozD19vKW8nc0KhH+XTu9P1NsFBBzj8G3PTfG 4KZw== 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=ULmt+DzNuFEXzkr1s7B+yAFbUDhx9z7yn8VsJwwxOt0=; b=Z2zSA3GHI+/xM4GQj431qdZEfQmHOF0CjkN9Y1Pg6PLQIWliY547e0NlKzZ9tgQlDW 0WHPcX5AX0W1QooqCAiX80TQhpogX6VEMa7JEdPvygcSszL7ypK0EhcgQ2LFkepWjXQO 8QUGvO0P2BAydU/jr0UmyT9vVVvAiXCQfNTDFYQ6MUeYNt0CONjAOAfaHPaVtEbpmOos mqlgLtYn4XSSSVv7FJrMscqTbt53b8onteVPmOmxFeoQWY5B8ESyxpPoOUmDFV0rhT95 xjasIAN8yJ2rIXepc/j5IPuSdboDTyQiT9fp/gGRSQjy/Z1F99dnLBzkH1gXr/zdAkrF Pgzw== X-Gm-Message-State: AOAM531Y90avUPjcdvoSiNYrsT2JxFDhIQxU14qK4xxwZ8g13OJN+CV6 +CQcZEeIpOXTqdcLuPiT/HNHaJcOPvGiGLpf1Pg= X-Google-Smtp-Source: ABdhPJwLGyhy3tvgDicYU0V6X7DNO/FenU4UiRF2svROmNiKgmTtRRMEDqy2B8Wjf5j2ZxElCtZDfA== X-Received: by 2002:a1f:9493:0:b0:332:59d4:cd69 with SMTP id w141-20020a1f9493000000b0033259d4cd69mr6803425vkd.9.1645997413515; Sun, 27 Feb 2022 13:30:13 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id p14-20020a67f34e000000b0031c28ace25asm1082287vsm.9.2022.02.27.13.30.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:13 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:28:59 -0500 Message-Id: <20220227212920.2009000-4-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/racket-gui-tethered-launcher-backport.patch: Adjust path. * gnu/packages/racket.scm (racket-packages-origin, simple-racket-origin): New procedures. (extend-layer): Rename to ... (configure-layer.rkt): ... this variable. Tweak command-line arguments. Adapt to 'config-tethered-apps-dir'. (racket): Stop inheriting from 'racket-minimal'. [version]: Use '%racket-version'. [source]: Stop using bundled tarball. [inputs]: Remove labels. Add 'racket-minimal' and package sources. [native-inputs]: Remove, since cross-compilation doesn't work yet. [arguments]: Rewrite to use G-expressions, package sources from 'inputs', an explicit 'install' phase, and the revised 'configure-layer.rkt'. --- ...acket-gui-tethered-launcher-backport.patch | 6 +- gnu/packages/racket.scm | 714 +++++++++++++----- 2 files changed, 539 insertions(+), 181 deletions(-) diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch index abf253486f..1e018eaa79 100644 --- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch +++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch @@ -7,13 +7,13 @@ Related to racket/racket#4133 (cherry picked from commit 563c68432f127729592f234ef30c31e92618b517) --- - share/pkgs/gui-lib/mred/installer.rkt | 3 ++- + gui-lib/mred/installer.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt index b1691472..9ef06c53 100644 ---- a/share/pkgs/gui-lib/mred/installer.rkt -+++ b/share/pkgs/gui-lib/mred/installer.rkt +--- a/gui-lib/mred/installer.rkt ++++ b/gui-lib/mred/installer.rkt @@ -72,4 +72,5 @@ (list "-A" (path->string (find-system-path 'addon-dir))))) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 00ec587eeb..a37442edc2 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -28,7 +28,9 @@ (define-module (gnu packages racket) #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:use-module (ice-9 match) + #:use-module (ice-9 exceptions) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) @@ -389,172 +391,504 @@ (define-public racket-bootstrap-chez-bootfiles Chez Scheme.") (license (list license:asl2.0))))) +(define (racket-packages-origin name origin specs) + "Extract from ORIGIN the sources for the Racket packages specified by SPECS, +a non-empty list of package specifications. In the resulting file-like +object, each package's source will be in the directory +\"/share/racket/pkgs/PKG/\", where PKG is the Racket name for the package. +The NAME will be used in the store file name for the resulting file-like +object. -(define %installer-mirrors - ;; Source: - ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58 - ;; Matthew Flatt says: "note that many are commented out" - ;; INVARIANT: End with a trailing "/"! - '("https://mirror.racket-lang.org/installers/" - "https://www.cs.utah.edu/plt/installers/" - "https://plt.cs.northwestern.edu/racket-mirror/" - "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/" - ;; Universität Tübingen is using a self-signed HTTPS certificate: - "http://mirror.informatik.uni-tuebingen.de/mirror/racket/" - "https://racket.infogroep.be/" - )) +A package specification is a list of the form: -(define %main-repo-main-distribution-pkgs - ;; These are the packages developed in the main Racket Git repository - ;; that are part of the main distribution. - '("at-exp-lib" - "base" - "compiler-lib" - ;; NOT "compiler-test" - "compiler" - "net-doc" - "net-lib" - ;; NOT "net-test" - "net" - ;; NOT "plt-services" - ;; NOT "racket-benchmarks" - ;; NOT "racket-build-guide" - "racket-doc" - "racket-index" - "racket-lib" - ;; NOT "racket-test-core" - ;; NOT "racket-test-extra" - ;; NOT "racket-test" - "zo-lib")) + (PKG PATH) +where PATH is the path to the package source relative to ORIGIN---possibly +\".\". As a special case, a package specification may also be a string, which +is equivalent to: + + (PKG PKG) + +Examples: + +- \"expeditor\" +- (\"main-distribution\" \".\") +- (\"racket-lib\" \"pkgs/racket-lib\")" + (computed-file + (string-append "racket-pkg-" name "-sources") + (with-imported-modules `((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p (string-append #$output "/share/racket/pkgs")) + (chdir (string-append #$output "/share/racket/pkgs")) + #$@(map (match-lambda + ((? string? name) + #~(copy-recursively #$(file-append origin (string-append "/" name)) + #$name)) + ((name ".") + #~(copy-recursively #$origin #$name)) + ((name path) + #~(copy-recursively #$(file-append origin (string-append "/" path)) + #$name))) + specs))))) + +(define (simple-racket-origin repo hash specs) + "Like 'racket-packages-origin', but specialized for packages hosted at +\"https://github.com/racket/REPO\" with sha256 checksum HASH. REPO is also +used to build the name of the resulting store item." + (racket-packages-origin + repo + (origin + (method git-fetch) + (uri (git-reference + (url (format #f "https://github.com/racket/~a" repo)) + (commit %racket-commit))) + (sha256 hash) + (file-name (git-file-name (string-append "racket-" repo) + %racket-version))) + specs)) (define-public racket (package - (inherit racket-minimal) (name "racket") (version %racket-version) - (source - (origin - (method url-fetch) - (uri (map (lambda (base) - (string-append base version "/racket-src.tgz")) - %installer-mirrors)) - (sha256 - (base32 - "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5")) - (patches - ;; remove in Racket 8.5 - ;; see https://github.com/racket/racket/issues/4133 - (search-patches "racket-gui-tethered-launcher-backport.patch")) - (snippet - #~(begin - (use-modules (guix build utils) - (ice-9 match) - (ice-9 regex)) - ;; unbundle minimal Racket - (for-each delete-file-recursively - '("collects" - "doc" - "etc" - "README" - "src")) - ;; unbundle package sources included elsewhere - (with-directory-excursion "share/pkgs" - (for-each delete-file-recursively - '#+%main-repo-main-distribution-pkgs)) - ;; Minimal workaround for FSDG issue: - ;; see . - ;; We will backport a better fix once we use Git - ;; origins for Racket packages. - (delete-file-recursively "share/pkgs/srfi-doc-nonfree") - (substitute* "share/pkgs/srfi/info.rkt" - (("\"srfi-doc-nonfree\"") - "")))))) + (source #f) (inputs - `(("cairo" ,cairo) - ("fontconfig" ,fontconfig) - ("glib" ,glib) - ("glu" ,glu) - ("gmp" ,gmp) - ("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libx11" ,libx11) - ("mesa" ,mesa) - ("mpfr" ,mpfr) - ("pango" ,pango) - ("unixodbc" ,unixodbc) - ("libedit" ,libedit))) - (native-inputs - `(("racket" ,racket-minimal) - ("extend-layer" ,extend-layer) - ("main-repo" ,%racket-origin))) + (list + cairo + fontconfig + glib + glu + gmp + gtk+ ;; propagates gdk-pixbuf+svg + libjpeg-turbo + libpng + libx11 ;; ?? wayland ?? + mesa + mpfr + pango + unixodbc + libedit ;; TODO reconsider in light of expeditor and readline-gpl + racket-minimal ;; <-- TODO non-tethered layer + (simple-racket-origin + "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") + '("2d" "2d-doc" "2d-lib")) + (simple-racket-origin + "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx") + '(("algol60" "."))) + (racket-packages-origin + "racket" %racket-origin + '(("base" "pkgs/base") ;; FIXME belongs in racket-minimal + ("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal + ("at-exp-lib" "pkgs/at-exp-lib") + ("compiler" "pkgs/compiler") + ("compiler-lib" "pkgs/compiler-lib") + ("net" "pkgs/net") + ("net-doc" "pkgs/net-doc") + ("net-lib" "pkgs/net-lib") + ("racket-doc" "pkgs/racket-doc") + ("racket-index" "pkgs/racket-index") + ("sandbox-lib" "pkgs/sandbox-lib") + ("zo-lib" "pkgs/zo-lib"))) + (simple-racket-origin + "cext-lib" (base32 "00w38jpv88fpl4pgj6ndnysvn0s21rjvj0xhznay80msan0vc341") + '("cext-lib" "dynext-lib")) + (simple-racket-origin + "class-iop" (base32 "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l") + '("class-iop-lib")) + (simple-racket-origin + "compatibility" (base32 "0bfqwscjpyi325br5pa6g62g9c8lq18a80zp5g3d2qzn3n3mi6x0") + '("compatibility" "compatibility-doc" "compatibility-lib")) + (simple-racket-origin + "contract-profile" (base32 "1xm2z8g0dpv5d9h2sg680vx1a8ix9gbsdpxxb8qv1w7akp73paj3") + '(("contract-profile" "."))) + (simple-racket-origin + "data" (base32 "10iabgrk9alaggvksnyb0hdq7f1p30pq6pq2bcakvhzpxwiv1f55") + '("data" "data-doc" "data-enumerate-lib" "data-lib")) + (simple-racket-origin + "datalog" (base32 "0n5j5gnqh7g31mvgx19ggl18hirzbvq2r189lbngmnrmbc7b73fp") + '(("datalog" "."))) + (simple-racket-origin + "db" (base32 "1n02ja0yj3mjjhmz0yv04yfhyvrsznbljn8bjviyfxnm4xf9rcc5") + '("db" "db-doc" "db-lib")) + (simple-racket-origin + "deinprogramm" (base32 "1is6fapgv6rxfjz47nh6qf3kh7y7sjdinakaxqffi46gf1al8prd") + '("deinprogramm" "deinprogramm-signature")) + (simple-racket-origin + "distributed-places" (base32 "1dajpkj9balqcpv6cdk9hwjz592h1vq8rrx5vncariiac4vbdpa0") + '("distributed-places" "distributed-places-doc" "distributed-places-lib")) + (simple-racket-origin + "draw" (base32 "1xgjfbh70hqw67z88iqqajg98d04qwbzn6im2wj47rs28jxlm9ly") + '("draw" "draw-doc" "draw-lib")) + (simple-racket-origin + "drracket" (base32 "0m3l4an3nq2ycd1h287s1az2v2zprjbzd8if2x7d5r71vaj4i00c") + '("drracket" + "drracket-plugin-lib" + "drracket-tool" + "drracket-tool-doc" + "drracket-tool-lib" + "drracket-tool-text-lib")) + (simple-racket-origin + "ds-store" (base32 "0ajr27kipp4dr1qlisaghsb3h7lhhjwrfw2r79b5myczsa1mp661") + '("ds-store" "ds-store-doc" "ds-store-lib")) + (simple-racket-origin + "eli-tester" (base32 "0icx6wn14gjm8kdmq1jppqgq87sxkras4qb5xmdr6wigxafhjqyk") + '(("eli-tester" "."))) + (simple-racket-origin + "eopl" (base32 "1fmiixj6rxsgzwvgva8lvrvv0gl49v2405mp3s0i7ipis5c4n27s") + '(("eopl" "."))) + (simple-racket-origin + "errortrace" (base32 "14m7rhaxngj36070iw15am434hm438pfgmwjfsiqhsglz4pcxhip") + '("errortrace" "errortrace-doc" "errortrace-lib")) + (simple-racket-origin + "expeditor" (base32 "07djzxs6307l51mcsk3yr2g4g47ayxa3878g7sf5xhqdr4hd9vxf") + '("expeditor" "expeditor-doc" "expeditor-lib")) + (simple-racket-origin + "frtime" (base32 "0ydz2yn8vvv6z7brwlswcyx0f31a6y6d443i89rysfvd2xkhpfd5") + '(("frtime" "."))) + (simple-racket-origin + "future-visualizer" (base32 "1758qq769m0r14xf64sl2ix2l9z340kvapar0j7s5kdg42lmvnhm") + '("future-visualizer" + "future-visualizer-pict" + "future-visualizer-typed")) + (simple-racket-origin + "games" (base32 "0kpn3izlx1ccd0pj0dnvmnrhny51b85xy418a7psj70lz8j8415d") + '(("games" "."))) + (racket-packages-origin + "gui" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/gui") + (commit %racket-commit))) + (sha256 (base32 + "1x33jgrx3r32k7hgwr591z3xqv1m2r5nc4km2fnxv0ak2xa0j3gj")) + (patches + ;; remove in Racket 8.5 + ;; see https://github.com/racket/racket/issues/4133 + (search-patches "racket-gui-tethered-launcher-backport.patch")) + (file-name (git-file-name "racket-gui" %racket-version))) + '("gui" "gui-doc" "gui-lib" "tex-table")) + (simple-racket-origin + "gui-pkg-manager" (base32 "1ji9448d723nklqvycwdswj0ni28sabrncag14f9mx47did5myb5") + '("gui-pkg-manager-lib")) + (simple-racket-origin + "htdp" (base32 "0r4ykybcpr10y2db9rlza9pr0xh58nd7ac389mjcxp8g386hgihl") + '("htdp" "htdp-doc" "htdp-lib")) + (simple-racket-origin + "html" (base32 "18n1jnjgzfknc8nv8dppi85nb8q08gqdwkg6hfjk08x0p00anx2x") + '("html" "html-doc" "html-lib")) + (simple-racket-origin + "icons" (base32 "1s5a6j11fg3fdr6b7vm2q7q178d7q8b8igy73bs211r27qrd1gg7") + '(("icons" "."))) + (simple-racket-origin + "images" (base32 "0rpjxqw34bq5m08kh1ldl1mr7s9z1lyydxxcyzb292kqh9qiqvfl") + '("images" "images-doc" "images-gui-lib" "images-lib")) + (simple-racket-origin + "lazy" (base32 "176ylzgbdsbmqknpihaz519afq71pyjkv1h87j5v8jfbpbddyfsf") + '(("lazy" "."))) + (simple-racket-origin + "macro-debugger" (base32 "14hyrwbkffr61fk44l02xb47bhv5zccw0ymaa9kxld86hvyqhqbm") + '("macro-debugger" "macro-debugger-text-lib")) + (simple-racket-origin + "main-distribution" (base32 "0m2n9s32s8a4a2gn4ywrm9l8jycdm5ayi5w9kh5wchhrrw7qzq7y") + '(("main-distribution" "."))) + (simple-racket-origin + "make" (base32 "10852fj30bz5r46c3d99s37fkgy5yh44gb01j29sf3kxnhi0g2sa") + '(("make" "."))) + (simple-racket-origin + "math" (base32 "02sqbnvxvmvslk33b44fx4v93zafcvhva0cx8z21jqbl5wp217ac") + '("math" "math-doc" "math-lib")) + (simple-racket-origin + "mysterx" (base32 "11p9jzrafw0hizhl0cs4sxx7rv281185q8hryic2rpk0kzjdyr48") + '(("mysterx" "."))) + (simple-racket-origin + "mzcom" (base32 "0rc9pfj7gwm5azghqvcibz6si1x5s2v8mr2yngk7ssq9gzfbi6a4") + '(("mzcom" "."))) + (simple-racket-origin + "mzscheme" (base32 "192c52zi726h5wjamxrhivjw2waq1im0zpyxhbrkrxknm8x84bs9") + '("mzscheme" "mzscheme-doc" "mzscheme-lib")) + (racket-packages-origin + "net-cookies" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/RenaissanceBug/racket-cookies") + (commit %racket-commit))) + (sha256 (base32 + "0k0hifxhywl5c3hjcaiizc098dpyk001d981p572gly116yvjxc1")) + (file-name + (git-file-name "RenaissanceBug-racket-cookies" %racket-version))) + '("net-cookies" "net-cookies-doc" "net-cookies-lib")) + (racket-packages-origin + "optimization-coach" + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stamourv/optimization-coach") + (commit %racket-commit))) + (sha256 (base32 + "0b27sw48d7rhz0hin88c7rbr9vpg1c23sn82nd4jkmq54h6gasr1")) + (file-name + (git-file-name "stamourv-optimization-coach" %racket-version))) + '(("optimization-coach" "."))) + (simple-racket-origin + "option-contract" (base32 "026b7n5l0c3024nymshz8zp1yhn493rdzgpflzfd52hj7awafqhk") + '("option-contract" "option-contract-doc" "option-contract-lib")) + (simple-racket-origin + "parser-tools" (base32 "08pvz4zramirzm3j64hbhjm0mmh5zfy37iv4s3vmq0rj49cr8fl3") + '("parser-tools" "parser-tools-doc" "parser-tools-lib")) + (simple-racket-origin + "pconvert" (base32 "00czi0p399mmyrvxyrs5kniizpkqfxyz2ncxqi2jy79a7wk79pb1") + '("pconvert-lib")) + (simple-racket-origin + "pict" (base32 "0g1iwdr6qh1xb0crhj96830vjjnbds409xbpqn7j5sh0ksy6vr5x") + '("pict" "pict-doc" "pict-lib")) + (simple-racket-origin + "pict-snip" (base32 "081nwiy4a0n4f7xws16hqbhf0j3kz5alizndi3nnyr3chm4kng6x") + '("pict-snip" "pict-snip-doc" "pict-snip-lib")) + (simple-racket-origin + "picturing-programs" (base32 "1g6xr39hx1j03gb3d4dljm3v91xcj2gfpq3dgy5xvplzr6cmmxgr") + '(("picturing-programs" "."))) + (simple-racket-origin + "plai" (base32 "0i983sh0r0zm2ng4j44m5aw9669kh5fhp91bzpc9jm280rfcqvyl") + '("plai" "plai-doc" "plai-lib")) + (simple-racket-origin + "planet" (base32 "0r2yqrzrmdjjyr14k6hhlzc5kzrcx3583m1s02mhrcmpfw0s85w9") + '("planet" "planet-doc" "planet-lib")) + (simple-racket-origin + "plot" (base32 "07kq32si34ybcwz8idxxcrzssg8diyrp1nfgkcj0mmvr45321zm7") + '("plot" "plot-compat" "plot-doc" "plot-gui-lib" "plot-lib")) + (simple-racket-origin + "preprocessor" (base32 "1p5aid58ifnjy4xl0ysh85cq39k25661v975jrpk182z3k5621mg") + '(("preprocessor" "."))) + (simple-racket-origin + "profile" (base32 "179i86lyby29nywz60l4vnadi02w8b12h7501nm5h5g4pq9jjmbb") + '("profile" "profile-doc" "profile-lib")) + (racket-packages-origin + "quickscript" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Metaxal/quickscript") + (commit %racket-commit))) + (sha256 (base32 + "100g3yqhbjdq06b6l6d72ywsw29awgy8crqg33wj7h12xq07nzcr")) + (file-name (git-file-name "Metaxal-quickscript" %racket-version))) + '(("quickscript" "."))) + (simple-racket-origin + "r5rs" (base32 "1g3cysj7z88r38vkzvi8g2fb2hn4yg1fdhy5smxw303jxgl3inp6") + '("r5rs" "r5rs-doc" "r5rs-lib")) + (simple-racket-origin + "r6rs" (base32 "0b1ymzdp10r0flw2acbidjsh5ma1pm5hy54jss37sxf89z3xbvm4") + '("r6rs" "r6rs-doc" "r6rs-lib")) + (racket-packages-origin + "racket-cheat" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jeapostrophe/racket-cheat") + (commit %racket-commit))) + (sha256 (base32 + "06wcj558rzkbl2bwkmikyspya9v1f4iwlzwnwxpkc33h2xapwabr")) + (file-name + (git-file-name "jeapostrophe-racket-cheat" %racket-version))) + '(("racket-cheat" "."))) + (simple-racket-origin + "racklog" (base32 "1rgrvwy3kr9b9w5cghsffiv3ly00yfvvzr5xaaw83g1w7yin0mnb") + '(("racklog" "."))) + (simple-racket-origin + "rackunit" (base32 "057z31rja6h3nabh5b2xgwfrzmlm6h1cv1qcgf3xfy4g2q5dqn5p") + '("rackunit" + "rackunit-doc" + "rackunit-gui" + "rackunit-lib" + "rackunit-plugin-lib" + "rackunit-typed" + "schemeunit" + "testing-util-lib")) + (simple-racket-origin + "readline" (base32 "13kbcn2wchv82d709mw3r8n37bk8iwq0y4kpvm9dbzx0w2pxkfwn") + '("readline" "readline-doc" "readline-lib")) + (simple-racket-origin + "realm" (base32 "0hxcgla08iack54j8v40fj51811chpy66ym2zq76zb52c7kzn0hi") + '(("realm" "."))) + (simple-racket-origin + "redex" (base32 "0vlgxbnbgrlihk1hh5zd6hsc4566ldi4q76f87z5vai54dxkwy2f") + '("redex" + "redex-benchmark" + "redex-doc" + "redex-examples" + "redex-gui-lib" + "redex-lib" + "redex-pict-lib")) + (simple-racket-origin + "sasl" (base32 "0ibh4wb4gn8pggx6gkv4vk4d6rwzn5nrvjibhvkzhaynf6lhb824") + '("sasl" "sasl-doc" "sasl-lib")) + (simple-racket-origin + "scheme-lib" (base32 "0pcf0y8rp4qyjhaz5ww5sr5diq0wpcdfrrnask7zapyklzx1jx8x") + '(("scheme-lib" "."))) + (simple-racket-origin + "scribble" (base32 "0rgvnsykrxkah6s5fw1vyp9lxsb4z9w6hgwk5j6wbwjp2gsfczbm") + '("scribble" + "scribble-doc" + "scribble-html-lib" + "scribble-lib" + "scribble-text-lib")) + (simple-racket-origin + "serialize-cstruct-lib" + (base32 "1rq3n1fa7ldjwx3lrh9ybhig7jlsw1crpzyklbzp3xqdw6jymfnz") + '(("serialize-cstruct-lib" "."))) + (simple-racket-origin + "sgl" (base32 "0nkymhdyjrwi5h199j4w5zh7y3x3ai42gsiwxzh0hy7yqrqqg9zv") + '(("sgl" "."))) + (simple-racket-origin + "shell-completion" (base32 "04m144gy2mp4fiq6rcbf12wjr8mws8k9scfhg9lc38vqppp4lxsj") + '(("shell-completion" "."))) + (simple-racket-origin + "simple-tree-text-markup" + (base32 "0fyd9gfz6bnv0m1901wv5mnhc05rm8hw9i6ddrqx33hs6qsg2zqr") + '("simple-tree-text-markup" + "simple-tree-text-markup-doc" + "simple-tree-text-markup-lib")) + (simple-racket-origin + "slatex" (base32 "0pkm2isbbdk63slrbsxcql7rr0wdrw5kapw1xq4ps5k8dhlzv8x0") + '(("slatex" "."))) + (simple-racket-origin + "slideshow" (base32 "1znv1i2d0610hhy71q932xy7wka00q3q50in1xfnk8ibg7nzkagm") + '("slideshow" "slideshow-doc" "slideshow-exe" "slideshow-lib" "slideshow-plugin")) + (simple-racket-origin + "snip" (base32 "01r9wc5xr3q3n4yyif6j0a37rgdzmpslxn05k13ksik73b3wj6hj") + '("snip" "snip-lib")) + (simple-racket-origin + "typed-racket" (base32 "1462kj9yswsxbnw71casylzlvhd7cxrml2v9j7rcsnn9hmrqx4vv") + '("source-syntax" + "typed-racket" + "typed-racket-compatibility" + "typed-racket-doc" + "typed-racket-lib" + "typed-racket-more")) + (racket-packages-origin + "srfi" (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/racket/srfi") + ;; Includes an FSDG fix: return to %racket-commit in 8.5. + ;; See . + (commit "7243029b135741ce08ae30f877e2f49a2a460b22"))) + (sha256 (base32 + "0aqbcdv2dfc2xnk0h6zfi56p7bpwqji8s88qds3d03hhh9k28gvn")) + ;; Use the relevant version for srfi-doc and srfi-lib, + ;; since we're using a newer commit than the v8.4 tag. + (file-name (git-file-name "racket-srfi" "1.1"))) + '("srfi" "srfi-doc" "srfi-lib" "srfi-lite-lib")) + (simple-racket-origin + "string-constants" (base32 "1qizjq4n0hzdgdcjjpr94464gsywpsk2g9mnvwzqr7dcqbrsfvn6") + '("string-constants" "string-constants-doc" "string-constants-lib")) + (simple-racket-origin + "swindle" (base32 "164gdsphjzdl2vv7zxz7dfk9jwax8njpmim6sidm8qz8a8589y67") + '(("swindle" "."))) + (simple-racket-origin + "syntax-color" (base32 "1vf2fc3qvx8a1igi7swsg8gaqhx786sa0vqxd18xhbsidfgb5ywp") + '("syntax-color" "syntax-color-doc" "syntax-color-lib")) + (simple-racket-origin + "trace" (base32 "070ihla5j796hdarn5wxdwn4xj0xnkm50shgh49jy994mribvhia") + '(("trace" "."))) + (simple-racket-origin + "unix-socket" (base32 "02dfwas5ynbpyz74w9kwb4wgb37y5wys7svrlmir8k0n9ph9vq0y") + '("unix-socket" "unix-socket-doc" "unix-socket-lib")) + (simple-racket-origin + "web-server" (base32 "1zgb6jl7zx6258ljs8f3lvryrq5n5zpd71dqzr698m92kw3x2pkn") + '("web-server" "web-server-doc" "web-server-lib")) + (simple-racket-origin + "wxme" (base32 "1qp5gr9gqsakiq3alw6m4yyv5vw4i3hp4y4nhq8vl2nkjmirvn0b") + '("wxme" "wxme-lib")) + (simple-racket-origin + "xrepl" (base32 "12zjgsy5zqm3fck3ihg4a70wj56s2cnnjyb4jlfi5nnsfqyrnxg3") + '("xrepl" "xrepl-doc" "xrepl-lib")))) + (build-system gnu-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'unpack-packages - (let ((unpack (assoc-ref %standard-phases 'unpack))) - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out")) - (pkgs-dir (string-append prefix "/share/racket/pkgs"))) - (mkdir-p pkgs-dir) - (copy-recursively - "share/links.rktd" - (string-append prefix "/share/racket/links.rktd")) - (copy-recursively "share/pkgs" pkgs-dir) - ;; NOTE: unpack changes the working directory - (unpack #:source (assoc-ref (or native-inputs inputs) - "main-repo")) - (for-each (lambda (pkg) - (define dest (string-append pkgs-dir "/" pkg)) - (mkdir-p dest) - (copy-recursively (string-append "pkgs/" pkg) - dest)) - ',%main-repo-main-distribution-pkgs) - #t)))) - (replace 'configure - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let ((racket (assoc-ref (or native-inputs inputs) "racket")) - (prefix (assoc-ref outputs "out"))) - (apply invoke - (string-append racket "/bin/racket") - (assoc-ref inputs "extend-layer") - racket - prefix - (map - (lambda (lib) - (string-append (assoc-ref inputs lib) "/lib")) - '("cairo" - "fontconfig" - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg" - "libpng" - "libx11" - "mesa" - "mpfr" - "pango" - "unixodbc" - "libedit"))) - #t))) - (replace 'build - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (invoke (string-append (assoc-ref (or native-inputs inputs) - "racket") - "/bin/racket") - "--config" - (string-append (assoc-ref outputs "out") - "/etc/racket") - "-l" - "raco" - "setup") - #t)) - (delete 'install)) - ;; we still don't have these: - #:tests? #f)) + ;; We're using #:configure-flags to pass flags for + ;; `configure-layer.rkt` and #:make-flags to pass arguments for + ;; `raco pkg install`. + (list + #:configure-flags + #~`("--extra-foreign-lib-search-dirs" + ,(format #f "~s" + '(#$@(map (lambda (name) + (cond + ((this-package-input name) + => (cut file-append <> "/lib")) + (else + (raise-exception + (make-exception + (make-assertion-failure) + (make-exception-with-message + "missing input to the 'racket' package") + (make-exception-with-irritants + (list name))))))) + '("cairo" + "fontconfig-minimal" ;; aka fontconfig + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg-turbo" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit"))))) + #:make-flags #~`("main-distribution") + #:tests? #f ;; packaged separately + #:modules '((guix build gnu-build-system) + (guix build utils) + (guix build union) + (ice-9 match)) + #:imported-modules `((guix build union) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + (let* ((racket (search-input-file inputs "bin/racket"))) + (apply invoke + racket + #$configure-layer.rkt + `(,@configure-flags + ,(dirname (dirname racket)) + ,#$output)) + (invoke racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" "setup" + "--no-user")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We use "share/racket/pkgs" for sources to distinguish them + ;; from the "lib/racket/pkgs" of a potential parent layer. + (union-build (string-append #$output "/lib/racket/pkgs") + (search-path-as-list '("share/racket/pkgs") + (map cdr inputs)) + #:create-all-directories? #t))) + (replace 'install + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((racket (search-input-file inputs "/bin/racket"))) + (unless (null? make-flags) + (invoke racket + "-l-" + "pkg/dirs-catalog" + "--link" + "local-catalog" + (string-append #$output "/lib/racket/pkgs")) + (apply invoke + racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" + "pkg" "install" + "--installation" + "--auto" + "--catalog" "local-catalog" + make-flags)))))))) + (home-page "https://racket-lang.org") (synopsis "Programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -564,17 +898,20 @@ (define dest (string-append pkgs-dir "/" pkg)) The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of -languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) - +languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) -(define extend-layer +(define configure-layer.rkt (scheme-file - "extend-layer.rkt" + "configure-layer.rkt" `(module - extend-layer racket/base + configure-layer racket/base (require racket/cmdline racket/match racket/file + racket/port racket/list racket/pretty) (define config-file-pth @@ -584,8 +921,14 @@ (define (build-path-string . args) (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) + (define extra-foreign-lib-search-dirs '()) (command-line - #:args (parent-layer prefix . lib-dir*) + #:once-each + [("--extra-foreign-lib-search-dirs") dir-list + "foreign library directories, as a list of strings in `read` syntax" + (set! extra-foreign-lib-search-dirs + (call-with-input-string dir-list read))] + #:args (parent-layer prefix) (let* ([config (for/fold ([config (file->value (build-path parent-layer @@ -615,27 +958,42 @@ (define rx:racket (build-path-string parent-layer pth)) (filter values (hash-ref config search-key null)))))] [config - (hash-set config - 'apps-dir - (build-path-string prefix "share/applications"))] + (hash-update config + 'lib-search-dirs + (lambda (dirs) + ;; add after other layers, but before older + ;; foreign lib search directories + (define-values [rkt old-foreign-dirs] + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + dirs)) + (append rkt + extra-foreign-lib-search-dirs + old-foreign-dirs)))] [config - ;; place new foreign lib-search-dirs before old - ;; foreign dirs, but after Racket layers - (let-values - ([(rkt extra) - (partition (lambda (pth) - (or (not pth) - (regexp-match? rx:racket pth))) - (hash-ref config 'lib-search-dirs))]) - (hash-set config - 'lib-search-dirs - (append rkt - lib-dir* - extra)))] + (hash-set* config + 'apps-dir + (build-path-string prefix "share/applications") + 'absolute-installation? #t + ;; Let Guix coexist with other installation + ;; methods without clobbering user-specific packages. + ;; This could be set in various places, but doing + ;; it here is convienient, at least until we support + ;; cross-compilation. + 'installation-name + (string-append (version) + "-guix" + (match (system-type 'gc) + ['cgc "-cgc"] + ;; workaround Guile reader/printer: + ['|3m| "-bc"] + [_ ""])))] [bin-dir (hash-ref config 'bin-dir)] [config (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) 'config-tethered-console-bin-dir bin-dir 'config-tethered-gui-bin-dir bin-dir)] [new-config-pth From patchwork Sun Feb 27 21:29:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37531 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 6E57B27BBEA; Sun, 27 Feb 2022 21:31: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 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 4E45C27BBEC for ; Sun, 27 Feb 2022 21:31:18 +0000 (GMT) Received: from localhost ([::1]:57570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8P-0007dx-DS for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8C-0007WU-UK for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37216) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8C-0005Jj-JL for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8C-0008EI-9U for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 04/24] gnu: racket-minimal: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599743931527 (code B ref 53878); Sun, 27 Feb 2022 21:31:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:39 +0000 Received: from localhost ([127.0.0.1]:59331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7m-0008CP-Bp for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:39 -0500 Received: from mail-vs1-f43.google.com ([209.85.217.43]:33568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7X-0008BH-Qq for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:25 -0500 Received: by mail-vs1-f43.google.com with SMTP id d26so11142208vsh.0 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+fLJCY3vM/ADUmWIox4zLXxZi0OpOqXWcTnr9qBwQGk=; b=NhsjI3iK/fZttEuaQZvlsZLALbzPAW4zI/XdQttvypWHgnYxgB2yHLA4Ra6MOMVDB9 q9YKL+DHKGzp6VGOUoJH/bp4X70aQKWTPEn5QStaa0hGuXIOPM/BQ8Bq/6nJc0TJvpdZ oc0iEWimi9XLifcgCwNgAK8lkWO28AqVZoX2Xp6KVN4L2UHftwP2STVOoFmCd7RaKnp1 UbRXN/Lijt3zbnfwky/oSLAlngpt+cn0QlZPd8Fp6X8uUwIV3cDLGN48rmJRVAhAiEjI pZPMTAgA8ZQDXQX/mp0ybTJ4p/M6Lsi2BM6GFIXpYjlOXYEUf8LlierPHjZ0Jkyb565Q clew== 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=+fLJCY3vM/ADUmWIox4zLXxZi0OpOqXWcTnr9qBwQGk=; b=edaN596jnACAd8VCo3LZ0CNzl41pCdbONXJjj5/bWSqFCDGhSm9FovYsbEQa9ShM+C iIGZp7e8Az8eNtJiWCWqw1SpD1rTXDaVWoZBtM1/BmDxfouynBnxk6oFSrfCweXl2hmj Yr7Rlq8y2NxzeeSthJV2yxaG9AdzZYgSxqtnAxIvmF1k/Fcg2hpGK1Q+tTxszQMvigTq NyEz1ejfllj7d8sGT3QOqFuL4p0691L1YJrxY2H1Wf2UD9FZL7eq7Lzw1D3EONgArqor ZNPLHTGlKgTSo/vgzYnySAmEHtW82viDnqWn9fuULumiLUcFZphjM1hT5Cf3F++2xf4k Bz4w== X-Gm-Message-State: AOAM530As5x5A7nA+ahlyVmByf1K1ITJsphd+5PQhgTPvsTSyKKXg0HV NDR5KcBCXOCzOJYW6hQwNjAIF0Vj5MoFouJgWeg= X-Google-Smtp-Source: ABdhPJwJtGMM0HqmFIA49GPq5tX1jL0ycUwQs5/ssD82f8XVYH6h6UenHa/mjjEUEICEs981QlWhag== X-Received: by 2002:a05:6102:21ac:b0:31c:1b59:4fc6 with SMTP id i12-20020a05610221ac00b0031c1b594fc6mr6638643vsb.59.1645997417925; Sun, 27 Feb 2022 13:30:17 -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 x13-20020ab0654d000000b003420869cdd5sm1442428uap.13.2022.02.27.13.30.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:17 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:00 -0500 Message-Id: <20220227212920.2009000-5-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 a37442edc2..eb87eaa492 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -26,6 +26,7 @@ (define-module (gnu packages racket) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix gexp) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -99,7 +100,7 @@ (define-module (gnu packages racket) ;; Code: (define %racket-version "8.4") -;; ^ Remember to update racket-bootstrap-chez-bootfiles! +;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin @@ -133,34 +134,42 @@ (define %racket-origin ;; Unbundle libffi. (delete-file-recursively "racket/src/bc/foreign/libffi"))))) -(define cfg-flag:sh-for-rktio - `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - (assoc-ref %build-inputs "sh") - "/bin/sh")) -(define cfg-flag:enable-lt - `(string-append "--enable-lt=" - (assoc-ref %build-inputs "libtool") - "/bin/libtool")) -(define cfg-flag:enable-racket - `(let ((racket (assoc-ref %build-inputs "racket"))) - (string-append "--enable-racket=" - racket - "/bin/racket"))) +(define (racket-vm-common-configure-flags) + ;; under a lambda abstraction to avoid evaluating bash-minimal too early. + #~`(,@(cond + ((false-if-exception + (search-input-file %build-inputs "/bin/libtool")) + => (lambda (libtool) + (list (string-append "--enable-lt=" libtool)))) + (else + '())) + ,@(cond + ((false-if-exception + (search-input-file %build-inputs "/bin/racket")) + => (lambda (racket) + (list (string-append "--enable-racket=" racket)))) + (else + '())) + ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" + #$(file-append bash-minimal "/bin/sh")))) -(define unpack-nanopass+stex - ;; Copied from chez-scheme. - ;; TODO: Eventually, we should refactor Chez Scheme - ;; enough to share more directly, so that we can make - ;; Racket's version of Chez avalable as a Guix package, - ;; e.g. for architectures not supported upstream. - ;; For now, we let Racket drive the Chez build process - ;; other than this step. - `(for-each (lambda (dep) - (define src - (assoc-ref (or native-inputs inputs) dep)) - (copy-recursively src dep - #:keep-mtime? #t)) - '("nanopass" "stex"))) +(define (make-unpack-nanopass+stex) + ;; Adapted from chez-scheme. + ;; Thunked to avoid evaluating 'chez-scheme' too early. + ;; TODO: Refactor enough to share this directly. + #~(begin + (copy-recursively + #$(match (assoc-ref (package-native-inputs chez-scheme) + "nanopass") + ((src) + src)) + "nanopass" + #:keep-mtime? #t) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) (define-public racket-minimal @@ -169,91 +178,87 @@ (define-public racket-minimal (version %racket-version) (source %racket-origin) (inputs - `(;; common to all racket-minimal variants: - ("openssl" ,openssl) - ("sqlite" ,sqlite) - ("sh" ,bash-minimal) ;; <- for `system` - ("ncurses" ,ncurses) ;; <- for #%terminal - ;; only for CS - ("zlib" ,zlib) - ("lz4" ,lz4))) + (list + ;; common to all racket-minimal variants: + openssl + sqlite + bash-minimal ;; <- for `system` + ncurses ;; <- for #%terminal + ;; only for CS + zlib + lz4)) (native-inputs - `(("bootfiles" ,racket-bootstrap-chez-bootfiles) - ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) + (list chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m)) (build-system gnu-build-system) (arguments - `(#:configure-flags - (list "--enable-csonly" - "--enable-libz" - "--enable-liblz4" - ,cfg-flag:enable-racket - ,cfg-flag:sh-for-rktio) - #:out-of-source? #true - ;; Tests are in packages like racket-test-core and - ;; main-distribution-test that aren't part of the main distribution. - #:tests? #f - #:modules ((ice-9 match) + (list + #:configure-flags + #~(cons* "--enable-csonly" + "--enable-libz" + "--enable-lz4" + #$(racket-vm-common-configure-flags)) + ;; Tests are in packages like racket-test-core and + ;; main-distribution-test that aren't part of the main + ;; distribution. + #:tests? #f + ;; Upstream recommends #:out-of-source?, and it does + ;; help with debugging, but it confuses `install-license-files`. + #:modules '((ice-9 match) + (ice-9 regex) (guix build gnu-build-system) (guix build utils)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - ,unpack-nanopass+stex) - #t)) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (string-append (assoc-ref inputs "bootfiles") "/boot") - "boot")) - #t)) - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f ,@(map (lambda (lib) - (string-append (assoc-ref inputs lib) - "/lib")) - '("openssl" - "sqlite")))) - (build-stamp . "") - (catalogs - . (,(string-append - "https://download.racket-lang.org/releases/" - ,version - "/catalog/") - #f)))))) - #t)) - (add-before 'configure 'change-directory - (lambda _ - (chdir "racket/src") - #t)) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda* (#:key outputs #:allow-other-keys) - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append (assoc-ref outputs "out") - "/share/racket/pkgs")) - #t))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (with-directory-excursion "racket/src/ChezScheme" + #$(make-unpack-nanopass+stex)))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot")))) + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((lib-search-dirs + . (#f #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib"))) + (build-stamp . "") + (catalogs + . (,(string-append + "https://download.racket-lang.org/releases/" + #$(package-version this-package) + "/catalog/") + #f)))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (add-after 'install 'remove-pkgs-directory + ;; If the configured pkgs-dir exists, "pkgs.rktd" does not + ;; exist, and a lock file does not exist, commands like + ;; `raco pkg show` will try to create a lock file and fail + ;; due to the read-only store. + ;; Arguably this may be a bug in `pkg/private/lock`: + ;; see . + ;; As a workaround, remove the directory. + (lambda args + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append #$output "/share/racket/pkgs"))))))) (home-page "https://racket-lang.org") (synopsis "Racket without bundled packages such as DrRacket") (description @@ -269,7 +274,6 @@ (define (write-racket-hash alist) ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) - (define-public racket-minimal-bc-3m (hidden-package (package @@ -280,21 +284,19 @@ (define-public racket-minimal-bc-3m (prepend libffi) ;; <- only for BC variants (delete "zlib" "lz4"))) (native-inputs - `(("libtool" ,libtool) - ("racket" ,(if (%current-target-system) - racket-minimal - racket-minimal-bc-cgc)))) + (list libtool + (if (%current-target-system) + racket-minimal + racket-minimal-bc-cgc))) (arguments (substitute-keyword-arguments (package-arguments racket-minimal) ((#:configure-flags _ '()) - `(list "--enable-bconly" - ,cfg-flag:enable-racket - ,cfg-flag:enable-lt - ,cfg-flag:sh-for-rktio)) - ((#:phases usual-phases) - `(modify-phases ,usual-phases - (delete 'unpack-nanopass+stex) - (delete 'unpack-bootfiles))))) + #~(cons "--enable-bconly" + #$(racket-vm-common-configure-flags))) + ((#:phases cs-phases) + #~(modify-phases #$cs-phases + (delete 'unpack-nanopass+stex) + (delete 'unpack-bootfiles))))) (synopsis "Minimal Racket with the BC [3M] runtime system") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -309,19 +311,16 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) - (define-public racket-minimal-bc-cgc (package (inherit racket-minimal-bc-3m) (name "racket-minimal-bc-cgc") - (native-inputs - (alist-delete "racket" (package-native-inputs racket-minimal-bc-3m))) + (native-inputs (list libtool)) (arguments (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) ((#:configure-flags _ '()) - `(list "--enable-cgcdefault" - ,cfg-flag:enable-lt - ,cfg-flag:sh-for-rktio)))) + #~(cons "--enable-cgcdefault" + #$(racket-vm-common-configure-flags))))) (synopsis "Old Racket implementation used for bootstrapping") (description "This variant of the Racket BC (``before Chez'' or ``bytecode'') implementation is not recommended for general use. It uses @@ -334,47 +333,42 @@ (define-public racket-minimal-bc-cgc also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector."))) - -(define-public racket-bootstrap-chez-bootfiles - (hidden-package - (package - (inherit racket-minimal) - (name "racket-bootstrap-chez-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. - (inputs `()) - (native-inputs - `(("racket" ,(if (%current-target-system) - racket-minimal - racket-minimal-bc-3m)) - ("stex" ,@(assoc-ref (package-native-inputs chez-scheme) "stex")) - ("nanopass" ,@(assoc-ref (package-native-inputs chez-scheme) - "nanopass")))) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key inputs native-inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - ,unpack-nanopass+stex) - #t)) - (delete 'configure) - (delete 'patch-generated-file-shebangs) - (replace 'build - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (invoke (string-append (assoc-ref inputs "racket") - "/bin/racket") - "rktboot/main.rkt" - "--dest" (assoc-ref outputs "out"))) - #t)) - (delete 'check) - (delete 'install)))) - (synopsis "Chez Scheme bootfiles bootstrapped by Racket") - (description "Chez Scheme is a self-hosting compiler: building it +(define-public chez-scheme-for-racket-bootstrap-bootfiles + (package + (name "chez-scheme-for-racket-bootstrap-bootfiles") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source %racket-origin) + (inputs `()) + (native-inputs (list racket-minimal-bc-3m)) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list + #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + #$(make-unpack-nanopass+stex))) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/bin/racket") + "rktboot/main.rkt")))))) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Chez Scheme bootfiles bootstrapped by Racket") + (description "Chez Scheme is a self-hosting compiler: building it requires ``bootfiles'' containing the Scheme-implemented portions compiled for the current platform. (Chez can then cross-compile bootfiles for all other supported platforms.) @@ -389,7 +383,7 @@ (define-public racket-bootstrap-chez-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream Chez Scheme.") - (license (list license:asl2.0))))) + (license (list license:asl2.0)))) (define (racket-packages-origin name origin specs) "Extract from ORIGIN the sources for the Racket packages specified by SPECS, From patchwork Sun Feb 27 21:29:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37533 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 CA9AC27BBEC; Sun, 27 Feb 2022 21:31: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 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 6E85B27BBEB for ; Sun, 27 Feb 2022 21:31:32 +0000 (GMT) Received: from localhost ([::1]:58290 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8d-0008Ch-J5 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8D-0007Wx-99 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8C-0005K4-TU for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8C-0008EQ-P6 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 05/24] gnu: racket-minimal: Don't configure non-existant catalogs. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599743931535 (code B ref 53878); Sun, 27 Feb 2022 21:31:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:39 +0000 Received: from localhost ([127.0.0.1]:59333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7n-0008CS-AT for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:39 -0500 Received: from mail-vk1-f173.google.com ([209.85.221.173]:43918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7b-0008BS-Rz for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:28 -0500 Received: by mail-vk1-f173.google.com with SMTP id n10so4228299vkm.10 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iy7wy5qgxpANhyrx8IcVPlzMlPsMzrrgguU9zsUPqoY=; b=Y2ufFjFgPFEZ57PtFNP8D3UFgRh8+4B/bIstEJO5uK+klmCJ0Z2pbzNd9zWquOPsmz MUK8KkYYqAUhfQjDpgbEikWGXAx2ynWo2hB+rrRhcakl1mxI1dirgdzyiBbSK+BaWH9R 0LYPQTEqHzydW7Rcc71LldtcEwb2zSQMx6CWGt9BCcGl32lR36rl16vJIwpR1Zip00jF GsM/pR68xFJf/P09pxYmnb2opltBYn7c+Eh0UbNdMvsFP1GIgcOPHLm13xRKTaLox80t fHj6uwAYs9UR0c6n/5qv/QW0vluihaXIKde1Y4PTXawg+MklLcWSwGEhn2YJlZdZtFEv xDSg== 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=iy7wy5qgxpANhyrx8IcVPlzMlPsMzrrgguU9zsUPqoY=; b=iHEr/PgwmUIycvC7EXD/puDNIuSZwSTIPZ4bXTNTskc3kQfHroG8ubWv1jhIKHJeRt Suu2P3KyK2dpDXuK4MEgtRMMNIXyO+C8XjRTMI03gQL9wQK5K/GTn/qt2BhpRWj+QXmv tRBHNvN8Z8E4z3bKevRRbCJTxWsqXycUzFxs3Y7nTHkgn194veXqrd256gHipCu821BM gefEGJHLTdrSVOwZVncjB38EroBs/BScGcBA5F8kv/HbWZqX4zJG2yJLoncgxLAUI/OI /OTfR6cWADh0CwR/8GYw42aMWwqJmDVMakhL3pgpXLPc9Wuif7FUdNPbmWFHju/dLM8H 9JvA== X-Gm-Message-State: AOAM531864UmTskGCYATLOuOG9sPa4lx+eDMB9XbTMeLX0NS3St+DP0l ZXbze/SA8duNiq72ox186bWrhAHSVUS3NqZ/cK4= X-Google-Smtp-Source: ABdhPJzDkRDJWM0CwYvatkGISwFW8uaEcHilUGyBkbhtHw/Jg7WOf04i0MkclaEnzDTmow4HYf/0/g== X-Received: by 2002:a1f:1355:0:b0:333:40fd:64ce with SMTP id 82-20020a1f1355000000b0033340fd64cemr908624vkt.17.1645997422381; Sun, 27 Feb 2022 13:30:22 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id j8-20020a1fa008000000b0033190c40659sm1356958vke.37.2022.02.27.13.30.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:22 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:01 -0500 Message-Id: <20220227212920.2009000-6-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 eb87eaa492..dc392fb27d 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -231,6 +231,15 @@ (define (write-racket-hash alist) (format #t "(~s . ~s)" k v))) alist) (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) (mkdir-p "racket/etc") (with-output-to-file "racket/etc/config.rktd" (lambda () @@ -239,12 +248,8 @@ (define (write-racket-hash alist) . (#f #$(file-append (this-package-input "openssl") "/lib") #$(file-append (this-package-input "sqlite") "/lib"))) (build-stamp . "") - (catalogs - . (,(string-append - "https://download.racket-lang.org/releases/" - #$(package-version this-package) - "/catalog/") - #f)))))))) + (catalogs ,@maybe-release-catalog + #f))))))) (add-before 'configure 'chdir (lambda _ (chdir "racket/src"))) From patchwork Sun Feb 27 21:29:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37536 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 4A02627BBEA; Sun, 27 Feb 2022 21:31: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 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 8405527BBE9 for ; Sun, 27 Feb 2022 21:31:48 +0000 (GMT) Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8t-0000Ha-MJ for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8D-0007Y2-Mo for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8D-0005KP-Cb for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8D-0008EX-8Z for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to follow bootstrapping. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599744331551 (code B ref 53878); Sun, 27 Feb 2022 21:31:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:43 +0000 Received: from localhost ([127.0.0.1]:59335 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7n-0008Ca-PU for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:43 -0500 Received: from mail-vk1-f180.google.com ([209.85.221.180]:42756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7g-0008Bj-Lw for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:33 -0500 Received: by mail-vk1-f180.google.com with SMTP id l10so4243202vki.9 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Yq0zPrs4S7KllmXpGmTarSZjJiNT7KonIgGzWbcUl1Y=; b=OUmSW/s7QVEdEgzPfVifdM8cypk9YQYOloxnXDjNSZtdpLDxCUQzFP24qdrlfn64XE gYI/B8EgNjYHGyo3sLa86zDRozfhzELFhRY7NiItd41I73yXKN6JY2OxxylIM8g0jlBc KMP3GRaz2ksG4Os3avI/hvs/ySff53sjIwighdYpRHLA80ddDmKdCM7VR8OxxCKvQknf +3eHal327ub62JqDCz530j7wsIcv2kwobWqsj/WqNQSv/LaX8o+XvS3kmIUz01V6VdIo sskT0ZSqryCrQeWrUCf7pnam4/oMDWW+sLVF2/9787Cn+QRW0sp8fJN+fyhnGFFfkCUL MvDQ== 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=Yq0zPrs4S7KllmXpGmTarSZjJiNT7KonIgGzWbcUl1Y=; b=v/rpta90VsEgGqtJb53iangIgw2kJsyMFcThc1idQi7Mu2AHhXN7Y6Tj9D9rS2XUKw 30FqZIT+0i17By7cfasc/xu7evKj0cIt09IeVQz4DtQ9uzseyT7Xcwyxu/nS7EP1KSuQ 9eoVX2LY75rMxCBvLE//6V37vwpoLreXNZCEs5J6QnJT7KzYYFgKk5jn2Q8fajx6q77l FXrTT0CJP3HaGMZjnsqdvAWqSubipOSlpEPjfBxFAQ0nAmCgQVHWDudc2yprAYKWLD6t 9J2UIa22PtIAZ3UL6KEC/W0RIyGyTAaXetiwdplVHar26f6fNfw/zw0Trn0TOLuGD+Xh OQKw== X-Gm-Message-State: AOAM533YBPxwzLEZNM9ppi/NwskGU7AE8Bmg1ZY8tfmxU59SNsMSi24Y s4ra3iZ7kvJ/RSzXHls9S1P91YL7ip1Dy5yness= X-Google-Smtp-Source: ABdhPJyIScgLbtYGJ2jkelUAfR/y+xuLRKv5wVUUVcnyZTBHCfXUayhndVUHRsRJ7zMb7uB0JOSNag== X-Received: by 2002:a05:6122:17a6:b0:31e:d699:29e0 with SMTP id o38-20020a05612217a600b0031ed69929e0mr7188430vkf.1.1645997426938; Sun, 27 Feb 2022 13:30:26 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id w123-20020a1fdf81000000b003322033e617sm1535459vkg.36.2022.02.27.13.30.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:26 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:02 -0500 Message-Id: <20220227212920.2009000-7-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Having the package inheritance chain go in the same direction as the bootstrapping chain, rather than the opposite, is less confusing. In some cases, it can also help to avoid unnecessary rebuilds. * gnu/packages/racket.scm (racket-minimal-bc-cgc): Change to be the root of the package inheritance chain. [version, source, inputs, native-inputs, build-system, arguments, home-page, license]: Inline formerly inherited values. (racket-minimal-bc-3m): Inherit from 'racket-minimal-bc-cgc' rather than 'racket-minimal'. [inputs, native-inputs, arguments, license]: Adjust accordingly. (racket-minimal): Inherit from 'racket-minimal-bc-3m'. [inputs, native-inputs, arguments, license]: Adjust accordingly. [properties]: Override effect of 'hidden-package'. --- gnu/packages/racket.scm | 130 +++++++++++++++++++++------------------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index dc392fb27d..8d12a96f22 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Pierre Neidhardt -;;; Copyright © 2021 Philip McGrath +;;; Copyright © 2021, 2022 Philip McGrath ;;; Copyright © 2021 jgart ;;; ;;; This file is part of GNU Guix. @@ -172,9 +172,9 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) -(define-public racket-minimal +(define-public racket-minimal-bc-cgc (package - (name "racket-minimal") + (name "racket-minimal-bc-cgc") (version %racket-version) (source %racket-origin) (inputs @@ -184,19 +184,14 @@ (define-public racket-minimal sqlite bash-minimal ;; <- for `system` ncurses ;; <- for #%terminal - ;; only for CS - zlib - lz4)) - (native-inputs - (list chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m)) + ;; only for BC variants: + libffi)) + (native-inputs (list libtool)) ;; <- only for BC variants (build-system gnu-build-system) (arguments (list #:configure-flags - #~(cons* "--enable-csonly" - "--enable-libz" - "--enable-lz4" + #~(cons* "--enable-cgcdefault" #$(racket-vm-common-configure-flags)) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main @@ -210,17 +205,6 @@ (define-public racket-minimal (guix build utils)) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'unpack-nanopass+stex - (lambda args - (with-directory-excursion "racket/src/ChezScheme" - #$(make-unpack-nanopass+stex)))) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (search-input-directory (or native-inputs inputs) - "lib/chez-scheme-bootfiles") - "boot")))) (add-before 'configure 'initialize-config.rktd (lambda* (#:key inputs #:allow-other-keys) (define (write-racket-hash alist) @@ -265,43 +249,37 @@ (define maybe-release-catalog ;; rmdir because we want an error if it isn't empty (rmdir (string-append #$output "/share/racket/pkgs"))))))) (home-page "https://racket-lang.org") - (synopsis "Racket without bundled packages such as DrRacket") - (description - "Racket is a general-purpose programming language in the Scheme family, -with a large set of libraries and a compiler based on Chez Scheme. Racket is -also a platform for language-oriented programming, from small domain-specific -languages to complete language implementations. + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or +``bytecode'') implementation is not recommended for general use. It uses +CGC (a ``Conservative Garbage Collector''), which was succeeded as default in +PLT Scheme version 370 (which translates to 3.7 in the current versioning +scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the +Racket CS implementation. -The ``minimal Racket'' distribution includes just enough of Racket for you to -use @command{raco pkg} to install more. Bundled packages, such as the -DrRacket IDE, are not included.") +Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +also be used for embedding applications without the annotations needed in C +code to use the 3M garbage collector.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. - (license (list license:asl2.0 license:expat)))) + (license (list license:lgpl3+ license:asl2.0 license:expat)) + ;; Eventually, it may make sense for some vm packages to not be hidden, + ;; but this one is especially likely to remain hidden. + (properties `((hidden? . #t))))) (define-public racket-minimal-bc-3m (hidden-package (package - (inherit racket-minimal) + (inherit racket-minimal-bc-cgc) (name "racket-minimal-bc-3m") - (inputs - (modify-inputs (package-inputs racket-minimal) - (prepend libffi) ;; <- only for BC variants - (delete "zlib" "lz4"))) (native-inputs - (list libtool - (if (%current-target-system) - racket-minimal - racket-minimal-bc-cgc))) + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (prepend racket-minimal-bc-cgc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal) + (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))) - ((#:phases cs-phases) - #~(modify-phases #$cs-phases - (delete 'unpack-nanopass+stex) - (delete 'unpack-bootfiles))))) + #$(racket-vm-common-configure-flags))))) (synopsis "Minimal Racket with the BC [3M] runtime system") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written @@ -316,27 +294,53 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) -(define-public racket-minimal-bc-cgc +(define-public racket-minimal (package (inherit racket-minimal-bc-3m) - (name "racket-minimal-bc-cgc") - (native-inputs (list libtool)) + (name "racket-minimal") + (inputs + (modify-inputs (package-inputs racket-minimal-bc-cgc) + (prepend zlib lz4) + (delete "libffi"))) + (native-inputs + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (delete "libtool") + (prepend chez-scheme-for-racket-bootstrap-bootfiles + racket-minimal-bc-3m))) (arguments (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) + ((#:phases bc-phases) + #~(modify-phases #$bc-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (with-directory-excursion "racket/src/ChezScheme" + #$(make-unpack-nanopass+stex)))) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "racket/src/ChezScheme" + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot")))))) ((#:configure-flags _ '()) - #~(cons "--enable-cgcdefault" - #$(racket-vm-common-configure-flags))))) - (synopsis "Old Racket implementation used for bootstrapping") - (description "This variant of the Racket BC (``before Chez'' or -``bytecode'') implementation is not recommended for general use. It uses -CGC (a ``Conservative Garbage Collector''), which was succeeded as default in -PLT Scheme version 370 (which translates to 3.7 in the current versioning -scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the -Racket CS implementation. + #~(cons* "--enable-csonly" + "--enable-libz" + "--enable-lz4" + #$(racket-vm-common-configure-flags))))) + (synopsis "Racket without bundled packages such as DrRacket") + (description + "Racket is a general-purpose programming language in the Scheme family, +with a large set of libraries and a compiler based on Chez Scheme. Racket is +also a platform for language-oriented programming, from small domain-specific +languages to complete language implementations. -Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may -also be used for embedding applications without the annotations needed in C -code to use the 3M garbage collector."))) +The ``minimal Racket'' distribution includes just enough of Racket for you to +use @command{raco pkg} to install more. Bundled packages, such as the +DrRacket IDE, are not included.") + (properties `()) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) (define-public chez-scheme-for-racket-bootstrap-bootfiles (package From patchwork Sun Feb 27 21:29:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37534 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 277F527BBEB; Sun, 27 Feb 2022 21:31:33 +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 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 0BC4927BBE9 for ; Sun, 27 Feb 2022 21:31:32 +0000 (GMT) Received: from localhost ([::1]:58336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8d-0008El-5P for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:31:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40396) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR8E-0007ZN-5p for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37219) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR8D-0005Ka-RO for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR8D-0008Ef-O3 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:31:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 07/24] gnu: racket-minimal: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:31:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599744431558 (code B ref 53878); Sun, 27 Feb 2022 21:31:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:44 +0000 Received: from localhost ([127.0.0.1]:59338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7r-0008Cq-DM for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:44 -0500 Received: from mail-vs1-f51.google.com ([209.85.217.51]:41676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7l-0008C0-5o for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:37 -0500 Received: by mail-vs1-f51.google.com with SMTP id y26so11061086vsq.8 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j2uLNLMZ4C94s2HgKMi8CoFqkGqCaSTgS1AwtHFkZuo=; b=ZgzjZfNolg9pMIswd+vNmzEcqjSCEQBkMBWsbTpzSpM/hog68cEXxmKDJRhv0lYwU+ TjcMRIqzGoPTWporCrjWLQCS1u4Q1rhRrFoU0LH9C5pFC9lPnOxOTe2H/FjpP+ktaFr3 3ZeTzG4ex/zbfykcprvXYAfzkpVC1EfS6ALVq/XCWzrpGTcT8S9LGfw4p0afA+HNuzMT PrQZSkzl5uAjRWPNmKJGmqqF8F7ECFFescJm2l87MzXjclW9K3hjRUlS7p/ccCKDMY/u iIvbEMTpS6h389Kbg44VrVn3aXYSngZa7szyclC69lKzvWmUNERtEO35Iwo21tnVq8Qj R5SA== 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=j2uLNLMZ4C94s2HgKMi8CoFqkGqCaSTgS1AwtHFkZuo=; b=bW9s6Ogg3w9QRaIU6bMNZVCsuqTwGSBkAIXKix6EZE1S2uL9hTw2kNAMVW/ZQeh2I5 zbi5YLma4OwBaCZgBIdUAu/8HTvfPg7GK+0BHCBfCBotrEP6IFltadIb/sBwZzsOHUGg V3wUwsOJ8o84mzz6mRdWP+Ed+G+vavAGHgnJjRqbU4fX0XKJbPWIIhi6vS+oFiDs8JvU tUZYUzlipzTjyMXMThtkjM6tV3dQtwhLAGBzwYG3HNzR8ZObjaT5I/N79bYwl2jD1nd1 BdqrSJQ/6ZKBfg0BdUUPMJwt5z8AAhlC+5Jhb/WH1WHa4YtQhokp7/48KRYKPISfBjDq yOMA== X-Gm-Message-State: AOAM531BxRQaIk58cOrS7W+gHX+vI70wmlbS/Etoye9LgZcznMdRXaDK OVxDqYXL12mzdXV+qrt8CqdQXSWgO3zFwc1HwNE= X-Google-Smtp-Source: ABdhPJyuSOWW2lRX3LMY747YLItRKHnAXEEPIPwL3piEMiGaUqhtS3bafUd9Z1DlvO2aOGtBD5v3zw== X-Received: by 2002:a67:c787:0:b0:31e:874e:b9a3 with SMTP id t7-20020a67c787000000b0031e874eb9a3mr1684593vsk.54.1645997431506; Sun, 27 Feb 2022 13:30:31 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id n22-20020a1fa416000000b0031e658fd080sm1354591vke.43.2022.02.27.13.30.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:31 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:03 -0500 Message-Id: <20220227212920.2009000-8-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/racket.scm (racket-minimal-bc-cgc): Use 'hidden-package' rather than 'properties'. (racket-minimal-bc-3m): Remove redundant 'hidden-package' wrapper. --- gnu/packages/racket.scm | 201 ++++++++++++++++++++-------------------- 1 file changed, 100 insertions(+), 101 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 8d12a96f22..3667f2df9d 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -173,84 +173,87 @@ (define (make-unpack-nanopass+stex) (define-public racket-minimal-bc-cgc - (package - (name "racket-minimal-bc-cgc") - (version %racket-version) - (source %racket-origin) - (inputs - (list - ;; common to all racket-minimal variants: - openssl - sqlite - bash-minimal ;; <- for `system` - ncurses ;; <- for #%terminal - ;; only for BC variants: - libffi)) - (native-inputs (list libtool)) ;; <- only for BC variants - (build-system gnu-build-system) - (arguments - (list - #:configure-flags - #~(cons* "--enable-cgcdefault" - #$(racket-vm-common-configure-flags)) - ;; Tests are in packages like racket-test-core and - ;; main-distribution-test that aren't part of the main - ;; distribution. - #:tests? #f - ;; Upstream recommends #:out-of-source?, and it does - ;; help with debugging, but it confuses `install-license-files`. - #:modules '((ice-9 match) - (ice-9 regex) - (guix build gnu-build-system) - (guix build utils)) - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (define maybe-release-catalog - (let ((v #$(package-version this-package))) - (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" - v) - `(,(string-append - "https://download.racket-lang.org/releases/" - v - "/catalog/")) - '()))) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f #$(file-append (this-package-input "openssl") "/lib") - #$(file-append (this-package-input "sqlite") "/lib"))) - (build-stamp . "") - (catalogs ,@maybe-release-catalog - #f))))))) - (add-before 'configure 'chdir - (lambda _ - (chdir "racket/src"))) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda args - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append #$output "/share/racket/pkgs"))))))) - (home-page "https://racket-lang.org") - (synopsis "Old Racket implementation used for bootstrapping") - (description "This variant of the Racket BC (``before Chez'' or + ;; Eventually, it may make sense for some vm packages to not be hidden, + ;; but this one is especially likely to remain hidden. + (hidden-package + (package + (name "racket-minimal-bc-cgc") + (version %racket-version) + (source %racket-origin) + (inputs + (list + ;; common to all racket-minimal variants: + openssl + sqlite + bash-minimal ;; <- for `system` + ncurses ;; <- for #%terminal + ;; only for BC variants: + libffi)) + (native-inputs (list libtool)) ;; <- only for BC variants + (build-system gnu-build-system) + (arguments + (list + #:configure-flags + #~(cons* "--enable-cgcdefault" + #$(racket-vm-common-configure-flags)) + ;; Tests are in packages like racket-test-core and + ;; main-distribution-test that aren't part of the main + ;; distribution. + #:tests? #f + ;; Upstream recommends #:out-of-source?, and it does + ;; help with debugging, but it confuses `install-license-files`. + #:modules '((ice-9 match) + (ice-9 regex) + (guix build gnu-build-system) + (guix build utils)) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((lib-search-dirs + . (#f #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib"))) + (build-stamp . "") + (catalogs ,@maybe-release-catalog + #f))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (add-after 'install 'remove-pkgs-directory + ;; If the configured pkgs-dir exists, "pkgs.rktd" does not + ;; exist, and a lock file does not exist, commands like + ;; `raco pkg show` will try to create a lock file and fail + ;; due to the read-only store. + ;; Arguably this may be a bug in `pkg/private/lock`: + ;; see . + ;; As a workaround, remove the directory. + (lambda args + ;; rmdir because we want an error if it isn't empty + (rmdir (string-append #$output "/share/racket/pkgs"))))))) + (home-page "https://racket-lang.org") + (synopsis "Old Racket implementation used for bootstrapping") + (description "This variant of the Racket BC (``before Chez'' or ``bytecode'') implementation is not recommended for general use. It uses CGC (a ``Conservative Garbage Collector''), which was succeeded as default in PLT Scheme version 370 (which translates to 3.7 in the current versioning @@ -260,28 +263,24 @@ (define maybe-release-catalog Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector.") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:lgpl3+ license:asl2.0 license:expat)) - ;; Eventually, it may make sense for some vm packages to not be hidden, - ;; but this one is especially likely to remain hidden. - (properties `((hidden? . #t))))) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:lgpl3+ license:asl2.0 license:expat))))) (define-public racket-minimal-bc-3m - (hidden-package - (package - (inherit racket-minimal-bc-cgc) - (name "racket-minimal-bc-3m") - (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) - (prepend racket-minimal-bc-cgc))) - (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) - ((#:configure-flags _ '()) - #~(cons "--enable-bconly" - #$(racket-vm-common-configure-flags))))) - (synopsis "Minimal Racket with the BC [3M] runtime system") - (description "The Racket BC (``before Chez'' or ``bytecode'') + (package + (inherit racket-minimal-bc-cgc) + (name "racket-minimal-bc-3m") + (native-inputs + (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (prepend racket-minimal-bc-cgc))) + (arguments + (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) + ((#:configure-flags _ '()) + #~(cons "--enable-bconly" + #$(racket-vm-common-configure-flags))))) + (synopsis "Minimal Racket with the BC [3M] runtime system") + (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written in C targeting architecture-independent bytecode, plus a JIT compiler on most platforms. Racket BC has a different C API and supports a slightly different @@ -290,9 +289,9 @@ (define-public racket-minimal-bc-3m This package is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:lgpl3+ license:asl2.0 license:expat))))) + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:lgpl3+ license:asl2.0 license:expat)))) (define-public racket-minimal (package From patchwork Sun Feb 27 21:29:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37541 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 90D3427BBE9; Sun, 27 Feb 2022 21:32: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 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 3C6F127BBEA for ; Sun, 27 Feb 2022 21:32:39 +0000 (GMT) Received: from localhost ([::1]:59996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9i-00013W-Cd for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR98-0000VV-Lx for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR98-0005eZ-CY for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR98-0008HJ-8y for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 08/24] gnu: racket-minimal: Add "debug" output. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599746931688 (code B ref 53878); Sun, 27 Feb 2022 21:32:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:09 +0000 Received: from localhost ([127.0.0.1]:59352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8H-0008F0-DI for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:09 -0500 Received: from mail-vk1-f175.google.com ([209.85.221.175]:33642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7p-0008CG-D1 for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:41 -0500 Received: by mail-vk1-f175.google.com with SMTP id j12so4269128vkr.0 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xAGhlobUrv6R3QAGOokifFB+qZOGf5hUiwmZev5zvws=; b=TrA+/F4GkzQYXsuIYzsMIwjp6oLAEZvS2JJJ2FPsziUIw+C81SWezNWSzt0G9RWYsw oiJWgjKlde7LikRmqlXtgFKFTyZiXRhDoz7DmdoU44dtViWGInzVCkCDCLNsVT4oIoK1 wNJRood3a1kl8opStG8hhyt+BK1uiBSdHMxBH63urxO5moJD5QwDm05LeKbOwTVK3tUu QKIvMHwoH3RSuLvuqDPWD+rZNdZhjn4kFiQNQjf4Ei3fUppgsBkZitxdTaNovc/q7PRu zeoKVBFVNx65rZcbZhw8oSLvyXDavUrG/GqLD3UKnJctZeWOkmwrW9WDjx7mF1IMXEtw c4AA== 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=xAGhlobUrv6R3QAGOokifFB+qZOGf5hUiwmZev5zvws=; b=uMjF/fvE1AxUaE476S0uK2PMthjTwTbmMPbbH0LLn5V2nh0w04v+cd4cRO7RVDC8sT 7b0tJwjJhRQy+1iD2lnp0ZwJNyg7tJ58EjS4+hQGQi8s5p+E7aHmgnRejLCZiF6D8l5b 20N/gvw0rmImOK2FC2l7DbTcQWmB7RYP5Z/hQSw74i5uJSqZtalJ3o8X9jL+7f7WzPoG BiXSpPCEL4LSU0IcKwlY6DgBJuVkMfhG6zfooXy/xib6meexNqBoXQQezV3puVumS3WV P7MkabNI0J4ujK3TO1TdYRAkZ8yQvkhMcHtqDfUrOjhziRGVkLpV4Ea2Iwx+Vw07v6+e 37JQ== X-Gm-Message-State: AOAM531c9QnmZEUHBNG+7dii4bkqzI1MfPZF4j9I51nMSEIs/6DMPODU vmoyJeq1gaalipotZ1vEHM88lNdV4bgHT2UVir4= X-Google-Smtp-Source: ABdhPJwaEV07mAOBu+EALknf7B+/zXCDRdtVELZNAszt/jDXDBY2ufe+LqfJE462qm/SjYU4QjS9sQ== X-Received: by 2002:a05:6122:17a6:b0:32d:9ed1:eccd with SMTP id o38-20020a05612217a600b0032d9ed1eccdmr6772760vkf.9.1645997435912; Sun, 27 Feb 2022 13:30:35 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id x21-20020ab03815000000b0034295887a5bsm1287242uav.2.2022.02.27.13.30.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:35 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:04 -0500 Message-Id: <20220227212920.2009000-9-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 3667f2df9d..011577cc2e 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -151,7 +151,8 @@ (define (racket-vm-common-configure-flags) (else '())) ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" - #$(file-append bash-minimal "/bin/sh")))) + #$(file-append bash-minimal "/bin/sh")) + "--disable-strip")) (define (make-unpack-nanopass+stex) ;; Adapted from chez-scheme. @@ -190,6 +191,7 @@ (define-public racket-minimal-bc-cgc ;; only for BC variants: libffi)) (native-inputs (list libtool)) ;; <- only for BC variants + (outputs '("out" "debug")) (build-system gnu-build-system) (arguments (list From patchwork Sun Feb 27 21:29:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37537 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 F1EA327BBEB; Sun, 27 Feb 2022 21:32:27 +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 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 5CF6627BBEA for ; Sun, 27 Feb 2022 21:32:27 +0000 (GMT) Received: from localhost ([::1]:59270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9W-0000Vq-De for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR99-0000Vc-1F for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR98-0005ej-P6 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR98-0008HQ-La for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 09/24] gnu: configure-layer.rkt: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599747031698 (code B ref 53878); Sun, 27 Feb 2022 21:32:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:10 +0000 Received: from localhost ([127.0.0.1]:59354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8H-0008F3-NR for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:10 -0500 Received: from mail-ua1-f48.google.com ([209.85.222.48]:36505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7u-0008Ch-5o for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:46 -0500 Received: by mail-ua1-f48.google.com with SMTP id t25so5115051uaa.3 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:46 -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=PutN4x7jn6ODMb7ESFDxkatnHChHdH/PL2YoIfBEHJk=; b=YnS7e0SOeJ+O+8baFRg7g1XaHQmczNeyJWouiE4NittF04DjwcDIVYyNpUDVIbDJf6 vihqlJKD8WrpCQIRcc18SBSglxV+V9w4ybVqsXEKWKGkNcVfp60VSmgwF47xBjaUikUh jidJJSxXfvD6oiekp61rtsoniEk0hvUPI1odsJe45aEqWeiyJyUrHvpjVznetZOMrq+S Zt3Og4L3TUfjSu32rqAMcz1sK7urW9GeiDArTwI4l1nWDNlW4oTI3BMzgaciqGNqscC5 WfAeS6eFb52ndXGvLeqMlBpUThgNb9MTJCtvPiGuCL07L3W80a2xt7c3d60X1CuvFhZf 0ZBg== 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=PutN4x7jn6ODMb7ESFDxkatnHChHdH/PL2YoIfBEHJk=; b=lKedBHTbAYbh5fX2jARs7ZAlav+RctPDWuf5BbPCH0KpJWPT5DDl8MjzhchW9TI+FX Vqvmk769uG0EL/vvMDAxGBlVujEDBoDereJTzZfrJd4iLt1/nKgLODhPaZsS1iGbsNlH u/NjOnPeg9pjEJrxDcLLdpMSLRRXoLeQcP16XlhM1ojvS2fM3aDwST1/687hs36+qSba GAXzOBmCHW52A9U975pN3TydouZGtEFarSgGT/IQYAWmpfcS67d9JxNrS1OrItbQ1qAs 6dtz1FellGF/RvZktmxXgOcags//C/G+a9QN6ANEjYAWmLWrYeBeJCIYEDWvkZbyOPpc +P6w== X-Gm-Message-State: AOAM5326tnpS8arycmw7zIJUGVV/FHZ75R2YzzZa+8fZaB8vBxdLinJ+ xNNB34RaA8ClVZlNLNjM33VZmf3eT9HZ/rHzZrk= X-Google-Smtp-Source: ABdhPJxpd9rpWpB8fqmjJEe/qCv4q0E0FvT+JcN0hGnEIZrjg2AI8VVQjUElsmPIf6Et/mXSxxlJ8w== X-Received: by 2002:ab0:30d6:0:b0:341:eb4f:d2d2 with SMTP id c22-20020ab030d6000000b00341eb4fd2d2mr7172073uam.103.1645997440592; Sun, 27 Feb 2022 13:30:40 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id b5-20020a1f1b05000000b0032597a7ba97sm1550366vkb.9.2022.02.27.13.30.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:40 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:05 -0500 Message-Id: <20220227212920.2009000-10-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/racket.scm (configure-layer.rkt): Wrap 'command-line' in 'define-values' to reduce rightward drift. --- gnu/packages/racket.scm | 164 ++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 81 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 011577cc2e..3877837d38 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -926,84 +926,86 @@ (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) (define extra-foreign-lib-search-dirs '()) - (command-line - #:once-each - [("--extra-foreign-lib-search-dirs") dir-list - "foreign library directories, as a list of strings in `read` syntax" - (set! extra-foreign-lib-search-dirs - (call-with-input-string dir-list read))] - #:args (parent-layer prefix) - (let* ([config - (for/fold - ([config (file->value (build-path parent-layer - config-file-pth))]) - ([spec (in-list - '((lib-dir lib-search-dirs "lib/racket") - (share-dir share-search-dirs "share/racket") - (links-file - links-search-files - "share/racket/links.rktd") - (pkgs-dir pkgs-search-dirs "share/racket/pkgs") - (bin-dir bin-search-dirs "bin") - (man-dir man-search-dirs "share/man") - (doc-dir doc-search-dirs "share/doc/racket") - (include-dir - include-search-dirs - "include/racket")))]) - (match-define (list main-key search-key pth) spec) - (hash-set* - config - main-key - (build-path-string prefix pth) - search-key - (list* #f - (hash-ref config - main-key - (build-path-string parent-layer pth)) - (filter values (hash-ref config search-key null)))))] - [config - (hash-update config - 'lib-search-dirs - (lambda (dirs) - ;; add after other layers, but before older - ;; foreign lib search directories - (define-values [rkt old-foreign-dirs] - (partition (lambda (pth) - (or (not pth) - (regexp-match? rx:racket pth))) - dirs)) - (append rkt - extra-foreign-lib-search-dirs - old-foreign-dirs)))] - [config - (hash-set* config - 'apps-dir - (build-path-string prefix "share/applications") - 'absolute-installation? #t - ;; Let Guix coexist with other installation - ;; methods without clobbering user-specific packages. - ;; This could be set in various places, but doing - ;; it here is convienient, at least until we support - ;; cross-compilation. - 'installation-name - (string-append (version) - "-guix" - (match (system-type 'gc) - ['cgc "-cgc"] - ;; workaround Guile reader/printer: - ['|3m| "-bc"] - [_ ""])))] - [bin-dir - (hash-ref config 'bin-dir)] - [config - (hash-set* config - 'config-tethered-apps-dir (hash-ref config 'apps-dir) - 'config-tethered-console-bin-dir bin-dir - 'config-tethered-gui-bin-dir bin-dir)] - [new-config-pth - (build-path prefix config-file-pth)]) - (make-parent-directory* new-config-pth) - (call-with-output-file* - new-config-pth - (lambda (out) - (pretty-write config out)))))))) + (define-values [parent-layer prefix] + (command-line + #:once-each + [("--extra-foreign-lib-search-dirs") dir-list + "foreign library directories, as a list of strings in `read` syntax" + (set! extra-foreign-lib-search-dirs + (call-with-input-string dir-list read))] + #:args (parent-layer prefix) + (values parent-layer prefix))) + (let* ([config + (for/fold + ([config (file->value (build-path parent-layer + config-file-pth))]) + ([spec (in-list + '((lib-dir lib-search-dirs "lib/racket") + (share-dir share-search-dirs "share/racket") + (links-file + links-search-files + "share/racket/links.rktd") + (pkgs-dir pkgs-search-dirs "share/racket/pkgs") + (bin-dir bin-search-dirs "bin") + (man-dir man-search-dirs "share/man") + (doc-dir doc-search-dirs "share/doc/racket") + (include-dir + include-search-dirs + "include/racket")))]) + (match-define (list main-key search-key pth) spec) + (hash-set* + config + main-key + (build-path-string prefix pth) + search-key + (list* #f + (hash-ref config + main-key + (build-path-string parent-layer pth)) + (filter values (hash-ref config search-key null)))))] + [config + (hash-update config + 'lib-search-dirs + (lambda (dirs) + ;; add after other layers, but before older + ;; foreign lib search directories + (define-values [rkt old-foreign-dirs] + (partition (lambda (pth) + (or (not pth) + (regexp-match? rx:racket pth))) + dirs)) + (append rkt + extra-foreign-lib-search-dirs + old-foreign-dirs)))] + [config + (hash-set* config + 'apps-dir + (build-path-string prefix "share/applications") + 'absolute-installation? #t + ;; Let Guix coexist with other installation + ;; methods without clobbering user-specific packages. + ;; This could be set in various places, but doing + ;; it here is convienient, at least until we support + ;; cross-compilation. + 'installation-name + (string-append (version) + "-guix" + (match (system-type 'gc) + ['cgc "-cgc"] + ;; workaround Guile reader/printer: + ['|3m| "-bc"] + [_ ""])))] + [bin-dir + (hash-ref config 'bin-dir)] + [config + (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [new-config-pth + (build-path prefix config-file-pth)]) + (make-parent-directory* new-config-pth) + (call-with-output-file* + new-config-pth + (lambda (out) + (pretty-write config out))))))) From patchwork Sun Feb 27 21:29:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37542 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 4737227BBEB; Sun, 27 Feb 2022 21:32:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 67B9927BBE9 for ; Sun, 27 Feb 2022 21:32:42 +0000 (GMT) Received: from localhost ([::1]:60134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9l-00019M-KE for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR99-0000Vl-Gp for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37242) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR99-0005es-79 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR99-0008HX-3C for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 10/24] gnu: racket-minimal: Separate from the Racket VM. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599747331712 (code B ref 53878); Sun, 27 Feb 2022 21:32:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:13 +0000 Received: from localhost ([127.0.0.1]:59356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8I-0008FD-DS for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:12 -0500 Received: from mail-vk1-f172.google.com ([209.85.221.172]:43926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR7z-0008D4-4s for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:53 -0500 Received: by mail-vk1-f172.google.com with SMTP id n10so4228496vkm.10 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30: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=s6PbiGG76msk/ngvjWkLShHaLkGIf3xO1MahtysX1XY=; b=g6e2CUuJz7VAZWf9+pg0AK/DD3sCS1KqvI+cja928NPqKp4s8Pd2HIlPgA/T/kdX6K VX06qDOU4CYxxxrh6YypP6+hsAXPrX8wls25g9X+XRnXYiPdRysQ+ILwGiA+tib8X70U +Ye2CHwrug0bz/laGSJBFToe+LRdlrSSI3/M2uz+LCy3iPXDGzDyeF70BuGH7Fc8w+Cg 25aCPNWAb0e9gRPn+d+vWgLfzHdZS/f6WTCLSoAap9tI+/viuS0jZ2d/4Qf3aBjJLERr 1zrR87BhbTsQ3yQkUNr8nZ07qWrihE751llKCfyAyJePKdj6xDCJYV+mvvl4VWsd8S8a KsCQ== 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=s6PbiGG76msk/ngvjWkLShHaLkGIf3xO1MahtysX1XY=; b=fZJ3IMvSazLUwWJfhpdYzlFF9KePSJPamNll7ubXOHs5PHnlsdf/PQZV/+qyCffN8T cegQoSSxw53PfMdsklUtZzMWid5XnD3sRJYzItMnzkAFIB+ZfEe0CL0lRa/9B9DBYPtF ar7gtp+QZh0i2wJ4lg/P5MwbxVaeyB/1WtvBrRFaqYVabzlSoixMivHxgoq86+/B2ED4 iYFYnwiDv+xRjAtXSQDpVtyn2Sk5bg5cDQNhWPIbxYjBEMbtI9INDvef39Yy0UWtmVOq +8ezrmbj3F6Pm1KMBsmqKsL599v17zlga4Ck+LgCkF6iR3EfeDy+DfFwGhSfZuyCGEH/ HUdw== X-Gm-Message-State: AOAM531Tc/K1BTURKrYQj5T+vV+Sw/Cj/sZksYagVFuvl+uYJD7ujPYC 3uWdEzCZE+eZ8T2eDmud1OI8BO7PFkiQ4w5QwS0= X-Google-Smtp-Source: ABdhPJxNqdkRwK8iHtdhqE8bAUzh1YSVPxPu3JOOOn4aRooTOV4xPtt22CZZjCTKSLZ6AAcx9JKLGQ== X-Received: by 2002:a05:6122:88a:b0:332:6860:7b1f with SMTP id 10-20020a056122088a00b0033268607b1fmr6851424vkf.25.1645997445075; Sun, 27 Feb 2022 13:30: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 d68-20020a1fcd47000000b0032db22e6d18sm1360352vkg.50.2022.02.27.13.30.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:44 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:06 -0500 Message-Id: <20220227212920.2009000-11-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches For consistency with other Racket distributions, 'racket-minimal' should have the "racket-lib" Racket package installed: see . Happily, this gives us a clean boundary between the core Racket VM and compiler, with all of the bootstrapping involved, and building Racket packages and installation layers, which can be handled in a nice, uniform way and eventually turned into a 'racket-build-system'. Building the VM layer as an "in-place" installation should help us use it with other Racket tools. * gnu/packages/racket.scm (racket-vm-common-configure-flags): Add "--enable-origtree". Adapt "--enable-racket=" for "opt/racket-vm/" prefix. (racket-minimal-bc-cgc): Rename to ... (racket-vm-cgc): ... this new variable. [inputs]: Move 'openssl' and 'sqlite' to new 'racket-minimal'. [arguments]<#:strip-directories>: Use "opt/racket-vm/" prefix. <#:phases>: Wrap 'configure', 'patch-shebangs', 'validate-runpath', 'make-dynamic-linker-cache', and 'patch-dot-desktop-files' to use "opt/racket-vm/" prefix. Adapt 'initialize-config.rktd' for removal of 'openssl' and 'sqlite'. [description]: Tweak. (racket-minimal-bc-3m): Rename to ... (racket-vm-bc): ... this new variable. [synopsis, description]: Tweak. (racket-vm-cs): New variable, adapted from the old 'racket-minimal'. (chez-scheme-for-racket-bootstrap-bootfiles)[arguments]<#:phhases>: Adapt to the "opt/racket-vm/" prefix. (racket-minimal): Rewrite like 'racket' using 'racket-vm-cs'. (racket): Inherit from 'racket-minimal'. [inputs]: Add 'racket-vm-cs'. Move "racket-lib" and "base" to 'racket-minimal'. [arguments]<#:make-flags, #:configure-flags>: Override from 'racket-minimal'. (configure-layer.rkt): Adapt to support in-place VM build with possible intermediate layer. --- gnu/packages/racket.scm | 599 ++++++++++++++++++++++++++-------------- 1 file changed, 386 insertions(+), 213 deletions(-) diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 3877837d38..d3d3eb2bbd 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -54,7 +54,91 @@ (define-module (gnu packages racket) ;; Commentary: ;; -;; Here's how bootstrapping minimal Racket works: +;; Anatomy of Racket: +;; ------------------ +;; +;; The main Racket Git repository () is +;; organized broadly like this: +;; +;; . +;; ├── Makefile +;; ├── pkgs/ +;; └── racket/ +;; ├── collects/ +;; └── src/ +;; ├── configure +;; ├── Makefile.in +;; ├── bc/ +;; ├── cs/ +;; ├── ChezScheme/ +;; └── ... +;; +;; The 'racket/src/' directory contains the source of the runtime system, core +;; compiler, and primitives for the major Racket implementations: this layer +;; is called the ``Racket VM''. It is basically a normal autotools +;; project. (Even when Racket VM implementations use components implemented in +;; Racket, they are compiled in special modes to produce VM primitives.) +;; (There are or have been experimental Racket VM implementations elsewhere, +;; e.g. .) +;; +;; The 'racket/collects/' directory contains ``built in'' Racket libraries +;; that are not part of any package, including the implementation of +;; 'racket/base': in particular, it must contain enough to implement `raco pkg +;; install'. It is theoretically possible to use the Racket VM layer without +;; the main collections, but it is not stable or useful. +;; +;; The 'pkgs/' directory contains Racket packages that are especially closely +;; tied to the implementation of the Racket VM, including 'compiler-lib', +;; 'racket-doc', and 'racket-test'. Some of these packages depend on Racket +;; packages that are developed in other Git repositories, predominantly but +;; not exclusively under the 'racket' GitHub organization. Conversely, not all +;; of the packages developed in the main Git repository are part of the main +;; Racket distribution. (Additionally, components of the Racket VM that are +;; implemented in Racket can be installed as packages, mostly for ease of +;; development.) +;; +;; The top-level 'Makefile' is more like a directory of scripts: it has +;; convienience targets for developing Racket, and it cooperates with the +;; 'distro-build' package to assemble custom Racket distributions. It is not +;; part of Racket source distributions: the root of a source distribution is +;; basically 'racket/src' with some extra package sources and configuration +;; added. +;; +;; A ''minimal Racket'' installation includes two packages: 'base', which is a +;; sort of bridge between the current ``built-in'' collections and the package +;; system's model of dependencies, and 'racket-lib', which, for installations +;; that can not rely on a system package manager, pulls in the SQLite and +;; OpenSSL shared libraries as platform-specific dependencies for use by the +;; ``built-in'' collections. +;; +;; The main Racket distribution consists of installing the 'main-distribution' +;; package and all of its dependencies. +;; +;; The default mode when building Racket (or installing it with the released +;; installers) is an ``in-place build'', which produces a self-contained, +;; relocatable, roughly FHS-like directory. (Racket also supports +;; ``Unix-style'' installations, which rearrange the parts of an in-place +;; build into Racket-specific subdirectories and generally tries to work for +;; installation into an FHS-based system.) Certain tools, e.g. 'distro-build' +;; and 'raco cross', are able to work with an in-place Racket build. +;; +;; This file defines the packages 'racket-vm-cgc', 'racket-vm-bc', and +;; 'racket-vm-cs'. All three are in-place builds of 'racket/src/' and +;; 'racket/collects/' and are installed to 'opt/racket-vm/' in the store +;; output. The function 'racket-vm-for-system' returns the recomended Racket +;; VM package for a given system. +;; +;; The file 'racket.scm' builds on these packages to define 'racket-minimal' +;; and 'racket' packages. These use Racket's support for ``layered +;; installations'', which allow an immutable base layer to be extended with +;; additional packages. They use the layer configuration directly provide +;; ready-to-install FHS-like trees, rather than relying on the built in +;; ``Unix-style install'' mechanism. +;; +;; Bootstrapping Racket: +;; --------------------- +;; +;; Here's how bootstrapping Racket works: ;; ;; - Racket BC [CGC] can be built with only a C compiler (except for ;; one caveat discussed below). @@ -72,6 +156,10 @@ (define-module (gnu packages racket) ;; ;; So, we build CGC to build 3M to build bootfiles and CS. ;; +;; (Note: since the CGC variant is basically only for bootstrapping, we +;; often use "BC" to mean "3M", consistent with `(banner)` and the +;; suffixes used on executables when more than one variant co-exists.) +;; ;; One remaining bootstrapping limitation is that Racket's reader, module ;; system, and macro expander are implemented in Racket. For Racket CS, ;; they are compiled to R6RS libraries as discussed above. This note from the @@ -145,14 +233,15 @@ (define (racket-vm-common-configure-flags) '())) ,@(cond ((false-if-exception - (search-input-file %build-inputs "/bin/racket")) + (search-input-file %build-inputs "/opt/racket-vm/bin/racket")) => (lambda (racket) (list (string-append "--enable-racket=" racket)))) (else '())) ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH=" #$(file-append bash-minimal "/bin/sh")) - "--disable-strip")) + "--disable-strip" + "--enable-origtree")) (define (make-unpack-nanopass+stex) ;; Adapted from chez-scheme. @@ -173,31 +262,25 @@ (define (make-unpack-nanopass+stex) (display "# to placate ../configure"))))) -(define-public racket-minimal-bc-cgc +(define-public racket-vm-cgc ;; Eventually, it may make sense for some vm packages to not be hidden, ;; but this one is especially likely to remain hidden. (hidden-package (package - (name "racket-minimal-bc-cgc") + (name "racket-vm-cgc") (version %racket-version) (source %racket-origin) - (inputs - (list - ;; common to all racket-minimal variants: - openssl - sqlite - bash-minimal ;; <- for `system` - ncurses ;; <- for #%terminal - ;; only for BC variants: - libffi)) + (inputs (list ncurses ;; <- common to all variants (for #%terminal) + bash-minimal ;; <- common to all variants (for `system`) + libffi)) ;; <- only for BC variants (native-inputs (list libtool)) ;; <- only for BC variants (outputs '("out" "debug")) (build-system gnu-build-system) (arguments (list #:configure-flags - #~(cons* "--enable-cgcdefault" - #$(racket-vm-common-configure-flags)) + #~(cons "--enable-cgcdefault" + #$(racket-vm-common-configure-flags)) ;; Tests are in packages like racket-test-core and ;; main-distribution-test that aren't part of the main ;; distribution. @@ -208,51 +291,72 @@ (define-public racket-minimal-bc-cgc (ice-9 regex) (guix build gnu-build-system) (guix build utils)) + #:strip-directories #~'("opt/racket-vm/bin" + "opt/racket-vm/lib") #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'initialize-config.rktd - (lambda* (#:key inputs #:allow-other-keys) - (define (write-racket-hash alist) - ;; inside must use dotted pair notation - (display "#hash(") - (for-each (match-lambda - ((k . v) - (format #t "(~s . ~s)" k v))) - alist) - (display ")\n")) - (define maybe-release-catalog - (let ((v #$(package-version this-package))) - (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" - v) - `(,(string-append - "https://download.racket-lang.org/releases/" - v - "/catalog/")) - '()))) - (mkdir-p "racket/etc") - (with-output-to-file "racket/etc/config.rktd" - (lambda () - (write-racket-hash - `((lib-search-dirs - . (#f #$(file-append (this-package-input "openssl") "/lib") - #$(file-append (this-package-input "sqlite") "/lib"))) - (build-stamp . "") - (catalogs ,@maybe-release-catalog - #f))))))) - (add-before 'configure 'chdir - (lambda _ - (chdir "racket/src"))) - (add-after 'install 'remove-pkgs-directory - ;; If the configured pkgs-dir exists, "pkgs.rktd" does not - ;; exist, and a lock file does not exist, commands like - ;; `raco pkg show` will try to create a lock file and fail - ;; due to the read-only store. - ;; Arguably this may be a bug in `pkg/private/lock`: - ;; see . - ;; As a workaround, remove the directory. - (lambda args - ;; rmdir because we want an error if it isn't empty - (rmdir (string-append #$output "/share/racket/pkgs"))))))) + #~(let () + (define* ((wrap-racket-vm-outputs phase) . args) + (apply + phase + (let loop ((args args)) + (match args + ((#:outputs outputs . args) + `(#:outputs + ,(let loop ((outputs outputs)) + (match outputs + ((("out" . out) . outputs) + `(("out" . ,(string-append out "/opt/racket-vm/")) + ,@outputs)) + ((other . outputs) + (cons other (loop outputs))))) + ,@args)) + ((arg . args) + (cons arg (loop args))))))) + (modify-phases %standard-phases + (add-before 'configure 'initialize-config.rktd + (lambda* (#:key inputs #:allow-other-keys) + (define (write-racket-hash alist) + ;; inside must use dotted pair notation + (display "#hash(") + (for-each (match-lambda + ((k . v) + (format #t "(~s . ~s)" k v))) + alist) + (display ")\n")) + (define maybe-release-catalog + (let ((v #$(package-version this-package))) + (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)" + v) + `(,(string-append + "https://download.racket-lang.org/releases/" + v + "/catalog/")) + '()))) + (mkdir-p "racket/etc") + (with-output-to-file "racket/etc/config.rktd" + (lambda () + (write-racket-hash + `((build-stamp . "") + (catalogs ,@maybe-release-catalog + #f))))))) + (add-before 'configure 'chdir + (lambda _ + (chdir "racket/src"))) + (replace 'configure + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'configure))) + (replace 'patch-shebangs + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'patch-shebangs))) + (replace 'validate-runpath + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'validate-runpath))) + (replace 'make-dynamic-linker-cache + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'make-dynamic-linker-cache))) + (replace 'patch-dot-desktop-files + (wrap-racket-vm-outputs + (assoc-ref %standard-phases 'patch-dot-desktop-files))))))) (home-page "https://racket-lang.org") (synopsis "Old Racket implementation used for bootstrapping") (description "This variant of the Racket BC (``before Chez'' or @@ -262,32 +366,33 @@ (define maybe-release-catalog scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the Racket CS implementation. -Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M]. It may +Racket CGC is primarily used for bootstrapping Racket BC [3M]. It may also be used for embedding applications without the annotations needed in C code to use the 3M garbage collector.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat))))) -(define-public racket-minimal-bc-3m +(define-public racket-vm-bc (package - (inherit racket-minimal-bc-cgc) - (name "racket-minimal-bc-3m") + (inherit racket-vm-cgc) + (name "racket-vm-bc") (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) - (prepend racket-minimal-bc-cgc))) + (modify-inputs (package-native-inputs racket-vm-cgc) + (prepend racket-vm-cgc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc) + (substitute-keyword-arguments (package-arguments racket-vm-cgc) ((#:configure-flags _ '()) #~(cons "--enable-bconly" #$(racket-vm-common-configure-flags))))) - (synopsis "Minimal Racket with the BC [3M] runtime system") + (synopsis "Racket BC [3M] implementation") (description "The Racket BC (``before Chez'' or ``bytecode'') implementation was the default before Racket 8.0. It uses a compiler written in C targeting architecture-independent bytecode, plus a JIT compiler on most platforms. Racket BC has a different C API and supports a slightly different set of architectures than the current default runtime system, Racket CS (based -on ``Chez Scheme''). +on ``Chez Scheme''). It is the recommended implementation for architectures +that Racket CS doesn't support. This package is the normal implementation of Racket BC with a precise garbage collector, 3M (``Moving Memory Manager'').") @@ -295,23 +400,23 @@ (define-public racket-minimal-bc-3m ;; The LGPL components are only used by Racket BC. (license (list license:lgpl3+ license:asl2.0 license:expat)))) -(define-public racket-minimal +(define-public racket-vm-cs (package - (inherit racket-minimal-bc-3m) - (name "racket-minimal") + (inherit racket-vm-bc) + (name "racket-vm-cs") (inputs - (modify-inputs (package-inputs racket-minimal-bc-cgc) + (modify-inputs (package-inputs racket-vm-cgc) (prepend zlib lz4) (delete "libffi"))) (native-inputs - (modify-inputs (package-native-inputs racket-minimal-bc-cgc) + (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") (prepend chez-scheme-for-racket-bootstrap-bootfiles - racket-minimal-bc-3m))) + racket-vm-bc))) (arguments - (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m) - ((#:phases bc-phases) - #~(modify-phases #$bc-phases + (substitute-keyword-arguments (package-arguments racket-vm-cgc) + ((#:phases those-phases #~%standard-phases) + #~(modify-phases #$those-phases (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" @@ -328,17 +433,14 @@ (define-public racket-minimal "--enable-libz" "--enable-lz4" #$(racket-vm-common-configure-flags))))) - (synopsis "Racket without bundled packages such as DrRacket") - (description - "Racket is a general-purpose programming language in the Scheme family, -with a large set of libraries and a compiler based on Chez Scheme. Racket is -also a platform for language-oriented programming, from small domain-specific -languages to complete language implementations. + (synopsis "Racket CS implementation") + (description "The Racket CS implementation, which uses ``Chez Scheme'' as +its core compiler and runtime system, has been the default Racket VM +implemetation since Racket 8.0. It performs better than the Racket BC +implementation for most programs. -The ``minimal Racket'' distribution includes just enough of Racket for you to -use @command{raco pkg} to install more. Bundled packages, such as the -DrRacket IDE, are not included.") - (properties `()) +Using the Racket VM packages directly is not recommended: instead, install the +@code{racket-minimal} or @code{racket} packages.") ;; https://download.racket-lang.org/license.html ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) @@ -353,7 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; When updating, remember to also update %racket-version in racket.scm. (source %racket-origin) (inputs `()) - (native-inputs (list racket-minimal-bc-3m)) + (native-inputs (list racket-vm-bc)) (build-system copy-build-system) ;; TODO: cross compilation (arguments @@ -371,7 +473,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) - "/bin/racket") + "/opt/racket-vm/bin/racket") "rktboot/main.rkt")))))) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, @@ -452,10 +554,116 @@ (define (simple-racket-origin repo hash specs) %racket-version))) specs)) +(define-public racket-minimal + (package + (name "racket-minimal") + (version %racket-version) + (source #f) + ;; For cross-compilation, Matthew Flatt recommends reusing + ;; as much of `raco cross` as possible. So, put that off until + ;; we have a build system for Racket packages. + (inputs + (list openssl + sqlite + racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-packages-origin + "base" %racket-origin + '(("base" "pkgs/base") + ("racket-lib" "pkgs/racket-lib"))))) + (build-system gnu-build-system) + (arguments + ;; Here and for the `racket` package, we're using #:configure-flags + ;; to pass flags for `configure-layer.rkt` and #:make-flags + ;; to pass arguments for `raco pkg install`. + (list + #:configure-flags + #~`("--tethered" + "--extra-foreign-lib-search-dirs" + ,(format + #f "~s" + (list #$(file-append (this-package-input "openssl") "/lib") + #$(file-append (this-package-input "sqlite") "/lib")))) + #:make-flags #~`("racket-lib") + #:tests? #f ;; packaged separately + #:modules '((guix build gnu-build-system) + (guix build utils) + (guix build union) + (ice-9 match)) + #:imported-modules `((guix build union) + ,@%gnu-build-system-modules) + #:phases + #~(modify-phases %standard-phases + (delete 'unpack) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + (let* ((vm-dir (search-input-directory inputs "opt/racket-vm")) + (racket (string-append vm-dir "/bin/racket"))) + (apply invoke + racket + #$configure-layer.rkt + `(,@(cond + ((false-if-exception + (search-input-file + inputs "etc/racket/config.rktd")) + => (lambda (file) + `("--parent" + ,(dirname (dirname (dirname file)))))) + (else + '())) + ,@configure-flags + ,vm-dir + ,#$output)) + (invoke racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" "setup" + "--no-user")))) + (replace 'build + (lambda* (#:key inputs #:allow-other-keys) + ;; We use "share/racket/pkgs" for sources to distinguish them + ;; from the "lib/racket/pkgs" of a potential parent layer. + (union-build (string-append #$output "/lib/racket/pkgs") + (search-path-as-list '("share/racket/pkgs") + (map cdr inputs)) + #:create-all-directories? #t))) + (replace 'install + (lambda* (#:key inputs make-flags #:allow-other-keys) + (let ((racket + (search-input-file inputs "/opt/racket-vm/bin/racket"))) + (unless (null? make-flags) + (invoke racket + "-l-" + "pkg/dirs-catalog" + "--link" + "local-catalog" + (string-append #$output "/lib/racket/pkgs")) + (apply invoke + racket + "--config" (string-append #$output "/etc/racket") + "-l" "raco" + "pkg" "install" + "--installation" + "--auto" + "--catalog" "local-catalog" + make-flags)))))))) + (home-page "https://racket-lang.org") + (synopsis "Racket without bundled packages such as DrRacket") + (description + "Racket is a general-purpose programming language in the Scheme family, +with a large set of libraries and a compiler based on Chez Scheme. Racket is +also a platform for language-oriented programming, from small domain-specific +languages to complete language implementations. + +The ``minimal Racket'' distribution includes just enough of Racket for you to +use @command{raco pkg} to install more. Bundled packages, such as the +DrRacket IDE, are not included.") + ;; https://download.racket-lang.org/license.html + ;; The LGPL components are only used by Racket BC. + (license (list license:asl2.0 license:expat)))) + (define-public racket (package + (inherit racket-minimal) (name "racket") - (version %racket-version) (source #f) (inputs (list @@ -474,6 +682,7 @@ (define-public racket unixodbc libedit ;; TODO reconsider in light of expeditor and readline-gpl racket-minimal ;; <-- TODO non-tethered layer + racket-vm-cs ;; TODO (racket-vm-for-system) (simple-racket-origin "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") '("2d" "2d-doc" "2d-lib")) @@ -482,9 +691,7 @@ (define-public racket '(("algol60" "."))) (racket-packages-origin "racket" %racket-origin - '(("base" "pkgs/base") ;; FIXME belongs in racket-minimal - ("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal - ("at-exp-lib" "pkgs/at-exp-lib") + '(("at-exp-lib" "pkgs/at-exp-lib") ("compiler" "pkgs/compiler") ("compiler-lib" "pkgs/compiler-lib") ("net" "pkgs/net") @@ -808,91 +1015,39 @@ (define-public racket '("xrepl" "xrepl-doc" "xrepl-lib")))) (build-system gnu-build-system) (arguments - ;; We're using #:configure-flags to pass flags for - ;; `configure-layer.rkt` and #:make-flags to pass arguments for - ;; `raco pkg install`. - (list - #:configure-flags - #~`("--extra-foreign-lib-search-dirs" - ,(format #f "~s" - '(#$@(map (lambda (name) - (cond - ((this-package-input name) - => (cut file-append <> "/lib")) - (else - (raise-exception - (make-exception - (make-assertion-failure) - (make-exception-with-message - "missing input to the 'racket' package") - (make-exception-with-irritants - (list name))))))) - '("cairo" - "fontconfig-minimal" ;; aka fontconfig - "glib" - "glu" - "gmp" - "gtk+" - "libjpeg-turbo" - "libpng" - "libx11" - "mesa" - "mpfr" - "pango" - "unixodbc" - "libedit"))))) - #:make-flags #~`("main-distribution") - #:tests? #f ;; packaged separately - #:modules '((guix build gnu-build-system) - (guix build utils) - (guix build union) - (ice-9 match)) - #:imported-modules `((guix build union) - ,@%gnu-build-system-modules) - #:phases - #~(modify-phases %standard-phases - (delete 'unpack) - (replace 'configure - (lambda* (#:key inputs configure-flags #:allow-other-keys) - (let* ((racket (search-input-file inputs "bin/racket"))) - (apply invoke - racket - #$configure-layer.rkt - `(,@configure-flags - ,(dirname (dirname racket)) - ,#$output)) - (invoke racket - "--config" (string-append #$output "/etc/racket") - "-l" "raco" "setup" - "--no-user")))) - (replace 'build - (lambda* (#:key inputs #:allow-other-keys) - ;; We use "share/racket/pkgs" for sources to distinguish them - ;; from the "lib/racket/pkgs" of a potential parent layer. - (union-build (string-append #$output "/lib/racket/pkgs") - (search-path-as-list '("share/racket/pkgs") - (map cdr inputs)) - #:create-all-directories? #t))) - (replace 'install - (lambda* (#:key inputs make-flags #:allow-other-keys) - (let ((racket (search-input-file inputs "/bin/racket"))) - (unless (null? make-flags) - (invoke racket - "-l-" - "pkg/dirs-catalog" - "--link" - "local-catalog" - (string-append #$output "/lib/racket/pkgs")) - (apply invoke - racket - "--config" (string-append #$output "/etc/racket") - "-l" "raco" - "pkg" "install" - "--installation" - "--auto" - "--catalog" "local-catalog" - make-flags)))))))) - (home-page "https://racket-lang.org") + (substitute-keyword-arguments (package-arguments racket-minimal) + ((#:make-flags _ '()) + #~`("main-distribution")) + ((#:configure-flags _ '()) + #~`("--tethered" + "--extra-foreign-lib-search-dirs" + ,(format #f "~s" + '(#$@(map (lambda (name) + (cond + ((this-package-input name) + => (cut file-append <> "/lib")) + (else + (raise-exception + (make-exception + (make-assertion-failure) + (make-exception-with-message + "missing input to the 'racket' package") + (make-exception-with-irritants + (list name))))))) + '("cairo" + "fontconfig-minimal" ;; aka fontconfig + "glib" + "glu" + "gmp" + "gtk+" + "libjpeg-turbo" + "libpng" + "libx11" + "mesa" + "mpfr" + "pango" + "unixodbc" + "libedit")))))))) (synopsis "Programmable programming language in the Scheme family") (description "Racket is a general-purpose programming language in the Scheme family, @@ -902,10 +1057,7 @@ (define-public racket The main Racket distribution comes with many bundled packages, including the DrRacket IDE, libraries for GUI and web programming, and implementations of -languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.") - ;; https://download.racket-lang.org/license.html - ;; The LGPL components are only used by Racket BC. - (license (list license:asl2.0 license:expat)))) +languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog."))) (define configure-layer.rkt (scheme-file @@ -918,41 +1070,53 @@ (define configure-layer.rkt racket/port racket/list racket/pretty) - (define config-file-pth - "etc/racket/config.rktd") (define (build-path-string . args) (path->string (apply build-path args))) (define rx:racket ;; Guile's reader doesn't support #rx"racket" (regexp "racket")) + (define tethered? #f) + (define parent #f) (define extra-foreign-lib-search-dirs '()) - (define-values [parent-layer prefix] + (define-values [vm-dir prefix] (command-line #:once-each + [("--tethered") "create a tethered layer" + (set! tethered? #t)] + [("--parent") dir "path of parent layer, if any" + (set! parent dir)] [("--extra-foreign-lib-search-dirs") dir-list "foreign library directories, as a list of strings in `read` syntax" (set! extra-foreign-lib-search-dirs (call-with-input-string dir-list read))] - #:args (parent-layer prefix) - (values parent-layer prefix))) + #:args (vm-dir prefix) + (values vm-dir prefix))) (let* ([config (for/fold - ([config (file->value (build-path parent-layer - config-file-pth))]) - ([spec (in-list - '((lib-dir lib-search-dirs "lib/racket") - (share-dir share-search-dirs "share/racket") - (links-file - links-search-files - "share/racket/links.rktd") - (pkgs-dir pkgs-search-dirs "share/racket/pkgs") - (bin-dir bin-search-dirs "bin") - (man-dir man-search-dirs "share/man") - (doc-dir doc-search-dirs "share/doc/racket") - (include-dir - include-search-dirs - "include/racket")))]) - (match-define (list main-key search-key pth) spec) + ([config (file->value + (if parent + (build-path parent "etc/racket/config.rktd") + (build-path vm-dir "etc/config.rktd")))]) + ([spec + (in-list + '((lib-dir lib-search-dirs "lib/racket" "lib") + (share-dir share-search-dirs "share/racket" "share") + (links-file links-search-files + "lib/racket/links.rktd" + "share/links.rktd") + (pkgs-dir pkgs-search-dirs "lib/racket/pkgs" "share/pkgs") + ;; Partial workaround for: + ;; https://github.com/racket/racket/issues/4133 + #;(bin-dir bin-search-dirs "bin" "bin") + (bin-dir bin-search-dirs + "lib/racket/bogus-untethered-bin" + "bin") + (man-dir man-search-dirs "share/man" "share/man") + (doc-dir doc-search-dirs "share/doc/racket" "doc") + (include-dir include-search-dirs + "include/racket" + "include")))]) + (match-define (list main-key search-key pth vm-pth) spec) (hash-set* config main-key @@ -961,7 +1125,10 @@ (define-values [parent-layer prefix] (list* #f (hash-ref config main-key - (build-path-string parent-layer pth)) + (lambda () + (if parent + (build-path-string parent pth) + (build-path-string vm-dir vm-pth)))) (filter values (hash-ref config search-key null)))))] [config (hash-update config @@ -995,15 +1162,21 @@ (define-values [rkt old-foreign-dirs] ;; workaround Guile reader/printer: ['|3m| "-bc"] [_ ""])))] - [bin-dir - (hash-ref config 'bin-dir)] [config - (hash-set* config - 'config-tethered-apps-dir (hash-ref config 'apps-dir) - 'config-tethered-console-bin-dir bin-dir - 'config-tethered-gui-bin-dir bin-dir)] - [new-config-pth - (build-path prefix config-file-pth)]) + (cond + [tethered? + ;; Partial workaround for: + ;; https://github.com/racket/racket/issues/4133 + #;(define bin-dir (hash-ref config 'bin-dir)) + (define bin-dir (build-path-string prefix "bin")) + (hash-set* config + 'config-tethered-apps-dir (hash-ref config 'apps-dir) + 'config-tethered-console-bin-dir bin-dir + 'config-tethered-gui-bin-dir bin-dir)] + [else + config])]) + (define new-config-pth + (build-path prefix "etc/racket/config.rktd")) (make-parent-directory* new-config-pth) (call-with-output-file* new-config-pth From patchwork Sun Feb 27 21:29:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37538 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 7946F27BBEC; Sun, 27 Feb 2022 21:32:29 +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 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 758E327BBEA for ; Sun, 27 Feb 2022 21:32:28 +0000 (GMT) Received: from localhost ([::1]:59310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9X-0000Y3-JY for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR99-0000W0-TC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37243) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR99-0005f0-KC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR99-0008Hf-Gg for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 11/24] gnu: racket: Move Chez bootfiles to (gnu packages chez). Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599747331721 (code B ref 53878); Sun, 27 Feb 2022 21:32:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:13 +0000 Received: from localhost ([127.0.0.1]:59359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8K-0008FR-P9 for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:13 -0500 Received: from mail-vs1-f52.google.com ([209.85.217.52]:44631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR83-0008DF-8z for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:30:55 -0500 Received: by mail-vs1-f52.google.com with SMTP id y4so11045819vsd.11 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:55 -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=4c+LihuPfHfcBGJwbquveRPMTwT9e1jfOQoAXBdkyyc=; b=as+jI3gSWTEAhjn9xsiozUMP4Rm3EciQNWAd60gp33rH67VBpPemKplb0RtFI2felc W5hIG+xMifpAC0mtCikVs0ch3giyai+dkOBTOUA8BPNo05KipwQgmTf1jzLOpqbBN1vS +Pd9XHZlwREagPFeXZYCX0Tk1ikPB97pRRu/90EIF+ysKVGFZavhBf1cQRQygKN/BMru I7Dz5kqlnYo7AbYkPj+7OD0rXIZkHkGzUXOGa1AYqX5JZFPSIJijujQt7tw8bqJ+0yVH IqzRbvBSu3LRcZaPtdGlZwtkgyCzO0jFe1A2/KzwPCOCzW2cn7L5sfrPl+fvMheWsIeo a4ng== 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=4c+LihuPfHfcBGJwbquveRPMTwT9e1jfOQoAXBdkyyc=; b=e0TdPnXYi+vy6eVuIkN3euPQ/zgmoI//lDYoIMgsCvaZcaZLtDNH+/4wb6iTK4BhJy TfVlZI8JW11sfiAtMLT6FNr/TGVPxgJdROcPrDlC/fuX1RNpOmD4aMxCMz1uumXGIYjC g4bNhKxrrknBsY1g0QJpElZq7HJyi93eIW6Zu8DYtnBBzQdy8+JX72BGL1Y5BXl/sBdt VZkfNJWO3EzinEDr96bwZ/kxxaLuTtu+/TKiJJ5ZUMmh0P3om/5ByaEtZDR3crAGnJus QUSgl7lpTb85f1z19UJ+loFxedkLjYGzXQkJecE2Fan3fTnW0PyKK6pLKpvZR01NXW6i ghUg== X-Gm-Message-State: AOAM530h+MU2Kvbwh+FEsk+PVdSjY0NsMKxSe0GlBRWvASyUcn762gGx cbivl5GWEMHb92xO+oyCJ9gqQwAakrggLCupM5c= X-Google-Smtp-Source: ABdhPJxVXBU404QNZtJTVeGmFwxouJLLWJm/KQQjEQKY9qGaPpi5N9pdelw+vAVrBsZ6p2MU5CBBMg== X-Received: by 2002:a05:6102:5494:b0:31b:7af4:1d5a with SMTP id bk20-20020a056102549400b0031b7af41d5amr7097212vsb.40.1645997449572; Sun, 27 Feb 2022 13:30:49 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id e21-20020ab031d5000000b0033ffa5785cfsm1315901uan.16.2022.02.27.13.30.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:49 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:07 -0500 Message-Id: <20220227212920.2009000-12-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 d3d3eb2bbd..a853e520f5 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -445,58 +445,6 @@ (define-public racket-vm-cs ;; The LGPL components are only used by Racket BC. (license (list license:asl2.0 license:expat)))) -(define-public chez-scheme-for-racket-bootstrap-bootfiles - (package - (name "chez-scheme-for-racket-bootstrap-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. - (source %racket-origin) - (inputs `()) - (native-inputs (list racket-vm-bc)) - (build-system copy-build-system) - ;; TODO: cross compilation - (arguments - (list - #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/ChezScheme"))) - (add-after 'chdir 'unpack-nanopass+stex - (lambda args - #$(make-unpack-nanopass+stex))) - (add-before 'install 'build - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt")))))) - (home-page "https://github.com/racket/ChezScheme") - ;; ^ This is downstream of https://github.com/racket/racket, - ;; but it's designed to be a friendly landing place for people - ;; who want a ChezScheme-shaped repositroy. - (synopsis "Chez Scheme bootfiles bootstrapped by Racket") - (description "Chez Scheme is a self-hosting compiler: building it -requires ``bootfiles'' containing the Scheme-implemented portions compiled for -the current platform. (Chez can then cross-compile bootfiles for all other -supported platforms.) - -The Racket package @code{cs-bootstrap} (part of the main Racket Git -repository) implements enough of a Chez Scheme simulation to load the Chez -Scheme compiler purely from source into Racket and apply the compiler to -itself, thus bootstrapping Chez Scheme. Bootstrapping takes about 10 times as -long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket -7.1 and later, including the Racket BC variant. - -Note that the generated bootfiles are specific to Racket's fork of Chez -Scheme, and @code{cs-bootstrap} does not currently support building upstream -Chez Scheme.") - (license (list license:asl2.0)))) - (define (racket-packages-origin name origin specs) "Extract from ORIGIN the sources for the Racket packages specified by SPECS, a non-empty list of package specifications. In the resulting file-like From patchwork Sun Feb 27 21:29:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37539 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 D4D8D27BBEA; Sun, 27 Feb 2022 21:32:29 +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 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 B4B4F27BBE9 for ; Sun, 27 Feb 2022 21:32:28 +0000 (GMT) Received: from localhost ([::1]:59328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9X-0000Z9-Q2 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR9A-0000Wt-Ah for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR9A-0005f9-0k for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR99-0008Hm-TV for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 12/24] gnu: chez: Add utilities for Chez machine types. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599747431727 (code B ref 53878); Sun, 27 Feb 2022 21:32:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:14 +0000 Received: from localhost ([127.0.0.1]:59361 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8L-0008Fa-Dj for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:14 -0500 Received: from mail-vs1-f42.google.com ([209.85.217.42]:44626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR87-0008DP-Nx for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:00 -0500 Received: by mail-vs1-f42.google.com with SMTP id y4so11045925vsd.11 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:59 -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=RBzRjCkF2Dme39f6OpQ9RHC2lvJimDSrerWEyeN40Kh9QLVmf/OLVyzxHKVT/jAZ0R WtcoPPx/MJxJvQR0XCqQWOArjni/Ecr/H+4mGgS2HaOPL9fhWW7IYfdAwudg2yxRyVWu 8tklA1XA3dOAdrk2J4wo4fTJd+xhbTV6Vlj9mQVovC5ry/MDZs+HQs24i2Kbu5jbiuBN KjFJsVK9ZDKUqzxRxe56RXNX/BpSDPuKWPEOIxbyuDIXobdeGCK1bSJDwer1f8ATbT+B UTuDb0g1BdIpQAnv3B2VvZAeO1fDnk8ZmQxd5ao3KeUKEV3vuO6wyJupE8AR/tZ4x1Ru rDMw== 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=iXni2EoMAWY9sjVDOCmIrpgW4uVYXMjJrlHXp/RcJPk7J1Ywz0+OCr75e/sOJxFYxT L75nhi5QN6QcMR/1Gy2StHIZZn5XLrVN0+wRgD2OnmgL7Ak8zF0TW60X89syeO6h28Xz ZcK6XALGCFZe/acT6ao1ogoaskCb2T+ekeHXX7Lh+56wGD3YRmcwKZKcdsN5/lNckd0k l/qOqelipzzNz8wi17zAWAa5VXGtruzslwMsLB4vpghAxHnk848In/YVAkTI4SL0zPgX 5f0tCyBpFWuFQ5Q3KPbzOlAXRzCLez1qgk2io2oVOHGciJ797lPoD4qdZyn5TucKFZo3 smNA== X-Gm-Message-State: AOAM530q6IQ+0TcYzPXmf9SpBLGaGChyyobeexpUZSnyfrFsnMrk51DE grQz1kpNYAKe2yaoQZO3Foq+FnWkGNfIUWd+LGE= X-Google-Smtp-Source: ABdhPJxdQQa3UgWe/kNs4bgO+RF1rGzWumCACGlSbX7mNvU1EYIaZmvdLrx75iByRMV4UC4JAV90eg== X-Received: by 2002:a67:d29c:0:b0:31b:e21b:b4f8 with SMTP id z28-20020a67d29c000000b0031be21bb4f8mr5409843vsi.79.1645997454154; Sun, 27 Feb 2022 13:30: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 k16-20020a0561023f1000b0031cc171e9a8sm1020277vsv.4.2022.02.27.13.30.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:30:53 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:08 -0500 Message-Id: <20220227212920.2009000-13-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (chez-machine->nonthreaded, chez-machine->threaded, chez-machine->nix-system, nix-system->chez-machine, chez-upstream-features-for-system): New functions. (%nix-arch-to-chez-alist, %nix-os-to-chez-alist): New private constants. (chez-scheme)[supported-systems]: Compute based on 'nix-system->chez-machine' and 'chez-upstream-features-for-system'. (chez-scheme-for-racket-bootstrap-bootfiles)[supported-systems]: Compute based on 'nix-system->chez-machine'. --- gnu/packages/chez.scm | 127 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 124 insertions(+), 3 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 046bb3dcdc..603fc4201e 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -44,7 +44,119 @@ (define-module (gnu packages chez) #:use-module (gnu packages image) #:use-module (gnu packages xorg) #:use-module (ice-9 match) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (nix-system->chez-machine + chez-machine->nonthreaded + chez-machine->threaded)) + +(define (chez-machine->nonthreaded machine) + "Given a string MACHINE naming a Chez Scheme machine type, returns a string +naming the nonthreaded machine type for the same architecture and OS as +MACHINE. The returned string may share storage with MACHINE." + ;; Chez Scheme documentation consistently uses "nonthreaded" rather than + ;; e.g. "unthreaded" + (if (eqv? #\t (string-ref machine 0)) + (substring machine 1) + machine)) +(define (chez-machine->threaded machine) + "Like @code{chez-machine->nonthreaded}, but returns the threaded machine +type." + (if (eqv? #\t (string-ref machine 0)) + machine + (string-append "t" machine))) + +;; Based on the implementation from raco-cross-lib/private/cross/platform.rkt +;; in https://github.com/racket/raco-cross. +;; For supported platforms, refer to release_notes/release_notes.stex in the +;; upstream Chez Scheme repository or to racket/src/ChezScheme/README.md +;; in https://github.com/racket/racket. +(define %nix-arch-to-chez-alist + `(("x86_64" . "a6") + ("i386" . "i3") + ("aarch64" . "arm64") + ("armhf" . "arm32") ;; Chez supports ARM v6+ + ("ppc" . "ppc32"))) +(define %nix-os-to-chez-alist + `(("w64-mingw32" . "nt") + ("darwin" . "osx") + ("linux" . "le") + ("freebsd" . "fb") + ("openbsd" . "ob") + ("netbsd" . "nb") + ("solaris" . "s2"))) + +(define (chez-machine->nix-system machine) + "Return the Nix system type corresponding to the Chez Scheme machine type +MACHINE. If MACHINE is not a string representing a known machine type, an +exception is raised. This function does not distinguish between threaded and +nonthreaded variants of MACHINE. + +Note that this function only handles Chez Scheme machine types in the +strictest sense, not other kinds of descriptors sometimes used in place of a +Chez Scheme machine type by Racket, such as @code{\"pb\"}, @code{#f}, or +@code{\"racket\"}. (When using such extensions, the Chez Scheme machine type +for the host system is often still relevant.)" + (let ((machine (chez-machine->nonthreaded machine))) + (let find-arch ((alist %nix-arch-to-chez-alist)) + (match alist + (((nix . chez) . alist) + (if (string-prefix? chez machine) + (string-append + nix "-" (let ((machine-os + (substring machine (string-length chez)))) + (let find-os ((alist %nix-os-to-chez-alist)) + (match alist + (((nix . chez) . alist) + (if (equal? chez machine-os) + nix + (find-os alist))))))) + (find-arch alist))))))) + +(define* (nix-system->chez-machine #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return the Chez Scheme machine type corresponding to the Nix system +identifier SYSTEM, or @code{#f} if the translation of SYSTEM to a Chez Scheme +machine type is undefined. + +It is unspecified whether the resulting string will name a threaded or a +nonthreaded machine type: when the distinction is relevant, use +@code{chez-machine->nonthreaded} or @code{chez-machine->threaded} to adjust +the result." + (let* ((hyphen (string-index system #\-)) + (nix-arch (substring system 0 hyphen)) + (nix-os (substring system (+ 1 hyphen))) + (chez-arch (assoc-ref %nix-arch-to-chez-alist nix-arch)) + (chez-os (assoc-ref %nix-os-to-chez-alist nix-os))) + (and chez-arch chez-os (string-append chez-arch chez-os)))) + +(define* (chez-upstream-features-for-system #:optional + (system + (or (%current-target-system) + (%current-system)))) + "Return a list of symbols naming features supported by upstream Chez Scheme +for the Nix system identifier SYSTEM, or @code{#f} if upstream Chez Scheme +does not support SYSTEM at all. + +If native threads are supported, the returned list will include +@code{'threads}. Other feature symbols may be added in the future." + (cond + ((not (nix-system->chez-machine system)) + #f) + ((target-aarch64? system) + #f) + ((target-arm32? system) + (and (target-linux? system) + '())) + ((target-ppc32? system) + (and (target-linux? system) + '(threads))) + (else + '(threads)))) + +;; +;; Chez Scheme: +;; (define nanopass (let ((version "1.9.2")) @@ -251,8 +363,11 @@ (define* (stex-make #:optional (suffix "")) ;; We should too. It is the Chez machine type arm32le ;; (no threaded version upstream yet, though there is in ;; Racket's fork), more specifically (per the release notes) ARMv6. - (supported-systems (fold delete %supported-systems - '("mips64el-linux" "armhf-linux"))) + (supported-systems + (delete + "armhf-linux" ;; <-- should work, but reportedly broken + (filter chez-upstream-features-for-system + %supported-systems))) (home-page "https://cisco.github.io/ChezScheme/") (synopsis "R6RS Scheme compiler and run-time") (description @@ -300,6 +415,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt"))))))) + (supported-systems (filter nix-system->chez-machine + %supported-systems)) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, ;; but it's designed to be a friendly landing place for people @@ -322,6 +439,10 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles Chez Scheme.") (license (list asl2.0)))) +;; +;; Packages: +;; + (define-public chez-srfi (package (name "chez-srfi") From patchwork Sun Feb 27 21:29:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37544 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 049D127BBEA; Sun, 27 Feb 2022 21:32: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 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 C71D827BBE9 for ; Sun, 27 Feb 2022 21:32:53 +0000 (GMT) Received: from localhost ([::1]:60688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9x-0001ZK-02 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR9A-0000XY-OK for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR9A-0005fE-Cd for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR9A-0008Hu-9f for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 13/24] gnu: racket: Add 'racket-vm-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599750331769 (code B ref 53878); Sun, 27 Feb 2022 21:32:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:43 +0000 Received: from localhost ([127.0.0.1]:59364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8p-0008GJ-3O for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:43 -0500 Received: from mail-vs1-f52.google.com ([209.85.217.52]:46877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8J-0008Ew-Er for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:11 -0500 Received: by mail-vs1-f52.google.com with SMTP id u10so11037126vsu.13 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:31:11 -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=n8BGEmpxXWD+h6k4gjttH4eE9hhDpt7HQXaF3+MVYXg=; b=HTLvsGS8FruOBK80XWts+wbGzSHVYFmVpOPb2QdE745sgY+0UAAxZkkHjX+RPblp/F pjN7UtLR86yqAlMIfICnH/gejZ9kL81e15xSU4Zjwe81Iu+6WbPRXSi3AMCKodpIyAjW eQ4FkIQDqwASt7rRRQgdwS61izR6ajTJ2ZSY3GaTWZyyi9KMZgOQF9x5wIPdaDZgXMxw pzb5M67UNBrceKAVHARARpJ5ji/RAwMfiM0teSpzBPU1nuvQPAHb+5QEw1PEFIDf5e1E P2Kn6fsrQgDRODjB7YAU/gNAVMMla280kPZTWXf8snWfSBLhe5LmK1vDeggJNos6tUuP 2Xng== 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=n8BGEmpxXWD+h6k4gjttH4eE9hhDpt7HQXaF3+MVYXg=; b=fNWA+wrknWsRU2AjO/f4XPBN2xMkx7qTQ6YjgmwnYigsuntHqbdRccnBN6z+I1kWQ0 mhEMt47JWMgLG3weRQcrGysPfOW/3zcpDYAaOQVyiFn4YnxbaRdDNBYlGCPI+G8mbSg0 lUYOK5PgbbTIlM9nzHCyqJ/vYQwfDxIVMxqJ1k+RJSlGnBK8cqXuQc/PpFODYRu1Ctzo SVHipeefc+4yLkKG8CorlLODRqLLWOXdmTPAjWhmYsC6XP7vh0hnRvS//2iI9Qo1JKY8 REjM2a2zXVxSMg6g0qRsFrSSKXbyLSeMEby+g06hYcF8NbB0jVbxEJe3oZDRvA9A7Lt8 zj/g== X-Gm-Message-State: AOAM531/nOKSkbJb3h7o0S1j/ynE+pgvwSPIrTYwJfRVMv6KpES2eAOI DVA87+DOjhKFUPheiwiyJSxY7Jq9er3wpQKgy8Y= X-Google-Smtp-Source: ABdhPJzktN+UUWmdWvsYgWjjEPe4xBgcPE+8BfOZ+d+JngLeG1+ztJbOCEuFcpoS9OLlzHH/f2dLPg== X-Received: by 2002:a05:6102:21ac:b0:31c:1b59:4fc6 with SMTP id i12-20020a05610221ac00b0031c1b594fc6mr6639305vsb.59.1645997466013; Sun, 27 Feb 2022 13:31: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 n22-20020a1fa416000000b0031e658fd080sm1354745vke.43.2022.02.27.13.30.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:31:05 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:09 -0500 Message-Id: <20220227212920.2009000-14-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 a853e520f5..272638ca2e 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -187,6 +187,14 @@ (define-module (gnu packages racket) ;; ;; Code: +(define* (racket-vm-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return 'racket-vm-cs' if it supports SYSTEM; 'racket-vm-bc' otherwise." + (if (nix-system->chez-machine system) + racket-vm-cs + racket-vm-bc)) + (define %racket-version "8.4") ;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! (define %racket-commit @@ -513,7 +521,7 @@ (define-public racket-minimal (inputs (list openssl sqlite - racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-vm-for-system) (racket-packages-origin "base" %racket-origin '(("base" "pkgs/base") @@ -630,7 +638,7 @@ (define-public racket unixodbc libedit ;; TODO reconsider in light of expeditor and readline-gpl racket-minimal ;; <-- TODO non-tethered layer - racket-vm-cs ;; TODO (racket-vm-for-system) + (racket-vm-for-system) (simple-racket-origin "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr") '("2d" "2d-doc" "2d-lib")) From patchwork Sun Feb 27 21:29:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37540 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 626D827BBEA; Sun, 27 Feb 2022 21:32:34 +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 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 DF3E027BBE9 for ; Sun, 27 Feb 2022 21:32:30 +0000 (GMT) Received: from localhost ([::1]:59464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9a-0000g0-0n for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR9B-0000Xl-8N for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR9A-0005fL-Qd for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR9A-0008I1-N3 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 14/24] gnu: chez-scheme: Use new style for Chez packages. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599750431781 (code B ref 53878); Sun, 27 Feb 2022 21:32:04 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:44 +0000 Received: from localhost ([127.0.0.1]:59366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8p-0008GM-C9 for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:44 -0500 Received: from mail-vs1-f41.google.com ([209.85.217.41]:34396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8a-0008Ft-3z for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:29 -0500 Received: by mail-vs1-f41.google.com with SMTP id w4so11108509vsq.1 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:31: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=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=; b=IKtHG+gBCBhORbi+tNyftqfUvZtEFu5PqVvnpUt8qOrqNqMPmvXN9VHKLAaiQ+m7dF QCtUaRrYePL11cjqI3pdXTSM7bgO1u4KRM44vhQ5rxLr28837Ib5su6VObczK8n/+Em6 M1Agr/Ak7ifik08SvG1SFIrNbvZbkE3IxdiOjUMSlF6V2d8MRB06Ns6jt83Sb9m64rJI J6raFFEX8Y8aCtlH/oFqFs/wXxVL2GHwIy1UXnH0YSHohp0k+/GyqKBz4L7sYwT89B4w DFSRHMdBYWx+g1ea6FjUCibEOuDfZPVrMyY67LEkt1GjcbkeapeS3hkmd4tTo3jtwsNb NVWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=; b=fFZvYcMc5TZs77Yv6qbO0gQYJ9fK/dLvpafjwSOnZltCFwdMh/hwKIdcpxt1Zj9L0v aUcz3N1bdzdOSOsbqkL43ZNbp6kDdtZFq13nmR+HIHn4xVI4thu/JeOXe4FdaC41gtC5 NtE0fd5hqUwPcyLZEWGOPRO93AGfWicDtVutdlIKgM0Q4uLP4KZI5Tk7QA0X0vQ35C6W HLcNkgOR6pHf2S/hnSmW0vjPJp5Gdjg2qKEHg7XrnOJf90domYlcOv382me+DZR/D8Vu iDVxcoCi00//4xZ9wR84kQRi2uM3ios2C2WN1vlwmqbtUxpvVo8Icjq5T9vyz03ZASeh EyRg== X-Gm-Message-State: AOAM533NVrFux2kM/C8gvtUN0GIuf/5CIDfHFn+X9qBfHzGEKFfEjvMo F+O4ShN/WLIZwZrZ20kYy0zjsIyiat2iRDLZdx8= X-Google-Smtp-Source: ABdhPJza1R2lMTDtWUEc/Kib++wWaK+sd8n1uZ07DihB+hxib97T1Ze3V4/OXvgPWET9nEytDdTqtA== X-Received: by 2002:a05:6102:104a:b0:31d:da1b:fed3 with SMTP id h10-20020a056102104a00b0031dda1bfed3mr7235581vsq.18.1645997482312; Sun, 27 Feb 2022 13:31:22 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id o22-20020a056122179600b0032f7563a15esm1326957vkf.13.2022.02.27.13.31.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:31:22 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:10 -0500 Message-Id: <20220227212920.2009000-15-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (chez-configure, chez-make-flags): Use G-expressions. (chez-srfi)[arguments]: Use G-expressions, 'chez-configure', and 'chez-make-flags'. (chez-web, chez-sockets)[native-inputs]: Remove labels. [arguments]: Use G-expressions. (chez-matchable, chez-irregex, chez-fmt, chez-mit, chez-scmutils)[arguments]: Use G-expressions. --- gnu/packages/chez.scm | 382 ++++++++++++++++++++++-------------------- 1 file changed, 196 insertions(+), 186 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 603fc4201e..4ee9711bb4 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -443,6 +443,27 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; Packages: ;; +;; Help function for Chez Scheme to add the current path to +;; CHEZSCHEMELIBDIRS. +(define chez-configure + #~(lambda _ + (let ((chez-env (getenv "CHEZSCHEMELIBDIRS"))) + (setenv "CHEZSCHEMELIBDIRS" + (if chez-env + (string-append ".:" chez-env) + "."))))) + +;; Help function to define make flags for some Chez Scheme custom make +;; files. +(define (chez-make-flags name version) + #~(let ((out #$output)) + (list + ;; Set 'chezversion' so that libraries are installed in + ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. + (string-append "chezversion=" #$(package-version chez-scheme)) + (string-append "PREFIX=" out) + (string-append "DOCDIR=" out "/share/doc/" #$name "-" #$version)))) + (define-public chez-srfi (package (name "chez-srfi") @@ -460,13 +481,11 @@ (define-public chez-srfi (native-inputs (list chez-scheme)) (arguments - `(#:make-flags (let ((out (assoc-ref %outputs "out"))) - (list (string-append "PREFIX=" out) - "CHEZ=chez-scheme --libdirs ./" - (string-append "chezversion=" ,(package-version chez-scheme)))) - #:test-target "test" - #:phases (modify-phases %standard-phases - (delete 'configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (home-page "https://github.com/fedeinthemix/chez-srfi") (synopsis "SRFI libraries for Chez Scheme") (description @@ -491,42 +510,48 @@ (define-public chez-web (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b")))) (build-system gnu-build-system) (native-inputs - `(("chez-scheme" ,chez-scheme) - ("ghostscript" ,ghostscript) - ("texlive" ,(texlive-updmap.cfg (list texlive-oberdiek - texlive-epsf - texlive-metapost - texlive-charter - texlive-pdftex - texlive-context - texlive-cm - texlive-tex-plain))))) + (list chez-scheme + ghostscript + ;; FIXME: This package fails to build with the error: + ;; mktexpk: don't know how to create bitmap font for bchr8r + ;; Replacing the following with `texlive` fixes it. + ;; What is missing? + (texlive-updmap.cfg (list texlive-oberdiek + texlive-epsf + texlive-metapost + texlive-charter + texlive-pdftex + texlive-context + texlive-cm + texlive-tex-plain)))) (arguments - `(#:make-flags (list (string-append "PREFIX=" %output) - (string-append "DOCDIR=" %output "/share/doc/" - ,name "-" ,version) - (string-append "LIBDIR=" %output "/lib/chezweb") - (string-append "TEXDIR=" %output "/share/texmf-local")) - #:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - ;; This package has a custom "bootstrap" script that - ;; is meant to be run from the Makefile. - (delete 'bootstrap) - (replace 'configure - (lambda* _ - (copy-file "config.mk.template" "config.mk") - (substitute* "tangleit" - (("\\./cheztangle\\.ss" all) - (string-append "chez-scheme --program " all))) - (substitute* "weaveit" - (("mpost chezweb\\.mp") - "mpost --tex=tex chezweb.mp") - (("\\./chezweave" all) - (string-append "chez-scheme --program " all))) - (substitute* "installit" - (("-g \\$GROUP -o \\$OWNER") "")) - #t))))) + (list + #:make-flags + #~(list (string-append "PREFIX=" #$output) + (string-append "DOCDIR=" #$output "/share/doc/" + #$name "-" #$version) + ;; lib/chez-scheme/chezweb ??? + (string-append "LIBDIR=" #$output "/lib/chezweb") + (string-append "TEXDIR=" #$output "/share/texmf-local")) + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + ;; This package has a custom "bootstrap" script that + ;; is meant to be run from the Makefile. + (delete 'bootstrap) + (replace 'configure + (lambda* _ + (copy-file "config.mk.template" "config.mk") + (substitute* "tangleit" + (("\\./cheztangle\\.ss" all) + (string-append "scheme --program " all))) + (substitute* "weaveit" + (("mpost chezweb\\.mp") + "mpost --tex=tex chezweb.mp") + (("\\./chezweave" all) + (string-append "scheme --program " all))) + (substitute* "installit" + (("-g \\$GROUP -o \\$OWNER") ""))))))) (home-page "https://github.com/arcfide/ChezWEB") (synopsis "Hygienic Literate Programming for Chez Scheme") (description "ChezWEB is a system for doing Knuthian style WEB @@ -550,95 +575,78 @@ (define-public chez-sockets (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m")))) (build-system gnu-build-system) (native-inputs - `(("chez-scheme" ,chez-scheme) - ("chez-web" ,chez-web) - ("texlive" ,(texlive-updmap.cfg (list texlive-pdftex))))) + (list chez-scheme + chez-web + (texlive-updmap.cfg (list texlive-pdftex)))) (arguments - `(#:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (chez-web (assoc-ref inputs "chez-web")) - (chez (assoc-ref inputs "chez-scheme")) - (chez-h (dirname (car (find-files chez "scheme\\.h"))))) - (substitute* "Makefile" - (("(SCHEMEH=).*$" all var) - (string-append var chez-h))) - #t))) - (add-before 'build 'tangle - (lambda* (#:key inputs #:allow-other-keys) - (setenv "TEXINPUTS" - (string-append - (getcwd) ":" - (assoc-ref inputs "chez-web") "/share/texmf-local/tex/generic:" - ":")) - ;; just using "make" tries to build the .c files before - ;; they are created. - (and (invoke "make" "sockets") - (invoke "make")))) - (replace 'build - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (chez-site (string-append out "/lib/csv" - ,(package-version chez-scheme) - "-site/arcfide"))) - ;; make sure Chez Scheme can find the shared libraries. - (substitute* "sockets.ss" - (("(load-shared-object) \"(socket-ffi-values\\.[sd][oy].*)\"" - all cmd so) - (string-append cmd " \"" chez-site "/" so "\"")) - (("sockets-stub\\.[sd][oy].*" all) - (string-append chez-site "/" all))) - ;; to compile chez-sockets, the .so files must be - ;; installed (because of the absolute path we - ;; inserted above). - (for-each (lambda (f d) (install-file f d)) - '("socket-ffi-values.so" "sockets-stub.so") - (list chez-site chez-site)) - (zero? (system "echo '(compile-file \"sockets.sls\")' | scheme -q"))))) - (replace 'install - (lambda* (#:key outputs inputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib/chez-sockets")) - (doc (string-append out "/share/doc/" ,name "-" ,version)) - (chez-site (string-append out "/lib/csv" - ,(package-version chez-scheme) + (list + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let* ((scheme (search-input-file (or native-inputs inputs) + "/bin/scheme")) + (lib (string-append (dirname scheme) "/../lib")) + (header-file (car (find-files lib "scheme\\.h"))) + (include-dir (dirname header-file))) + (substitute* "Makefile" + (("(SCHEMEH=).*$" _ var) + (string-append var include-dir)))))) + (add-before 'build 'tangle + (lambda* (#:key inputs #:allow-other-keys) + (setenv "TEXINPUTS" + (string-append + (getcwd) ":" + (assoc-ref inputs "chez-web") + "/share/texmf-local/tex/generic:" + ":")) + ;; just using "make" tries to build the .c files before + ;; they are created. + (and (invoke "make" "sockets") + (invoke "make")))) + (replace 'build + (lambda args + (let ((chez-site (string-append #$output + "/lib/csv" + (package-version chez-scheme) "-site/arcfide"))) - (for-each (lambda (f d) (install-file f d)) - '("sockets.pdf" "sockets.so") - (list doc chez-site)) - #t)))))) + ;; make sure Chez Scheme can find the shared libraries. + (substitute* "sockets.ss" + (("(object \")(socket-ffi-values\\.[sd][oy][^\"]*)(\")" + _ pre file post) + (string-append pre chez-site "/" file post)) + (("(\")(sockets-stub\\.[sd][oy][^\"]*)(\")" + _ pre file post) + (string-append pre chez-site "/" file post))) + ;; to compile chez-sockets, the .so files must be + ;; installed (because of the absolute path we + ;; inserted above). + (for-each (lambda (f) + (install-file f chez-site)) + '("socket-ffi-values.so" + "sockets-stub.so")) + (invoke "bash" + "-c" + (format #f "echo '~s' | scheme -q" + '(compile-file "sockets.sls")))))) + (replace 'install + (lambda args + (install-file "sockets.so" + (string-append #$output + "/lib/csv" + #$(package-version chez-scheme) + "-site/arcfide")) + (install-file "sockets.pdf" + (string-append #$output + "/share/doc/" + #$name "-" #$version))))))) (home-page "https://github.com/arcfide/chez-sockets") (synopsis "Extensible sockets library for Chez Scheme") (description "Chez-sockets is an extensible sockets library for Chez Scheme.") (license expat)))) -;; Help function for Chez Scheme to add the current path to -;; CHEZSCHEMELIBDIRS. -(define chez-configure - '(lambda _ - (let ((chez-env (getenv "CHEZSCHEMELIBDIRS"))) - (setenv "CHEZSCHEMELIBDIRS" - (if chez-env - (string-append ".:" chez-env) - ".")) - #t))) - -;; Help function to define make flags for some Chez Scheme custom make -;; files. -(define (chez-make-flags name version) - `(let ((out (assoc-ref %outputs "out"))) - (list - ;; Set 'chezversion' so that libraries are installed in - ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. - (string-append "chezversion=" ,(package-version chez-scheme)) - (string-append "PREFIX=" out) - (string-append "DOCDIR=" out "/share/doc/" - ,name "-" ,version)))) - (define-public chez-matchable (package (name "chez-matchable") @@ -659,10 +667,11 @@ (define-public chez-matchable (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (synopsis "Portable hygienic pattern matcher for Scheme") (description "This package provides a superset of the popular Scheme @code{match} package by Andrew Wright, written in fully portable @@ -690,10 +699,11 @@ (define-public chez-irregex (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (home-page "https://github.com/fedeinthemix/chez-irregex") (synopsis "Portable regular expression library for Scheme") (description "This package provides a portable and efficient @@ -720,17 +730,18 @@ (define-public chez-fmt (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "chez-check" - #:phases - (modify-phases %standard-phases - (replace 'configure ,chez-configure) - (replace 'build - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "chez-build" make-flags))) - (replace 'install - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "chez-install" make-flags)))))) + (list #:make-flags (chez-make-flags name version) + #:test-target "chez-check" + #:phases + #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure) + (replace 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "chez-build" make-flags))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "chez-install" make-flags)))))) (home-page "http://synthcode.com/scheme/fmt") (synopsis "Combinator formatting library for Chez Scheme") (description "This package provides a library of procedures for @@ -760,10 +771,11 @@ (define-public chez-mit (native-inputs (list chez-scheme)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:test-target "test" - #:phases (modify-phases %standard-phases - (replace 'configure ,chez-configure)))) + (list #:make-flags (chez-make-flags name version) + #:test-target "test" + #:phases #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure)))) (synopsis "MIT/GNU Scheme compatibility library for Chez Scheme") (description "This package provides a set of MIT/GNU Scheme compatibility libraries for Chez Scheme. The main goal was to provide the functionality @@ -792,46 +804,44 @@ (define-public chez-scmutils (propagated-inputs (list chez-mit chez-srfi)) (arguments - `(#:make-flags ,(chez-make-flags name version) - #:tests? #f ; no test suite - #:phases - (modify-phases %standard-phases - (replace 'configure ,chez-configure) - ;; Since the documentation is lacking, we install the source - ;; code. For things to work correctly we have to replace - ;; relative paths by absolute ones in 'include' forms. This - ;; in turn requires us to compile the files in the final - ;; destination. - (delete 'build) - (add-after 'install 'install-src - (lambda* (#:key (make-flags '()) #:allow-other-keys) - (apply invoke "make" "install-src" make-flags))) - (add-after 'install-src 'absolute-path-in-scm-files - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each (lambda (file) - (substitute* file - (("include +\"\\./scmutils") - (string-append "include \"" (dirname file))))) - (find-files out "\\.sls")) - (for-each (lambda (file) - (substitute* file - (("include +\"\\./scmutils/simplify") - (string-append "include \"" (dirname file))))) - (find-files out "fbe-syntax\\.scm")) - #t))) - (add-after 'absolute-path-in-scm-files 'build - (lambda* (#:key outputs (make-flags '()) #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (mk-file (car (find-files out "Makefile")))) - (with-directory-excursion (dirname mk-file) - (apply invoke "make" "build" make-flags))))) - (add-after 'build 'clean-up - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out"))) - (for-each delete-file - (find-files out "Makefile|compile-all\\.ss")) - #t)))))) + (list + #:make-flags (chez-make-flags name version) + #:tests? #f ; no test suite + #:phases + #~(modify-phases %standard-phases + (replace 'configure + #$chez-configure) + ;; Since the documentation is lacking, we install the source + ;; code. For things to work correctly we have to replace + ;; relative paths by absolute ones in 'include' forms. This + ;; in turn requires us to compile the files in the final + ;; destination. + (delete 'build) + (add-after 'install 'install-src + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "make" "install-src" make-flags))) + (add-after 'install-src 'absolute-path-in-scm-files + (lambda* (#:key #:allow-other-keys) + (for-each (lambda (file) + (substitute* file + (("include +\"\\./scmutils") + (string-append "include \"" (dirname file))))) + (find-files #$output "\\.sls")) + (for-each (lambda (file) + (substitute* file + (("include +\"\\./scmutils/simplify") + (string-append "include \"" (dirname file))))) + (find-files #$output "fbe-syntax\\.scm")))) + (add-after 'absolute-path-in-scm-files 'build + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (let ((mk-file (car (find-files #$output "Makefile")))) + (with-directory-excursion (dirname mk-file) + (apply invoke "make" "build" make-flags))))) + (add-after 'build 'clean-up + (lambda args + (for-each delete-file + (find-files #$output + "Makefile|compile-all\\.ss"))))))) (synopsis "Port of MIT/GNU Scheme Scmutils to Chez Scheme") (description "This package provides a port of the MIT/GNU Scheme Scmutils program to Chez Scheme. The port consists of a set of From patchwork Sun Feb 27 21:29:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37543 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 7542927BBE9; Sun, 27 Feb 2022 21:32:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 CD56127BBEA for ; Sun, 27 Feb 2022 21:32:43 +0000 (GMT) Received: from localhost ([::1]:60318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9n-0001Hu-0H for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:32:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR9B-0000YD-GE for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR9B-0005fP-6B for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR9B-0008I8-3K for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search path. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:32:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599751731804 (code B ref 53878); Sun, 27 Feb 2022 21:32:05 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:57 +0000 Received: from localhost ([127.0.0.1]:59369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR93-0008Gt-Hw for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:57 -0500 Received: from mail-qk1-f178.google.com ([209.85.222.178]:36388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8p-0008GD-K5 for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:44 -0500 Received: by mail-qk1-f178.google.com with SMTP id g24so9008093qkl.3 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:31: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=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=; b=Jz0jdKoEbGrUhpw14HKNTYAeAtljTdq6GXAU6+RERIyIzSCXbp113frdKD20IfhFPG 1CbtBgYxg3fu6B0nMiMrja/kFbZXtoDsfAJekYENPCTWCLL9BA68psFAmd0jFY5iQx/Q iBlFY/mDuIg30J1J8z+1Y7wPsZ/2arBsSz2WtyJCHEP9gZXWN4gUbLW1YqTW+EfZ9Zin 5MwOQBKmakTaDPk43E8dRa5YZQVaLfLoJNsc0V5oGhuUrho73MVz+hiNYw/ZJQ4n+fYY pvb7zA01LSwZnfTL1Tme7pKju57Ovk6c92Kji1kxgAQN4ZuR7+bcLgsV9vLlbkI0V+Gz jw6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=; b=wKRhH5s6kgluMdIpmu4TQX/ZMAFfccRFI1opjsEqIHGcqtdglVWUKo7THIQ29yaCC/ 68WY13cvtsiuEuI4Ep/NZsjLwX99K7tbVMaeSAvj+AcYRo9jVdUndih18frNyRrr3b/+ AyX7GMPKeDyqt+ze/EsUY23Bjt408wOEpqodT07Nt7oApYtl/pjqrA5V0AJnDpd67e8N Jk+hd+WAdHriZ/rXjrXB7aTKWuvEGSu3SY4BxRVPjXNNAILzhZT9car6T4Gt5jOdtWUL FL1Y1+r7nv4uN/McABlBAb4Xi0fqKCnrxVX24H7ryf/Gh7Qa3EeBvKnqpyZyfrbDsxfF Jnzg== X-Gm-Message-State: AOAM531MCmHDGVi+kFLLHymWEU1qZlJYwuBEueBANQu6FlZrWkBU7Xgh uTUoYWsRqed0ZzeTcM8S2BQRhLtWFy/DRVEAuwg= X-Google-Smtp-Source: ABdhPJxpUXGbxjZWYcoDRskZr35jvEHGN0XpwvzPTyYl0+6cU27KydJomXmAJmnNt6zr/J2Ln1nUWA== X-Received: by 2002:a05:620a:ecb:b0:646:d52f:6424 with SMTP id x11-20020a05620a0ecb00b00646d52f6424mr9935320qkm.375.1645997498019; Sun, 27 Feb 2022 13:31:38 -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-20020ac85fca000000b002dce6b890casm5601067qta.40.2022.02.27.13.31.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:31:37 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:11 -0500 Message-Id: <20220227212920.2009000-16-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches There does not seem to be any widely accepted standard path to use for "CHEZSCHEMELIBDIRS". Using a path without a version number in it avoids having to compute the actual path everywhere, which would be especially unpleasant when support is added for the Racket variant of Chez Scheme, which always has a different version number than upstream. * gnu/packages/chez.scm (chez-scheme)[native-search-paths]: Change to use "lib/chez-scheme" instead of "lib/csvX.Y.Z-site" for "CHEZSCHEMELIBDIRS". (chez-make-flags): Update accordingly. (chez-sockets)[arguments]<#:phases>: Likewise. --- gnu/packages/chez.scm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 4ee9711bb4..f4c87fbcf7 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -233,7 +233,7 @@ (define-public chez-scheme (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") - (files (list (string-append "lib/csv" version "-site")))))) + (files '("lib/chez-scheme"))))) (outputs '("out" "doc")) (arguments `(#:modules @@ -458,9 +458,9 @@ (define chez-configure (define (chez-make-flags name version) #~(let ((out #$output)) (list - ;; Set 'chezversion' so that libraries are installed in - ;; 'lib/csvX.Y.Z-site' like Chez's 'native-search-paths' expects. - (string-append "chezversion=" #$(package-version chez-scheme)) + ;; Set 'schemedir' so that libraries are installed in + ;; 'lib/chez-scheme' like Chez's 'native-search-paths' expects. + (string-append "schemedir=" out "/lib/chez-scheme") (string-append "PREFIX=" out) (string-append "DOCDIR=" out "/share/doc/" #$name "-" #$version)))) @@ -608,9 +608,7 @@ (define-public chez-sockets (replace 'build (lambda args (let ((chez-site (string-append #$output - "/lib/csv" - (package-version chez-scheme) - "-site/arcfide"))) + "/lib/chez-scheme/arcfide"))) ;; make sure Chez Scheme can find the shared libraries. (substitute* "sockets.ss" (("(object \")(socket-ffi-values\\.[sd][oy][^\"]*)(\")" @@ -634,9 +632,7 @@ (define-public chez-sockets (lambda args (install-file "sockets.so" (string-append #$output - "/lib/csv" - #$(package-version chez-scheme) - "-site/arcfide")) + "/lib/chez-scheme/arcfide")) (install-file "sockets.pdf" (string-append #$output "/share/doc/" From patchwork Sun Feb 27 21:29:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37545 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 E647E27BBEC; Sun, 27 Feb 2022 21:33:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 3D66627BBE9 for ; Sun, 27 Feb 2022 21:33:19 +0000 (GMT) Received: from localhost ([::1]:32866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORAM-0001rt-DM for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:33:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORA6-0001rH-PB for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORA6-0005qc-H8 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORA6-0008KH-EC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 16/24] gnu: chez-scheme: Use shared zlib and lz4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599752631899 (code B ref 53878); Sun, 27 Feb 2022 21:33:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:06 +0000 Received: from localhost ([127.0.0.1]:59380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9B-0008IR-Tw for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:06 -0500 Received: from mail-qv1-f42.google.com ([209.85.219.42]:36770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR93-0008Gm-Va for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:31:58 -0500 Received: by mail-qv1-f42.google.com with SMTP id w7so11006304qvr.3 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:31:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=; b=IPorIX7r+FsRmtND+GpPcIiTAgwZBRSol5ueCBMQJsxmVPNWeckTnk7B88IJVTgy3r EOAFs7CjcnUGU5sA78Me64uT3S2crP8HDfrbXzQnTRH3eQb6T6wj7Bunra0HXULIofKG M66bS/QPuzTD4GyK3e28jEd51r6d2IoFM4KbJ1u/EzpjjyjzgbQUDimUF9VZZu24yeZI ydKHxt3NEY0v77c5qTo24vEj8utZAN+HPQ0yzZcrdVX4YMrHUPE/oEAd8Spvq4CrArg5 QRFw6vOXkt0MceGTv2lpQxJPYGNTc5S8MNrXBWVpYttEL9JrxOUzEPcHqBphgLmeGC8N nXxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=; b=1W0looIXIPhdxA127JJbmdjXMRl7qBgLQg4WksKV8RH4zqHowUQfPNLhxm/pjClgi8 MHUOIgUOS7aB2Cnt86kNB8x4na72BkcicSg0O6fMP0nN2tSH8T/HOZFZfRRTWrVuvrPW 4RNi5UrIENubdThqot3RKJya30FGY2X2FdVPWBaxy/elEU8gUZcihhtaW4j+iL7MTgp6 XXyoEfL7n1BObZV6szQh3NB/ev/QOvzjdjIZiZ8DG9rf0WRQ/MvS5Kje2pUWrN0vyR72 a+d/b/N2Ir1Pj+oxx8ernuyt2xwODyk5KV7DigSRmlyzSZfzIg3NWAwh3BynWZtzvQPR thRA== X-Gm-Message-State: AOAM533kDIPAytxlHgbDOhi4tstL4yJ1tyVmD4/aQq4HszbMVzxKwnq/ oc2QeERM+3+QKYwjWoxsyvnxshYFECtdiUg0TIY= X-Google-Smtp-Source: ABdhPJw1IRvYjzO8oBWeHNwMmdkS1almQPl+B+nf5WyloOphCunyVVZUZi0RXUicYPBisAhYFRQqKw== X-Received: by 2002:ad4:5f4b:0:b0:432:2ab5:e670 with SMTP id p11-20020ad45f4b000000b004322ab5e670mr12116555qvg.50.1645997512417; Sun, 27 Feb 2022 13:31:52 -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 i133-20020a379f8b000000b0060ded9f21d6sm4268458qke.102.2022.02.27.13.31.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:31:52 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:12 -0500 Message-Id: <20220227212920.2009000-17-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This change also involves building 'libkernel.a' instead of 'kernel.o'. Support for these build options was merged upstream in 2019: see discussion at . * gnu/packages/chez.scm (chez-scheme)[inputs]: Remove 'zlib:static' and 'lz4:static'. [arguments]: Adjust configure phase accordingly. --- gnu/packages/chez.scm | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index f4c87fbcf7..dd40baa719 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -211,9 +211,7 @@ (define-public chez-scheme (inputs `(("libuuid" ,util-linux "lib") ("zlib" ,zlib) - ("zlib:static" ,zlib "static") ("lz4" ,lz4) - ("lz4:static" ,lz4 "static") ;; for expeditor: ("ncurses" ,ncurses) ;; for X11 clipboard support in expeditor: @@ -266,14 +264,14 @@ (define src (lz4-static (assoc-ref inputs "lz4:static")) (out (assoc-ref outputs "out")) ;; add flags which are always required: - (flags (cons* - (string-append "--installprefix=" out) - (string-append "ZLIB=" zlib-static "/lib/libz.a") - (string-append "LZ4=" lz4-static "/lib/liblz4.a") - ;; Guix will do compress man pages, - ;; and letting Chez try causes an error - "--nogzip-man-pages" - configure-flags))) + (flags (cons* (string-append "--installprefix=" out) + "ZLIB=-lz" + "LZ4=-llz4" + "--libkernel" + ;; Guix will do compress-man-pages, + ;; and letting Chez try causes an error + "--nogzip-man-pages" + configure-flags))) (format #t "configure flags: ~s~%" flags) ;; Some makefiles (for tests) don't seem to propagate CC ;; properly, so we take it out of their hands: From patchwork Sun Feb 27 21:29:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37547 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 8A14827BBEC; Sun, 27 Feb 2022 21:33:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 99A3E27BBEB for ; Sun, 27 Feb 2022 21:33:19 +0000 (GMT) Received: from localhost ([::1]:32864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORAM-0001rs-OQ for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:33:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORA7-0001rJ-6n for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37260) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORA6-0005qh-TU for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORA6-0008KO-Qx for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 17/24] gnu: chez-scheme: Use new package style. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599753931927 (code B ref 53878); Sun, 27 Feb 2022 21:33:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:19 +0000 Received: from localhost ([127.0.0.1]:59383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9O-0008Is-7k for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:18 -0500 Received: from mail-qk1-f172.google.com ([209.85.222.172]:36403) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9M-0008If-Ne for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:17 -0500 Received: by mail-qk1-f172.google.com with SMTP id g24so9008612qkl.3 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:32: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=uPIL5IDRL6r3Vp/3b7kyLhVyDcXw0EZXoLTn9G04Hwg=; b=aQWg3FAJOFFgLnofUhznfAEnHT0g8IGOShcAyMH66G87E6cHWRTjzkjoAVDd0CFa5r DHcx9WfrniHYotXmZkYdphE+8vnUXH7ul/ED01u35s+t3i0xBohXKXK0vd8nPdn+SCfG JoFG1jp565ruyTOrMRB+HZwot3C6nAiZJvj8NQn1n5jSrSZC+Ub4Y3lBaTaW8QM2HOg+ T2J+j8LPpyKaLuYyVw7k9PR6RDNX937taljemsqCaM+LIsoxAjMezRGfBGXAN0uxa1bZ J9TMrEOiRQJDrlVTdS0IY1DaStqK44i0uR6C82YvqhoJ+WaO0o2txhJ6URJhCWXaQPSY 5ebQ== 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=uPIL5IDRL6r3Vp/3b7kyLhVyDcXw0EZXoLTn9G04Hwg=; b=f2jXGMR+nGiBbMJRIqVteDxmnRISTvHnVjgZtIYyOnOZVKLJRiwq/vzl5jG4LdFAZv XJDgv7OEy9Ge++dX7oOo9R09t5K4TxEBK0ILfQNqSNXzp6adH+ZaP3t90dKXwl4ldqrp xtL4mXIR3oTLrn3EEdAvXlqlMQIZqAACOl+wXiqO+G4M4iVmc3OGOpIWYTQXjRFfZXcc nCwMWy6KACd/JHIL9TnyDMDxtcyC/FKHxF523FDnJH5y08MGbyaJ3oNSoSf3uE4B5Rbq F1QiPAfdylpjMP0pJKwI/dnhM+hbgkY/exeQsQw18pDS6UiovzaoHyESKDaKcZuybpPO 8dtw== X-Gm-Message-State: AOAM532Jr96Vx0nHParbQf2aGLAEumJ+74E5laockGCb4j8YhcfHwJJm RnN3lglPgQUx9EcOxTbt/T1o3drUSWzmso3DAVw= X-Google-Smtp-Source: ABdhPJw/zLiBoiY3ZF4GUpdrQHYVOMAB44yqt2egVzxGzT+6FWSq+ROFdvKl+MOjMY3dwr40xdXLHA== X-Received: by 2002:ae9:e714:0:b0:608:b52d:87f3 with SMTP id m20-20020ae9e714000000b00608b52d87f3mr9991622qka.171.1645997530918; Sun, 27 Feb 2022 13:32: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 d12-20020a05620a158c00b00648ec3fcbdfsm4099972qkk.72.2022.02.27.13.32.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:32:10 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:13 -0500 Message-Id: <20220227212920.2009000-18-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (chez-scheme)[inputs]: Remove labels. [native-inputs]: Likewise. [arguments]: Use G-expressions. <#:phases>: Use 'search-input-file' instead of 'assoc-ref'. (nanopass): Make public as a temporary workaround for Racket. * gnu/packages/racket.scm (make-unpack-nanopass+stex): Update accordingly. --- gnu/packages/chez.scm | 286 +++++++++++++++++++--------------------- gnu/packages/racket.scm | 5 +- 2 files changed, 135 insertions(+), 156 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index dd40baa719..ad263a8fe3 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -158,7 +158,7 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; -(define nanopass +(define-public nanopass (let ((version "1.9.2")) (origin (method git-fetch) @@ -185,86 +185,80 @@ (define stex (define-public chez-scheme (package (name "chez-scheme") + ;; The version should match `(scheme-version-number)`. + ;; See s/cmacros.ss c. line 360. (version "9.5.6") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/cisco/ChezScheme") - (commit (string-append "v" version)))) - (sha256 - (base32 "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky")) - (file-name (git-file-name name version)) - (snippet - ;; Remove bundled libraries. - (with-imported-modules '((guix build utils)) - #~(begin - (use-modules (guix build utils)) - (for-each (lambda (dir) - (when (directory-exists? dir) - (delete-file-recursively dir))) - '("stex" - "nanopass" - "lz4" - "zlib"))))))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/cisco/ChezScheme") + (commit (string-append "v" version)))) + (sha256 + (base32 + "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky")) + (file-name (git-file-name name version)) + (snippet #~(begin + (use-modules (guix build utils)) + (for-each (lambda (dir) + (when (directory-exists? dir) + (delete-file-recursively dir))) + '("stex" + "nanopass" + "lz4" + "zlib")))))) (build-system gnu-build-system) (inputs - `(("libuuid" ,util-linux "lib") - ("zlib" ,zlib) - ("lz4" ,lz4) - ;; for expeditor: - ("ncurses" ,ncurses) - ;; for X11 clipboard support in expeditor: - ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 - ("libx11" ,libx11))) + (list + `(,util-linux "lib") ;<-- libuuid + zlib + lz4 + ncurses ;<-- for expeditor + ;; for X11 clipboard support in expeditor: + ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 + libx11)) (native-inputs - `(("nanopass" ,nanopass) ; source only - ;; for docs - ("stex" ,stex) - ("xorg-rgb" ,xorg-rgb) - ("texlive" ,(texlive-updmap.cfg (list texlive-dvips-l3backend - texlive-epsf - texlive-fonts-ec - texlive-oberdiek))) - ("ghostscript" ,ghostscript) - ("netpbm" ,netpbm))) + (list nanopass ; source only + ;; for docs + stex + xorg-rgb + (texlive-updmap.cfg (list texlive-dvips-l3backend + texlive-epsf + texlive-fonts-ec + texlive-oberdiek)) + ghostscript + netpbm)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") (files '("lib/chez-scheme"))))) (outputs '("out" "doc")) (arguments - `(#:modules - ((guix build gnu-build-system) + (list + #:modules + '((guix build gnu-build-system) (guix build utils) (ice-9 ftw) (ice-9 match)) - #:test-target "test" - #:configure-flags - '("--threads") ;; TODO when we fix armhf, it doesn't support --threads - #:phases - (modify-phases %standard-phases - ;; put these where configure expects them to be - (add-after 'unpack 'unpack-nanopass+stex - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (for-each (lambda (dep) - (define src - (assoc-ref (or native-inputs inputs) dep)) - (copy-recursively src dep - #:keep-mtime? #t)) - '("nanopass" "stex")))) - ;; NOTE: the custom Chez 'configure' script doesn't allow - ;; unrecognized flags, such as those automatically added - ;; by `gnu-build-system`. - (replace 'configure - (lambda* (#:key inputs outputs - (configure-flags '()) - #:allow-other-keys) - (let* ((zlib-static (assoc-ref inputs "zlib:static")) - (lz4-static (assoc-ref inputs "lz4:static")) - (out (assoc-ref outputs "out")) - ;; add flags which are always required: - (flags (cons* (string-append "--installprefix=" out) + #:test-target "test" + ;; TODO when we fix armhf, it may not support --threads + #:configure-flags #~'("--threads") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-nanopass+stex + (lambda args + (copy-recursively #$nanopass + "nanopass" + #:keep-mtime? #t) + (copy-recursively #$stex + "stex" + #:keep-mtime? #t))) + ;; NOTE: the custom Chez 'configure' script doesn't allow + ;; unrecognized flags, such as those automatically added + ;; by `gnu-build-system`. + (replace 'configure + (lambda* (#:key inputs (configure-flags '()) #:allow-other-keys) + ;; add flags which are always required: + (let ((flags (cons* (string-append "--installprefix=" #$output) "ZLIB=-lz" "LZ4=-llz4" "--libkernel" @@ -272,90 +266,78 @@ (define src ;; and letting Chez try causes an error "--nogzip-man-pages" configure-flags))) - (format #t "configure flags: ~s~%" flags) - ;; Some makefiles (for tests) don't seem to propagate CC - ;; properly, so we take it out of their hands: - (setenv "CC" ,(cc-for-target)) - (setenv "HOME" "/tmp") - (apply invoke - "./configure" - flags)))) - ;; The binary file name is called "scheme" as is the one from MIT/GNU - ;; Scheme. We add a symlink to use in case both are installed. - (add-after 'install 'install-symlink - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib")) - (name "chez-scheme")) - (symlink (string-append bin "/scheme") - (string-append bin "/" name)) - (map (lambda (file) - (symlink file (string-append (dirname file) - "/" name ".boot"))) - (find-files lib "scheme.boot"))))) - ;; Building explicitly lets us avoid using substitute* - ;; to re-write makefiles. - (add-after 'install-symlink 'prepare-stex - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((stex+version - (strip-store-file-name - (assoc-ref (or native-inputs inputs) "stex"))) - ;; Eventually we want to install stex as a real - ;; package so it's reusable. For now: - (stex-output "/tmp") - (doc-dir (string-append stex-output - "/share/doc/" - stex+version))) - (with-directory-excursion "stex" - (invoke "make" - "install" - (string-append "LIB=" - stex-output - "/lib/" - stex+version) - (string-append "Scheme=" - (assoc-ref outputs "out") - "/bin/scheme")) - (for-each (lambda (pth) - (install-file pth doc-dir)) - '("ReadMe" ; includes the license - "doc/stex.html" - "doc/stex.css" - "doc/stex.pdf")))))) - ;; Building the documentation requires stex and a running scheme. - ;; FIXME: this is probably wrong for cross-compilation - (add-after 'prepare-stex 'install-doc - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - (let* ((chez+version (strip-store-file-name - (assoc-ref outputs "out"))) - (stex+version - (strip-store-file-name - (assoc-ref (or native-inputs inputs) "stex"))) - (scheme (string-append (assoc-ref outputs "out") - "/bin/scheme")) - ;; see note on stex-output in phase build-stex, above: - (stexlib (string-append "/tmp" - "/lib/" - stex+version)) - (doc-dir (string-append (assoc-ref outputs "doc") - "/share/doc/" - chez+version))) - (define* (stex-make #:optional (suffix "")) - (invoke "make" - "install" - (string-append "Scheme=" scheme) - (string-append "STEXLIB=" stexlib) - (string-append "installdir=" doc-dir suffix))) - (with-directory-excursion "csug" - (stex-make "/csug")) - (with-directory-excursion "release_notes" - (stex-make "/release_notes")) - (with-directory-excursion doc-dir - (symlink "release_notes/release_notes.pdf" - "release_notes.pdf") - (symlink "csug/csug9_5.pdf" - "csug.pdf")))))))) + (format #t "configure flags: ~s~%" flags) + ;; Some makefiles (for tests) don't seem to propagate CC + ;; properly, so we take it out of their hands: + (setenv "CC" #$(cc-for-target)) + (setenv "HOME" "/tmp") + (apply invoke "./configure" flags)))) + ;; The binary file name is called "scheme" as is the one from + ;; MIT/GNU Scheme. We add a symlink to use in case both are + ;; installed. + (add-after 'install 'install-symlink + (lambda* (#:key outputs #:allow-other-keys) + (let* ((scheme (search-input-file outputs "/bin/scheme")) + (bin-dir (dirname scheme))) + (symlink scheme + (string-append bin-dir "/chez-scheme")) + (match (find-files (string-append bin-dir "/../lib") + "scheme.boot") + ((scheme.boot) + (symlink scheme.boot + (string-append (dirname scheme.boot) + "/chez-scheme.boot"))))))) + ;; Building explicitly lets us avoid using substitute* + ;; to re-write makefiles. + (add-after 'install-symlink 'prepare-stex + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + ;; Eventually we want to install stex as a real + ;; package so it's reusable. For now: + (let* ((stex-output "/tmp") + (doc-dir (string-append stex-output "/share/doc/stex"))) + (with-directory-excursion "stex" + (invoke "make" + "install" + (string-append "LIB=" + stex-output + "/lib/stex") + (string-append "Scheme=" + (search-input-file outputs + "/bin/scheme"))) + (for-each (lambda (pth) + (install-file pth doc-dir)) + '("ReadMe" ; includes the license + "doc/stex.html" + "doc/stex.css" + "doc/stex.pdf")))))) + ;; Building the documentation requires stex and a running scheme. + ;; FIXME: this is probably wrong for cross-compilation + (add-after 'prepare-stex 'install-doc + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (match (assoc-ref outputs "doc") + (#f + (format #t "not installing docs~%")) + (doc-prefix + (let* ((chez+version (strip-store-file-name #$output)) + (scheme (search-input-file outputs "/bin/scheme")) + (stexlib "/tmp/lib/stex") + (doc-dir (string-append doc-prefix + "/share/doc/" + chez+version))) + (define* (stex-make #:optional (suffix "")) + (invoke "make" "install" + (string-append "Scheme=" scheme) + (string-append "STEXLIB=" stexlib) + (string-append "installdir=" doc-dir suffix))) + (with-directory-excursion "csug" + (stex-make "/csug")) + (with-directory-excursion "release_notes" + (stex-make "/release_notes")) + (with-directory-excursion doc-dir + (symlink "release_notes/release_notes.pdf" + "release_notes.pdf") + (symlink "csug/csug9_5.pdf" + "csug.pdf")))))))))) ;; Chez Scheme does not have a MIPS backend. ;; FIXME: Debian backports patches to get armhf working. ;; We should too. It is the Chez machine type arm32le diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 272638ca2e..035d93bfb5 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -257,10 +257,7 @@ (define (make-unpack-nanopass+stex) ;; TODO: Refactor enough to share this directly. #~(begin (copy-recursively - #$(match (assoc-ref (package-native-inputs chez-scheme) - "nanopass") - ((src) - src)) + #$nanopass "nanopass" #:keep-mtime? #t) (mkdir-p "stex") From patchwork Sun Feb 27 21:29:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37546 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 F209A27BBEC; Sun, 27 Feb 2022 21:33:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 870F227BBEA for ; Sun, 27 Feb 2022 21:33:19 +0000 (GMT) Received: from localhost ([::1]:32868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORAM-0001ru-J0 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:33:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORA7-0001rY-MG for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37261) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORA7-0005qo-Ak for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORA7-0008KV-83 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 18/24] gnu: Add stex. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599755731958 (code B ref 53878); Sun, 27 Feb 2022 21:33:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:37 +0000 Received: from localhost ([127.0.0.1]:59386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9g-0008JO-UV for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:37 -0500 Received: from mail-qv1-f48.google.com ([209.85.219.48]:46982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9e-0008JA-Tt for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:35 -0500 Received: by mail-qv1-f48.google.com with SMTP id j5so10911660qvs.13 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:32: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=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=; b=NSv4kgpBebf0AjA5esL1lWiRNQjDzONRN+i14fdrapXHoHubod7BpJefd23SWXwa5j qgwGWuWGGZg4aBdj7wIuQq8e3cCQUvx+5ijfGOv9oR5hH6y30h0IphPMaCcJkuYdLsLD eRw3Giu6uxdTuicYeLCxpYTiHkk7vF3kM+7R+zzYiPTfQtYz7SKWkP0x4/5lvzgDeVE9 X1kkDY/FfimX2NGY3T3gaaPpDxFpLof6iEN85wqO/neHQqfw99axmdvd2TiFqfweqUb6 xuum/R6jVhTfOeC1jZZsn0riegWtOPVfGEvRAju2mQIUI9boT6iHeaLuCx4BEPHaqgI/ 5DSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=; b=Dbe6vt5mpwBBkWdPySVj3iF5J2qkn76sIy7Rqg5CDbHjReE3idWnx7aLJobpFI8IqF YnxR9YKO/dntPZmDMdXcd5WW49JUEaAQI7JKXBUksWSI5BI3pG/7NojB3O+hH/obEwpg JPfjRHVFQRdbpkOG7UznmtzNQcCIm2gnrXuNDolaF4yGVS2BWlZDvzcouqcaBvy/JjL/ rRYldpMKd7mf2WkVO7lYAlTvWvsQUSed/eYR8xixD2Q/TzqXK5jr3OnLm2q2DTErPkP4 Gz/NaFOc+B5aQn4hqh+DCY2PbPZ5JhaWsPA2TinuTKbZfvWOlx7pVouVHN7iWtcOC3f+ DhpQ== X-Gm-Message-State: AOAM532DgjBSBs5EueVMICvVtRzgYFjMpO6Ltls6b87tfPcoDn+p3i7u I8+NZslFKIDEzFvW/hm83u75QTCb08czEeTD0G0= X-Google-Smtp-Source: ABdhPJzV4wiA6H3ZJEzpczcQR5ifcvmWH0XMa9LbAx++dfVMXKDesCga56xh0/CQVKdBfoMlS4cuuQ== X-Received: by 2002:ad4:5ceb:0:b0:431:de28:665d with SMTP id iv11-20020ad45ceb000000b00431de28665dmr12263558qvb.58.1645997549244; Sun, 27 Feb 2022 13:32: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 i128-20020a378686000000b00648ddd8a5c0sm4102153qkd.100.2022.02.27.13.32.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:32:29 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:14 -0500 Message-Id: <20220227212920.2009000-19-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (stex-bootstrap): New hidden package. (stex): Change from origin to package inheriting from 'stex-bootstrap' (chez-scheme)[native-inputs]: Add 'stex-bootstrap'. Remove dependencies of stex-bootstrap. [arguments]<#:phases>: Remove 'prepare-stex'. Adjust 'unpack-nanopass+stex' and 'install-doc'. --- gnu/packages/chez.scm | 217 ++++++++++++++++++++++++++++++------------ 1 file changed, 155 insertions(+), 62 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index ad263a8fe3..6855195cfe 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -33,6 +33,7 @@ (define-module (gnu packages chez) #:use-module (guix gexp) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) + #:use-module (guix build-system copy) #:use-module (gnu packages compression) #:use-module (gnu packages ncurses) #:use-module (gnu packages ghostscript) @@ -158,30 +159,6 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; -(define-public nanopass - (let ((version "1.9.2")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nanopass/nanopass-framework-scheme") - (commit (string-append "v" version)))) - (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) - (file-name (git-file-name "nanopass" version))))) - -(define stex - ;; This commit includes a fix, which we would otherwise want to use as - ;; patch. Let's revert to tagged releases as soon as one becomes available. - (let* ((commit "54051494434a197772bf6ca5b4e6cf6be55f39a5") - (version "1.2.2") - (version (git-version version "1" commit))) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/dybvig/stex") - (commit commit))) - (sha256 (base32 "01jnvw8qw33gnpzwrakwhsr05h6b609lm180jnspcrb7lds2p23d")) - (file-name (git-file-name "stex" version))))) - (define-public chez-scheme (package (name "chez-scheme") @@ -218,15 +195,7 @@ (define-public chez-scheme libx11)) (native-inputs (list nanopass ; source only - ;; for docs - stex - xorg-rgb - (texlive-updmap.cfg (list texlive-dvips-l3backend - texlive-epsf - texlive-fonts-ec - texlive-oberdiek)) - ghostscript - netpbm)) + stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -249,9 +218,11 @@ (define-public chez-scheme (copy-recursively #$nanopass "nanopass" #:keep-mtime? #t) - (copy-recursively #$stex - "stex" - #:keep-mtime? #t))) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -287,32 +258,9 @@ (define-public chez-scheme (symlink scheme.boot (string-append (dirname scheme.boot) "/chez-scheme.boot"))))))) - ;; Building explicitly lets us avoid using substitute* - ;; to re-write makefiles. - (add-after 'install-symlink 'prepare-stex - (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) - ;; Eventually we want to install stex as a real - ;; package so it's reusable. For now: - (let* ((stex-output "/tmp") - (doc-dir (string-append stex-output "/share/doc/stex"))) - (with-directory-excursion "stex" - (invoke "make" - "install" - (string-append "LIB=" - stex-output - "/lib/stex") - (string-append "Scheme=" - (search-input-file outputs - "/bin/scheme"))) - (for-each (lambda (pth) - (install-file pth doc-dir)) - '("ReadMe" ; includes the license - "doc/stex.html" - "doc/stex.css" - "doc/stex.pdf")))))) ;; Building the documentation requires stex and a running scheme. ;; FIXME: this is probably wrong for cross-compilation - (add-after 'prepare-stex 'install-doc + (add-after 'install-symlink 'install-doc (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (match (assoc-ref outputs "doc") (#f @@ -320,7 +268,9 @@ (define-public chez-scheme (doc-prefix (let* ((chez+version (strip-store-file-name #$output)) (scheme (search-input-file outputs "/bin/scheme")) - (stexlib "/tmp/lib/stex") + (stexlib (search-input-directory (or native-inputs + inputs) + "/lib/stex")) (doc-dir (string-append doc-prefix "/share/doc/" chez+version))) @@ -420,7 +370,150 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (license (list asl2.0)))) ;; -;; Packages: +;; Chez's bootstrap dependencies: +;; + +(define-public stex-bootstrap + ;; This commit includes a fix which we would otherwise want to use as + ;; patch. Let's revert to tagged releases as soon as one becomes available. + (let ((commit "54051494434a197772bf6ca5b4e6cf6be55f39a5") + (revision "1")) + (hidden-package + (package + (name "stex") + ;; ^ Debian calls this "stex", not "chez-stex". It is a set of + ;; command-line tools, and there isn't a Scheme API, let alone a + ;; Chez-specific one, except perhaps that the Scheme examples are + ;; assumed to be Chez-compatible. + (version (git-version "1.2.2" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dybvig/stex") + (commit commit))) + (sha256 + (base32 "01jnvw8qw33gnpzwrakwhsr05h6b609lm180jnspcrb7lds2p23d")) + (file-name (git-file-name name version)) + (snippet + #~(for-each delete-file + '("sbin/install" "doc/stex.pdf" "doc/stex.html"))))) + (outputs '("out")) + (build-system copy-build-system) + ;; N.B. Upstream does not seem to support cross-compilation, + ;; though it would probably be easy to add. + (propagated-inputs + (list xorg-rgb + (texlive-updmap.cfg + (list texlive-dvips-l3backend + texlive-hyperref + texlive-bibtex + texlive-epsf + texlive-fonts-ec + texlive-oberdiek)) + ghostscript + netpbm)) + ;; Debian uses a versionless path for STEXLIB, + ;; which is much more convienient. + (arguments + (list + #:install-plan #~`(("inputs" "lib/stex/") + ("gifs" "lib/stex/") + ("math" "lib/stex/") + ("src" "lib/stex/") + ("Mf-stex" "lib/stex/") + ("Makefile.template" "lib/stex/")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'patch-sources + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (define scheme + (false-if-exception + (search-input-file inputs "/bin/scheme"))) + (when scheme + (setenv "Scheme" scheme)) + (substitute* '("Makefile.template" + "doc/Makefile") + (("STEXLIB=[^\n]*") + (string-append "STEXLIB=" #$output "/lib/stex")) + (("Scheme=[^\n]*") + (string-append "Scheme=" (or scheme "scheme")))) + (substitute* '("Mf-stex" + "math/Makefile") + (("/bin/rm") + "rm")) + (substitute* "Mf-stex" + (("SHELL=bash") + ;; avoid Solaris workaround + "#SHELL=bash")))) + (add-after 'install 'maybe-compile + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (cond + ((getenv "Scheme") + => (lambda (scheme) + (define makefile + (string-append (getcwd) "/Makefile")) + (define machine + #$(chez-machine->threaded + (nix-system->chez-machine))) + (with-directory-excursion + (search-input-directory outputs "/lib/stex") + (invoke "make" + "-f" makefile + (string-append "Scheme=" scheme)) + (for-each delete-file + (find-files machine "\\."))))) + (else + ;; for bootstrapping, can run without ahead-of-time + ;; compilation + (format #t "not compiling~%"))))) + (add-after 'maybe-compile 'maybe-make-docs + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (cond + ((assoc-ref outputs "doc") + => (lambda (doc-prefix) + (define doc-dir + (string-append doc-prefix "/share/doc/stex")) + ;; the Makefile is referenced in the documentation + (copy-recursively "doc" doc-dir) + (install-file "ReadMe" doc-dir) + (with-directory-excursion "doc" + (invoke "make") + (install-file "stex.html" doc-dir) + (install-file "stex.pdf" doc-dir)))) + (else + (format #t "not making docs~%")))))))) + (home-page "https://github.com/dybvig/stex") + (synopsis "LaTeX with embeded Scheme code and HTML generation") + (description "The @code{stex} package extends LaTeX with a handful of +commands for including Scheme code (or pretty much any other kind of code, as +long as you don't plan to use the Scheme-specific transcript support) in a +document. It provides the programs @code{scheme-prep} and @code{html-prep} to +convert @code{stex} documents to LaTeX and HTML, respectively, plus makefile +templates, style files, and other resources. The @code{stex} system is used +to typeset @cite{The Scheme Programming Language} and the @cite{Chez Scheme +User's Guix}, among other documents.") + (license expat))))) + +(define-public stex + (package/inherit stex-bootstrap + (inputs (modify-inputs (package-inputs stex-bootstrap) + (prepend chez-scheme))) + (outputs '("out" "doc")) + (properties '()))) + +(define-public nanopass + (let ((version "1.9.2")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nanopass/nanopass-framework-scheme") + (commit (string-append "v" version)))) + (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) + (file-name (git-file-name "nanopass" version))))) + +;; +;; Other Chez packages: ;; ;; Help function for Chez Scheme to add the current path to From patchwork Sun Feb 27 21:29:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37548 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 7C41527BBE9; Sun, 27 Feb 2022 21:33: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 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 6B0B027BBEA for ; Sun, 27 Feb 2022 21:33:21 +0000 (GMT) Received: from localhost ([::1]:33052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORAO-000204-JH for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:33:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORAA-0001rw-A9 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORA7-0005qw-P0 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORA7-0008Kd-MY for guix-patches@gnu.org; Sun, 27 Feb 2022 16:33:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 19/24] gnu: Add chez-nanopass. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:33:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599757231988 (code B ref 53878); Sun, 27 Feb 2022 21:33:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:52 +0000 Received: from localhost ([127.0.0.1]:59389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9v-0008Jr-JC for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:52 -0500 Received: from mail-qv1-f54.google.com ([209.85.219.54]:34571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR9u-0008Jd-CB for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:32:50 -0500 Received: by mail-qv1-f54.google.com with SMTP id ba20so11031133qvb.1 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:32:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YuIdrZBKyHowWg/p07x556LhkTvzwSpYchKVBc+nIfE=; b=JSbmiqMNjXpg8u7ahYfSeZ7lvbrrgpyVDhnvMw9U27krHLDRph3xGHobQNywMFP6O8 WT3CF5jTjOZHyWZLSfZODeRbzvP6YJx6aEGL+dK+gRDXWDBqKPBYesKoWdBhL72iIJi7 MqCkPRJTvkjvjtOt7DYc5IjCm7PCsIvHGwujJFWJXXd0Jw2keAqRPGqEBLbySt2aOOPk lJY6+I9NjfaZvJx23gt17XPhHpmslNdTZiOWXliiZ4HsKhYiTUj7+GeCAvoHYAJnQs4Q +kwwrxT6ULIxeCo/S6QrQIVu2b1bN1I0C8DFpSW0L8/tQFl7EC08yxB6wtsOhCQ8yw5Q 35Pg== 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=YuIdrZBKyHowWg/p07x556LhkTvzwSpYchKVBc+nIfE=; b=loEEpV7JEf5J1YpDoL/6l4xJ7+jMzLBu1VMlAnOmT/gw2OHlqYJC+N1CElpj04eb1K 2vnmMtxwxGxU8Lpsqg2W2CTlhWwsjLm2VZ/rxbMiua9MSL3AwRiCZ11fOObOHIa2pjRE Df/SeE6cxmMwpN8fbsnpmzmpmG+qPCxs9TOHFSjrBYNU5Cgs9kmR7RqXsoxIQc7zjSUP iouC1CJ/CV6Mj4S6BraxPgauMHBS/gfAHLqAe8981JFKa7NTNGjLTClRFpi9ZGy9+Fjk rZCRZhJocP+9q00wCfocS+F/azwPsuFCgdz5WyddsWD+gzcLpCzNW/coC8PnpYWMi621 kGhQ== X-Gm-Message-State: AOAM531N6DijaXPzpedTv/W8nqigADidsoLpT8rrgxUjGmOS8qT3X02R qJ/iHF8H1RRFIOTXSel96iFVCnZduUU7Emda+TA= X-Google-Smtp-Source: ABdhPJxeCwS7kn/3yYksbkO7XqvfxfGTb3C8p2Obo7gzft0cJBV03mYYiVwRZ2cUqxjmcBetwE/OwQ== X-Received: by 2002:a0c:ec04:0:b0:432:274a:a1fe with SMTP id y4-20020a0cec04000000b00432274aa1femr12223301qvo.68.1645997564643; Sun, 27 Feb 2022 13:32:44 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id e22-20020ac84e56000000b002dde0f47ea6sm5855924qtw.6.2022.02.27.13.32.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:32:44 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:15 -0500 Message-Id: <20220227212920.2009000-20-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (nanopass): Rename to ... (chez-nanopass-bootstrap): ... this new variable, and promote it from an origin to a package. (chez-nanopass): New variable. (unpack-nanopass+stex): New variable using 'chez-nanopass-bootstrap'. (chez-scheme-for-racket-bootstrap-bootfiles, chez-scheme)[native-inputs]: Add 'chez-nanopass-bootstrap'. [arguments]<#:phases>: Adapt 'unpack-nanopass+stex' phase to use the eponymous new variable. * gnu/packages/racket.scm (racket-vm-cs): Likewise. (make-unpack-nanopass+stex): Remove it. --- gnu/packages/chez.scm | 122 +++++++++++++++++++++++++++++++--------- gnu/packages/racket.scm | 19 +------ 2 files changed, 98 insertions(+), 43 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 6855195cfe..43d2c764f3 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -48,7 +48,8 @@ (define-module (gnu packages chez) #:use-module (srfi srfi-1) #:export (nix-system->chez-machine chez-machine->nonthreaded - chez-machine->threaded)) + chez-machine->threaded + unpack-nanopass+stex)) (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string @@ -159,6 +160,20 @@ (define* (chez-upstream-features-for-system #:optional ;; Chez Scheme: ;; + +(define unpack-nanopass+stex + #~(begin + (copy-recursively + (dirname (search-input-file %build-inputs + "lib/chez-scheme/nanopass.ss")) + "nanopass" + #:keep-mtime? #t) + (mkdir-p "stex") + (with-output-to-file "stex/Mf-stex" + (lambda () + ;; otherwise, it will try to download submodules + (display "# to placate ../configure"))))) + (define-public chez-scheme (package (name "chez-scheme") @@ -176,6 +191,9 @@ (define-public chez-scheme (file-name (git-file-name name version)) (snippet #~(begin (use-modules (guix build utils)) + ;; TODO: consider putting this in a (guix ...) or + ;; (guix build ...) module so it can be shared + ;; with the Racket origin without cyclic issues. (for-each (lambda (dir) (when (directory-exists? dir) (delete-file-recursively dir))) @@ -193,9 +211,7 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs - (list nanopass ; source only - stex-bootstrap)) + (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -215,14 +231,7 @@ (define-public chez-scheme #~(modify-phases %standard-phases (add-after 'unpack 'unpack-nanopass+stex (lambda args - (copy-recursively #$nanopass - "nanopass" - #:keep-mtime? #t) - (mkdir-p "stex") - (with-output-to-file "stex/Mf-stex" - (lambda () - ;; otherwise, it will try to download submodules - (display "# to placate ../configure"))))) + #$unpack-nanopass+stex)) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -317,7 +326,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; When updating, remember to also update %racket-version in racket.scm. (source #f) ; avoid problematic cycle with racket.scm (inputs `()) - (native-inputs (list racket-vm-bc)) + (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) (build-system copy-build-system) ;; TODO: cross compilation (arguments @@ -336,10 +345,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (chdir "racket/src/ChezScheme"))) (add-after 'chdir 'unpack-nanopass+stex (lambda args - (copy-recursively - #$nanopass - "nanopass" - #:keep-mtime? #t))) + #$unpack-nanopass+stex)) (add-before 'install 'build (lambda* (#:key native-inputs inputs #:allow-other-keys) (invoke (search-input-file (or native-inputs inputs) @@ -502,15 +508,79 @@ (define-public stex (outputs '("out" "doc")) (properties '()))) -(define-public nanopass - (let ((version "1.9.2")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nanopass/nanopass-framework-scheme") - (commit (string-append "v" version)))) - (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) - (file-name (git-file-name "nanopass" version))))) +(define-public chez-nanopass-bootstrap + (hidden-package + (package + (name "chez-nanopass") + (version "1.9.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nanopass/nanopass-framework-scheme") + (commit (string-append "v" version)))) + (sha256 + (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i")) + (file-name (git-file-name "nanopass-framework-scheme" version)) + (snippet + #~(begin + (use-modules (guix build utils)) + (when (file-exists? "doc/user-guide.pdf") + (delete-file "doc/user-guide.pdf")) + (substitute* "doc/Makefile" + (("include ~/stex/Mf-stex") + "include $(STEXLIB)/Mf-stex")))))) + (build-system copy-build-system) + (arguments + (list #:install-plan + #~`(("nanopass.ss" "lib/chez-scheme/") + ("nanopass" "lib/chez-scheme/")))) + (home-page "https://nanopass.org") + (synopsis "DSL for compiler development") + (description "The Nanopass framework is an embedded domain-specific +language for writing compilers composed of several simple passes that +operate over well-defined intermediate languages. The goal of this +organization is both to simplify the understanding of each pass, because it +is responsible for a single task, and to simplify the addition of new passes +anywhere in the compiler. Nanopass reduces the boilerplate required to +create compilers, making them easier to understand and maintain.") + (license expat)))) + +(define-public chez-nanopass + (package/inherit chez-nanopass-bootstrap + (properties '()) + ;; TODO: cross-compilation + (native-inputs (list chez-scheme stex)) + (arguments + (substitute-keyword-arguments (package-arguments chez-nanopass-bootstrap) + ((#:install-plan base-plan) + #~`(("nanopass.so" "lib/chez-scheme/") + ("doc/user-guide.pdf" #$(string-append + "share/doc/" + (package-name this-package) + "-" + (package-version this-package) + "/")) + ,@#$base-plan)) + ((#:phases base-phases #~%standard-phases) + #~(modify-phases #$base-phases + (add-before 'install 'compile-and-test + (lambda args + (invoke "scheme" + "--compile-imported-libraries" + "--program" "test-all.ss"))) + (add-after 'compile-and-test 'build-doc + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (with-directory-excursion "doc" + (invoke "make" + (string-append "Scheme=" + (search-input-file + (or native-inputs inputs) + "/bin/scheme")) + (string-append "STEXLIB=" + (search-input-directory + (or native-inputs inputs) + "/lib/stex")))))))))))) ;; ;; Other Chez packages: diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index 035d93bfb5..f29e0791a7 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -251,22 +251,6 @@ (define (racket-vm-common-configure-flags) "--disable-strip" "--enable-origtree")) -(define (make-unpack-nanopass+stex) - ;; Adapted from chez-scheme. - ;; Thunked to avoid evaluating 'chez-scheme' too early. - ;; TODO: Refactor enough to share this directly. - #~(begin - (copy-recursively - #$nanopass - "nanopass" - #:keep-mtime? #t) - (mkdir-p "stex") - (with-output-to-file "stex/Mf-stex" - (lambda () - ;; otherwise, it will try to download submodules - (display "# to placate ../configure"))))) - - (define-public racket-vm-cgc ;; Eventually, it may make sense for some vm packages to not be hidden, ;; but this one is especially likely to remain hidden. @@ -417,6 +401,7 @@ (define-public racket-vm-cs (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") (prepend chez-scheme-for-racket-bootstrap-bootfiles + chez-nanopass-bootstrap racket-vm-bc))) (arguments (substitute-keyword-arguments (package-arguments racket-vm-cgc) @@ -425,7 +410,7 @@ (define-public racket-vm-cs (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" - #$(make-unpack-nanopass+stex)))) + #$unpack-nanopass+stex))) (add-after 'unpack-nanopass+stex 'unpack-bootfiles (lambda* (#:key native-inputs inputs #:allow-other-keys) (with-directory-excursion "racket/src/ChezScheme" From patchwork Sun Feb 27 21:29:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37549 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 BDA7527BBE9; Sun, 27 Feb 2022 21:34:14 +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 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 E260427BBEA for ; Sun, 27 Feb 2022 21:34:10 +0000 (GMT) Received: from localhost ([::1]:33868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORBC-0002bR-2w for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:34:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORB4-0002Za-FC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37273) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORB4-00060U-6J for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORB4-0008Mh-3h for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 20/24] gnu: chez-scheme: Explicitly package bootstrap bootfiles. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599759232070 (code B ref 53878); Sun, 27 Feb 2022 21:34:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:12 +0000 Received: from localhost ([127.0.0.1]:59397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAG-0008LB-6I for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:12 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]:37776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAD-0008Kv-Tp for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:10 -0500 Received: by mail-qk1-f179.google.com with SMTP id v5so8991551qkj.4 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=; b=Gi3RCsA57SE2QTOEWXHkP40aLW9iJKSGW0mPeQSZGxsflgf034waEq4y7vi1u6k5vO fi28GEYmoMjkUp/QjlZl51rxLkVK3cQgZiAsL67pN9aajXbkyp+FvNfpvMwy+Ye/bh10 FjKD/qgJiTEjaMaHYejtA4e3beByPVU4iHZeTET/EC4Vtv0oml4Dz5su0Q8XTA83brfR 5/NIdOU0oae4LEEYFfc6zN+JNsMjKJo5NURojY7R48QKC9Jlnex3HU4QkCJoXcu4URF4 +Km663BDxqm/exCSAglgta817p3Qw9RxcyVQc6B+7BZZhKBv/5aCiCrf4wrTXal8jVuo sHEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=; b=i4sU1uagCqPtr9b8dzWOBzawXXncbhKzFWV3wsO5YPsAsOaiw1w9cQUkkss1boDEVN ZD25iXQaxHEofoUtWBLfjVENr3JikbriZMmPGEyJpSkeixk9oFppYNJNJAxglYnVEq62 ZryzHzf5vPIJBiEIKZZuInoRLoFRpcW0ZXockHaXwFfIgc3/jr0vKFrOFfb+GadJ3swk w6qWIbNQ99vSK3AoX2tuqNcA25cePrwsTmyOba3BQSmap58x/VYzp8l84MyWxkNEDQxJ TTluAMFDbXIYoLqn75iK9VSjmVhHZOyKgyBCnvtdYScQbcu0HTAKrjBGSlGM96D4aIY3 IyoQ== X-Gm-Message-State: AOAM532AfhKpCkitcj1c+ncKHEd/omwvxIQJRUWy5fF+VjT4YvEWk5D2 YOHA44XvWduEnxon4z5vl/oeXyaekHCR4Z37teU= X-Google-Smtp-Source: ABdhPJyfCmR9nR+SI2rooYBw8lZm+Fnab0OmYvsg0LW7l3NFKsWlF6YaABq2QZk7RKmETWQIbaw90w== X-Received: by 2002:a37:5d2:0:b0:5e9:5876:7f0 with SMTP id 201-20020a3705d2000000b005e9587607f0mr9627180qkf.4.1645997584318; Sun, 27 Feb 2022 13:33: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 p22-20020a37a616000000b00547b8839339sm4179005qke.77.2022.02.27.13.32.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:33:04 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:16 -0500 Message-Id: <20220227212920.2009000-21-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This makes the structure of the upstream Chez Scheme package the same as for the Racket variant, it sets things up for (one day, hopefully) actually being able to bootstrap the upstream Chez Scheme bootfiles, and it may be useful for cross-compilation and adding support for architectures without pre-built bootfiles from upstream. * gnu/packages/chez.scm (chez-scheme-bootstrap-bootfiles): New variable. (chez-scheme)[native-inputs]: Add it. [arguments]<#:phases>: Add 'unpack-bootfiles'. (chez-scheme-for-racket-bootstrap-bootfiles): Inherit from 'chez-scheme-bootstrap-bootfiles'. [arguments]: Adapt accordingly. --- gnu/packages/chez.scm | 98 +++++++++++++++++++++++++++++++------------ 1 file changed, 72 insertions(+), 26 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 43d2c764f3..da267d3616 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -46,6 +46,7 @@ (define-module (gnu packages chez) #:use-module (gnu packages xorg) #:use-module (ice-9 match) #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) #:export (nix-system->chez-machine chez-machine->nonthreaded chez-machine->threaded @@ -211,7 +212,9 @@ (define-public chez-scheme ;; for X11 clipboard support in expeditor: ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232 libx11)) - (native-inputs (list chez-nanopass-bootstrap stex-bootstrap)) + (native-inputs (list chez-scheme-bootstrap-bootfiles + chez-nanopass-bootstrap + stex-bootstrap)) (native-search-paths (list (search-path-specification (variable "CHEZSCHEMELIBDIRS") @@ -232,6 +235,14 @@ (define-public chez-scheme (add-after 'unpack 'unpack-nanopass+stex (lambda args #$unpack-nanopass+stex)) + (add-after 'unpack-nanopass+stex 'unpack-bootfiles + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (when (directory-exists? "boot") + (delete-file-recursively "boot")) + (copy-recursively + (search-input-directory (or native-inputs inputs) + "lib/chez-scheme-bootfiles") + "boot"))) ;; NOTE: the custom Chez 'configure' script doesn't allow ;; unrecognized flags, such as those automatically added ;; by `gnu-build-system`. @@ -316,8 +327,46 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-bootstrap-bootfiles + (package + (inherit chez-scheme) + (name "chez-scheme-bootstrap-bootfiles") + (inputs '()) + (native-inputs '()) + (outputs '("out")) + (build-system copy-build-system) + ;; TODO: cross compilation + (arguments + (list #:install-plan + #~`(("boot/" "lib/chez-scheme-bootfiles")))) + (supported-systems + ;; Upstream only distributes pre-built bootfiles for + ;; arm32le and t?(i3|a6)(le|nt|osx) + (filter (lambda (system) + (let ((machine (and=> (nix-system->chez-machine system) + chez-machine->nonthreaded))) + (or (equal? "arm32le" machine) + (and machine + (member (substring machine 0 2) '("i3" "a6")) + (or-map (cut string-suffix? <> machine) + '("le" "nt" "osx")))))) + %supported-systems)) + (synopsis "Chez Scheme bootfiles (binary seed)") + (description + "Chez Scheme is a self-hosting compiler: building it requires +``bootfiles'' containing the Scheme-implemented portions compiled for the +current platform. (Chez can then cross-compile bootfiles for all other +supported platforms.) + +This package provides bootstrap bootfiles for upstream Chez Scheme. +Currently, it simply packages the binaries checked in to the upsream +repository. Hopefully we can eventually adapt Racket's @code{cs-bootstrap} to +work with upstream Chez Scheme so that we can bootstrap these files from +source."))) + (define-public chez-scheme-for-racket-bootstrap-bootfiles (package + (inherit chez-scheme-bootstrap-bootfiles) (name "chez-scheme-for-racket-bootstrap-bootfiles") (version "9.5.7.3") ;; The version should match `(scheme-fork-version-number)`. @@ -325,32 +374,30 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles ;; It will always be different than the upstream version! ;; When updating, remember to also update %racket-version in racket.scm. (source #f) ; avoid problematic cycle with racket.scm - (inputs `()) (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) - (build-system copy-build-system) ;; TODO: cross compilation (arguments - (list - #:install-plan - #~`(("boot/" "lib/chez-scheme-bootfiles")) - #:phases - #~(let ((unpack (assoc-ref %standard-phases 'unpack))) - (modify-phases %standard-phases - (replace 'unpack - (lambda args - (unpack #:source #$(or (package-source this-package) - (package-source racket-vm-bc))))) - (add-after 'unpack 'chdir - (lambda args - (chdir "racket/src/ChezScheme"))) - (add-after 'chdir 'unpack-nanopass+stex - (lambda args - #$unpack-nanopass+stex)) - (add-before 'install 'build - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (invoke (search-input-file (or native-inputs inputs) - "/opt/racket-vm/bin/racket") - "rktboot/main.rkt"))))))) + (substitute-keyword-arguments + (package-arguments chez-scheme-bootstrap-bootfiles) + ((#:phases those-phases #~%standard-phases) + #~(let* ((those-phases #$those-phases) + (unpack (assoc-ref those-phases 'unpack))) + (modify-phases those-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme"))) + (add-after 'chdir 'unpack-nanopass+stex + (lambda args + #$unpack-nanopass+stex)) + (add-before 'install 'build + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (invoke (search-input-file (or native-inputs inputs) + "/opt/racket-vm/bin/racket") + "rktboot/main.rkt")))))))) (supported-systems (filter nix-system->chez-machine %supported-systems)) (home-page "https://github.com/racket/ChezScheme") @@ -372,8 +419,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles Note that the generated bootfiles are specific to Racket's fork of Chez Scheme, and @code{cs-bootstrap} does not currently support building upstream -Chez Scheme.") - (license (list asl2.0)))) +Chez Scheme."))) ;; ;; Chez's bootstrap dependencies: From patchwork Sun Feb 27 21:29:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37550 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 D616927BBEA; Sun, 27 Feb 2022 21:35:37 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 A2ADA27BBE9 for ; Sun, 27 Feb 2022 21:35:37 +0000 (GMT) Received: from localhost ([::1]:36608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORCa-0004aZ-R3 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:35:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORB4-0002aG-R0 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37274) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORB4-00060b-IM for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORB4-0008Mp-G5 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 21/24] gnu: chez-mit: Support chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599760832098 (code B ref 53878); Sun, 27 Feb 2022 21:34:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:28 +0000 Received: from localhost ([127.0.0.1]:59400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAV-0008Ld-MD for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:27 -0500 Received: from mail-qt1-f181.google.com ([209.85.160.181]:44914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAU-0008LS-UK for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:27 -0500 Received: by mail-qt1-f181.google.com with SMTP id v3so7414139qta.11 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:33: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=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=; b=CL0+HS4MbXEKYQkWkAzi4thNxis2mRjtn0LBJnS3ph96bm+M4sIwrFuUKrq5RvPnlu 2BKwd0APswNW2fyTrgJhjG1T+Akk/xMbvJzz3AzX8PLar3giNeH98izZHIdf0ttVe7w1 zfg23sL23dPWytF7Nvjd5qZH4lLvr7LdOozEGKQfd107S6VbTazt3CbnnmNuW4hSzSx+ VEWJMHenThOx9llnkAGz5To7F5vzOGGW9Xe9/iyXNBP8oCPrxyewUZvFEIJMUozkr4xr H6ahYPFLTGtnLqkIYorDvnU7MsiP1unupYk1onkVFH9KAVbZjaKzS/FvYac3haAJsYYW +DEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=; b=BzXCj+ehlb7aEVfQWdeH3/+fcwX+whkuwZno+dKCN0rDSFoFgmoKRorFqgOse4GJT3 MFNAvOlYD9zcSdlpC7mXpStssXXF6b+0c9D7nGxjXtVpIZbPXOLNnFuJO65yD7cOJPAm uKp2yqF/BA/Bj8MgSZgZpclt3Cx4OQDEqodJIFIjJbt6fx0QU50+pcbMWh30kcMgKvNJ LSo6u6H/Xoiyejh0/FEeCu4LEH5NG7XUTriCyzEvUQbYznlVY9yXsb3zXpa7BxaC08Ns Tu1f3qAlNrTLLGtJpujYnG3f3Ma4spL42c86ukPNHsr98h37ENAechNGERX9OsBmRYp0 yKuw== X-Gm-Message-State: AOAM530U1KurdM7wxKRtM2/zWW1C6UCpKJLgIEy2pK6KA+pKso0zDykZ erJMHjoV9rAb2FE30A5yR0Q/d4NXfR5O78Wq7U8= X-Google-Smtp-Source: ABdhPJx/WpPPfjAYl8b8p5M8EfrMNa5bh5YRSVFwSs61CneAc/i+peLCGTiHRqSz2fVTeZ2c2l0eww== X-Received: by 2002:ac8:4e82:0:b0:2dd:e5a1:3b2a with SMTP id 2-20020ac84e82000000b002dde5a13b2amr14525935qtp.196.1645997599276; Sun, 27 Feb 2022 13:33: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 h188-20020a376cc5000000b0064957b23a9csm4206954qkc.118.2022.02.27.13.33.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:33:19 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:17 -0500 Message-Id: <20220227212920.2009000-22-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Racket's variant of Chez Scheme defines 'string->uninterned-symbol', which conflicts with the definition from '(chez mit)'. See discussion at . * gnu/packages/chez.scm (chez-mit)[origin]: Add workaround for chez-scheme-for-racket. --- gnu/packages/chez.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index da267d3616..5d5108a2b1 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -949,7 +949,29 @@ (define-public chez-mit (commit (string-append "v" version)))) (sha256 (base32 "0c7i3b6i90xk96nmxn1pc9272a4yal4v40dm1a4ybdi87x53zkk0")) - (file-name (git-file-name name version)))) + (file-name (git-file-name name version)) + (snippet + ;; Workaround for chez-scheme-for-racket. + ;; See: https://github.com/racket/racket/issues/4151 + #~(begin + (use-modules (guix build utils)) + (substitute* "mit/core.sls" + (("[(]import ") + "(import (only (chezscheme) import)\n") + (("[(]define string->uninterned-symbol gensym[)]") + (format #f "~s" + '(begin + (import (only (chezscheme) + meta-cond + library-exports)) + (meta-cond + ((memq 'string->uninterned-symbol + (library-exports '(chezscheme))) + (import (only (chezscheme) + string->uninterned-symbol))) + (else + (define string->uninterned-symbol + gensym))))))))))) (build-system gnu-build-system) (inputs (list chez-srfi)) ; for tests From patchwork Sun Feb 27 21:29:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37551 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 55A2127BBEA; Sun, 27 Feb 2022 21:35:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 B31BE27BBE9 for ; Sun, 27 Feb 2022 21:35:58 +0000 (GMT) Received: from localhost ([::1]:36940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORCv-0004qA-Sl for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:35:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORB5-0002b7-9D for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37275) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORB5-00060i-0j for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORB4-0008Mw-Tu for guix-patches@gnu.org; Sun, 27 Feb 2022 16:34:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 22/24] gnu: Add chez-scheme-for-racket. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599763232140 (code B ref 53878); Sun, 27 Feb 2022 21:34:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:52 +0000 Received: from localhost ([127.0.0.1]:59403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAt-0008MJ-W1 for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:52 -0500 Received: from mail-qt1-f174.google.com ([209.85.160.174]:37815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORAr-0008M7-RG for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:33:50 -0500 Received: by mail-qt1-f174.google.com with SMTP id q10so7416073qtw.4 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:33:49 -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=b8kcA/P8AUsAZYQYuSEsSHXtcIBPJDIG5YvLBDBjlc0=; b=Yt9jB+WRXgwKdqFhPJpfw8RF5yJpFG0P7Sopi/Z+y7v48Ex3zkeYYLfZKZ9r8u25Rf lXzJpXWOwo6LeOVe6pLvWvPf/Gxj7lxcArPZ4T/8IPqEAs10jH4Vs7BaSTIbOowt+l+J EG9eAgOCPSIdPj5lOnRyL2m0w2uvzeS6c33J6UZyQs1ayjpb4/jk3IXy7cjNGLrwvQWK MwnC0gaah8LmTSvYxH78Imb/hXerDNtqBuJ0MlJH6CXHg516xQWJtRdhllA2JgNSpaqa /9gnXGqVcXfASGbT/RNG2QcAIjpIOvSNirs7yk4SWjn/MDQpFp03nMdJlxyvPRT4pOHG 7SGg== 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=b8kcA/P8AUsAZYQYuSEsSHXtcIBPJDIG5YvLBDBjlc0=; b=H0ENFYko1S3O3SDnzwZxspXVmT4XolMMD2vrV/KfJT2RmJ++goK2weslGfHY/mR9TK 3nZLCOavBevA3D0HRh81GsAetxd5vB5o2jlyWUDk49KizTqxgno+F4zXfqYKvCHWwy7/ N3lTYEscgRVBSmOssbhnmrlMyT017T9cl0T5+zd6GMVojxqCPfTThELr08ZP+23cNMoa WkvNjWoNKs+VCwTyyzAqzeYqHviy7eceuceBcjiMO1DDLW3g02H9omRyovLOcXR8HheN u4l9PreQGSS/qkKX1qjwQzsIjgCMMhspfaOuD7SqSNTNSNOfsG7YjnOrNptTqqyyCNl3 NFXg== X-Gm-Message-State: AOAM533MueWcVW2EOlvTDnh8PmnufrnKDAmtRTs8pJryW7sJ46KHNGhB xP35YNwmAub7CBFHekGTFAFLU2C/PnjlK6pBcms= X-Google-Smtp-Source: ABdhPJwHs1s5LBzf7qFdZSoqp031MmhV8BXVkw93akolkrFvAyfBm5MfNQgmRb8vFOf9rnrIEKlcYw== X-Received: by 2002:a05:622a:c:b0:2dd:b184:c181 with SMTP id x12-20020a05622a000c00b002ddb184c181mr14080429qtw.273.1645997624271; Sun, 27 Feb 2022 13:33:44 -0800 (PST) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id p25-20020a05620a057900b005f1928e8cd0sm4084604qkp.134.2022.02.27.13.33.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:33:44 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:18 -0500 Message-Id: <20220227212920.2009000-23-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches The Racket variant of Chez Scheme can be used to support platforms that are not yet supported by upstream Chez Scheme. * gnu/packages/chez.scm (chez-scheme-for-racket): New variable. (chez-scheme-for-racket-bootstrap-bootfiles)[version, supported-systems]: Derive from 'chez-scheme-for-racket'. * gnu/packages/racket.scm (%racket-version): Update comment. --- gnu/packages/chez.scm | 97 ++++++++++++++++++++++++++++++++++++++--- gnu/packages/racket.scm | 3 +- 2 files changed, 91 insertions(+), 9 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index 5d5108a2b1..e7ddab0d1f 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -52,6 +52,21 @@ (define-module (gnu packages chez) chez-machine->threaded unpack-nanopass+stex)) +;; Commentary: +;; +;; The bootstrapping paths for Chez Scheme and Racket are closely +;; entwined. Racket CS (the default Racket implementation) is based on (a fork +;; of) Chez Scheme. Racket's variant of Chez Scheme shares sources for +;; nanopass and stex with upstream Chez Scheme. +;; +;; Racket's variant of Chez Scheme can be bootstrapped by an older Racket +;; implementation, Racket BC, which can be bootstrapped from C. Porting that +;; code to work with upstream Chez Scheme (or finding an old version that +;; does) is our best hope for some day bootstrapping upstream Chez Scheme from +;; source. +;; +;; Code: + (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string naming the nonthreaded machine type for the same architecture and OS as @@ -327,6 +342,78 @@ (define* (stex-make #:optional (suffix "")) and 32-bit PowerPC architectures.") (license asl2.0))) +(define-public chez-scheme-for-racket + (package + (inherit chez-scheme) + (name "chez-scheme-for-racket") + (version "9.5.7.3") + ;; The version should match `(scheme-fork-version-number)`. + ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. + ;; It will always be different than the upstream version! + ;; When updating, remember to also update %racket-version in racket.scm. + (source #f) ; avoid problematic cycle with racket.scm + (inputs + (modify-inputs (package-inputs chez-scheme) + (delete "libx11" "util-linux:lib"))) + (native-inputs + (modify-inputs (package-native-inputs chez-scheme) + (replace "chez-scheme-bootstrap-bootfiles" + chez-scheme-for-racket-bootstrap-bootfiles))) + (arguments + (substitute-keyword-arguments (package-arguments chez-scheme) + ((#:configure-flags cfg-flags #~'()) + #~(cons "--disable-x11" #$cfg-flags)) + ((#:phases those-phases #~%standard-phases) + #~(let* ((those-phases #$those-phases) + (unpack (assoc-ref those-phases 'unpack))) + (modify-phases those-phases + (replace 'unpack + (lambda args + (unpack #:source #$(or (package-source this-package) + (package-source racket-vm-bc))))) + (add-after 'unpack 'chdir + (lambda args + (chdir "racket/src/ChezScheme")))))))) + (supported-systems (filter nix-system->chez-machine + %supported-systems)) + (home-page "https://github.com/racket/ChezScheme") + ;; ^ This is downstream of https://github.com/racket/racket, + ;; but it's designed to be a friendly landing place for people + ;; who want a ChezScheme-shaped repositroy. + (synopsis "Variant of Chez Scheme extended for Racket") + (description "This variant of Chez Scheme is extended to support the +implementation of Racket. It may be useful on platforms that are not yet +supported by upstream Chez Scheme. + +Main additions to Chez Scheme in the Racket variant: +@itemize @bullet +@item +AArch64 support +@item +Portable bytes (@code{pb}) support, which is mainly useful for bootstrapping +a build on any supported platform +@item +Unboxed floating-point arithmetic and flvectors +@item +Type reconstruction during optimization (especially for safe code) +@item +Continuation attachments +@item +Parallel garbage collection, in-place garbage collection for old-generation +objects (instead of always copying), and reachability-based memory +accounting +@item +Ordered finalization, immobile (but collectable) objects, weak/ephemeron +generic hash tables, and reference bytevectors +@item +Faster multiplication and division for large exact numbers +@end itemize") + (license asl2.0))) + +;; +;; Bootfiles: +;; + (define-public chez-scheme-bootstrap-bootfiles (package (inherit chez-scheme) @@ -368,11 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (package (inherit chez-scheme-bootstrap-bootfiles) (name "chez-scheme-for-racket-bootstrap-bootfiles") - (version "9.5.7.3") - ;; The version should match `(scheme-fork-version-number)`. - ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360. - ;; It will always be different than the upstream version! - ;; When updating, remember to also update %racket-version in racket.scm. + (version (package-version chez-scheme-for-racket)) (source #f) ; avoid problematic cycle with racket.scm (native-inputs (list chez-nanopass-bootstrap racket-vm-bc)) ;; TODO: cross compilation @@ -398,8 +481,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles (invoke (search-input-file (or native-inputs inputs) "/opt/racket-vm/bin/racket") "rktboot/main.rkt")))))))) - (supported-systems (filter nix-system->chez-machine - %supported-systems)) + (supported-systems + (package-supported-systems chez-scheme-for-racket)) (home-page "https://github.com/racket/ChezScheme") ;; ^ This is downstream of https://github.com/racket/racket, ;; but it's designed to be a friendly landing place for people diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm index f29e0791a7..50ef8c1f5e 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -195,8 +195,7 @@ (define* (racket-vm-for-system #:optional racket-vm-cs racket-vm-bc)) -(define %racket-version "8.4") -;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles! +(define %racket-version "8.4") ; Remember to update chez-scheme-for-racket! (define %racket-commit (string-append "v" %racket-version)) (define %racket-origin From patchwork Sun Feb 27 21:29:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37552 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 7E92727BBEA; Sun, 27 Feb 2022 21:36:14 +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 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 E22FB27BBE9 for ; Sun, 27 Feb 2022 21:36:13 +0000 (GMT) Received: from localhost ([::1]:37174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORDB-00051T-2p for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:36:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORC3-0003pK-GC for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORC3-00068j-71 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORC3-0008PH-3u for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 23/24] gnu: chez: Add 'chez-scheme-for-system'. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599765232211 (code B ref 53878); Sun, 27 Feb 2022 21:35:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:34:12 +0000 Received: from localhost ([127.0.0.1]:59409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORBD-0008NT-GV for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:34:11 -0500 Received: from mail-qt1-f181.google.com ([209.85.160.181]:43849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORBB-0008NF-U5 for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:34:10 -0500 Received: by mail-qt1-f181.google.com with SMTP id s15so7409057qtk.10 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=; b=UicR0GRq25yM8Z+Jh0DRKeKE1MrutLNYBTDdvgJ5Pxw4qJQRpe35a5NaMZqrOq3Q1C OVGEQGhpNgLufLH1oXjE7oaoPXjxa1yV1SrqbM5b7hW0nuYwmWFnMLDRbMKOPzt/cppJ /gmbJE075UdzRW2lap5oKrM5NgAPO99igVczRYbW4ZnzslsNQ2dyDN4ZkQlW1YeFLYik 00jsP0ar/9YcweS9JRaabvN40qaZlGsJavnQY726bvr5RMX2l8340PBOVVD/0epR5R2u nb60SvBEEe/JHOfAZ6nYWOtUxZUAk99pMglCGCf0L75rDcidnW33ch2Zq9sauNqAlIhT B53Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=; b=0cx8pSSBAFFj/KB+4K/wiClJIqIZ7LYMY63NeHrFJvRvdiDQZ1gqAdrs7M8N1ADIJY O4SgYd+yJOb7aBH+vjuYEu2aQSzAMIqeKgLKwI3nsiRoLyWw7rflozpaP3V/PfeA4i92 TZX2ly6a/OU1BHqEy0nNfv5KMyFaazTrgsnuqhmAc290ZYMbaUbzvNcOZ95CHxyLkEmQ FeBy+HP9PHr+51Tci4Er93HJg3MeCM1hLcvczBm+4oFRV7l0sawHG5LBtir/cCmVKiUr 86TngJLzwhZx5GZBjYO9bnphNOT1G9b10ThlaPeNPuzbnMverUuZH24joWCWaS3EcVgX Nelg== X-Gm-Message-State: AOAM531W8QbL0KKKnjDLsAbzts7DpfEIPsDXrNI0i34U9XPAXZTFZVL4 456OZvxIQGdgbFh2Ya8NJ6gm/N+Erq+D5wVF2Lw= X-Google-Smtp-Source: ABdhPJzHrK3IMELSb4U1Trw5hDTNC5wB28IblUINi2oThk4dZVyh8WwcHu859J2N+eWx5n8dxy1WPA== X-Received: by 2002:ac8:130c:0:b0:2dd:d52d:325 with SMTP id e12-20020ac8130c000000b002ddd52d0325mr14740861qtj.376.1645997644493; Sun, 27 Feb 2022 13:34: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 c27-20020a05620a135b00b0062cda8dab3fsm4175863qkl.46.2022.02.27.13.33.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:34:04 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:19 -0500 Message-Id: <20220227212920.2009000-24-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/chez.scm (chez-scheme-for-system): New procedure. (chez-srfi, chez-web, chez-sockets, chez-matchable, chez-irregex, chez-fmt, chez-mit, chez-scmutils): Use 'chez-scheme-for-system'. * gnu/packages/loko.scm (loko-scheme): Likewise. * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): Likewise --- gnu/packages/chez.scm | 33 ++++++++++++++++++++++++--------- gnu/packages/emacs-xyz.scm | 2 +- gnu/packages/loko.scm | 2 +- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm index e7ddab0d1f..b3aadf3a78 100644 --- a/gnu/packages/chez.scm +++ b/gnu/packages/chez.scm @@ -47,7 +47,8 @@ (define-module (gnu packages chez) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) - #:export (nix-system->chez-machine + #:export (chez-scheme-for-system + nix-system->chez-machine chez-machine->nonthreaded chez-machine->threaded unpack-nanopass+stex)) @@ -67,6 +68,20 @@ (define-module (gnu packages chez) ;; ;; Code: +(define* (chez-scheme-for-system #:optional + (system (or (%current-target-system) + (%current-system)))) + "Return 'chez-scheme' unless only 'chez-scheme-for-racket' supports SYSTEM, +including support for native threads." + (if (or + ;; full support upstream + (and=> (chez-upstream-features-for-system system) + (cut memq 'threads <>)) + ;; no support anywhere + (not (nix-system->chez-machine system))) + chez-scheme + chez-scheme-for-racket)) + (define (chez-machine->nonthreaded machine) "Given a string MACHINE naming a Chez Scheme machine type, returns a string naming the nonthreaded machine type for the same architecture and OS as @@ -751,7 +766,7 @@ (define-public chez-srfi (file-name (git-file-name name version)))) (build-system gnu-build-system) (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -782,7 +797,7 @@ (define-public chez-web (base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) ghostscript ;; FIXME: This package fails to build with the error: ;; mktexpk: don't know how to create bitmap font for bchr8r @@ -847,7 +862,7 @@ (define-public chez-sockets (base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m")))) (build-system gnu-build-system) (native-inputs - (list chez-scheme + (list (chez-scheme-for-system) chez-web (texlive-updmap.cfg (list texlive-pdftex)))) (arguments @@ -933,7 +948,7 @@ (define-public chez-matchable (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -965,7 +980,7 @@ (define-public chez-irregex (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -996,7 +1011,7 @@ (define-public chez-fmt (propagated-inputs (list chez-srfi)) ; for irregex-utils (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "chez-check" @@ -1059,7 +1074,7 @@ (define string->uninterned-symbol (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (arguments (list #:make-flags (chez-make-flags name version) #:test-target "test" @@ -1090,7 +1105,7 @@ (define-public chez-scmutils (inputs (list chez-srfi)) ; for tests (native-inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list chez-mit chez-srfi)) (arguments diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ef98088100..df53df61c7 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -451,7 +451,7 @@ (define-public emacs-geiser-chez (string-append "(eval-after-load 'geiser-impl '" all ")")))))))) (inputs - (list chez-scheme)) + (list (chez-scheme-for-system))) (propagated-inputs (list emacs-geiser)) (home-page "https://nongnu.org/geiser/") diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm index ef9312afe3..449c62f1f0 100644 --- a/gnu/packages/loko.scm +++ b/gnu/packages/loko.scm @@ -71,7 +71,7 @@ (define-public loko-scheme #t))))) (native-inputs `(("akku" ,akku) - ("chez-scheme" ,chez-scheme) + ("chez-scheme" ,(chez-scheme-for-system)) ("struct" ,guile-struct-pack) ("laesare" ,guile-laesare) ("pfds" ,guile-pfds) From patchwork Sun Feb 27 21:29:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 37553 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 513EE27BBEA; Sun, 27 Feb 2022 21:36:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-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 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 1B02727BBE9 for ; Sun, 27 Feb 2022 21:36:20 +0000 (GMT) Received: from localhost ([::1]:37436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nORDH-0005Ci-56 for patchwork@mira.cbaines.net; Sun, 27 Feb 2022 16:36:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nORC3-0003pe-V3 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nORC3-0006DU-MG for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nORC3-0008PO-J1 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:35:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 24/24] gnu: racket-vm-cs: Build with "--enable-scheme". Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 21:35:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?utf-8?q?Court=C3=A8?= =?utf-8?q?s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164599766732241 (code B ref 53878); Sun, 27 Feb 2022 21:35:03 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:34:27 +0000 Received: from localhost ([127.0.0.1]:59412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORBT-0008Nx-0Y for submit@debbugs.gnu.org; Sun, 27 Feb 2022 16:34:27 -0500 Received: from mail-qk1-f179.google.com ([209.85.222.179]:45801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nORBR-0008Nj-Vv for 53878@debbugs.gnu.org; Sun, 27 Feb 2022 16:34:26 -0500 Received: by mail-qk1-f179.google.com with SMTP id b13so8961633qkj.12 for <53878@debbugs.gnu.org>; Sun, 27 Feb 2022 13:34:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4sCO59XkLaPXWOjMC0ZdG9LOu8LuSFrT3gU7RQx5rKM=; b=F2O+qFI9Xxt18fLKRwmIm8mTLCIkgavsB3pZ4nOQVf16SxrGJnj64f4yaapp5Bdblk BLvC80RhuLtRFiJPaPCsRT1SgQmvAsnQ5vZbcicjmLjUpbzU/+7OZZyFVi2IhdQ/4upO UNmHLMwPiKjTYdwO9QaHc0uk5bWkt7HLuZz7Bk8p77MhzLLmjMqwLjfbzRDo9gJRF98y +fiqodRH0Oh4I17uVnHivosG3D6z6glMOS0aXr07sDzuLokz1QdSQsu3NxvX05bPsFNK Y/bGMXNrF2K1D7MocfKc0Pdb6sD/eSDdRn01UOeBzgGG5S8qnCoEK43q1vbAmetWTH+Q sgAA== 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=4sCO59XkLaPXWOjMC0ZdG9LOu8LuSFrT3gU7RQx5rKM=; b=NYM3h9AbsptO8Lt8qAlcngVfzoH6T0RelkTh6jX9sRN7Wy7QAs7NHVJefjdULAyXt7 OH9A7TegOwpiNtqIgobWFxz8sjXjbwlx4H92fTL6j9dqNdHrGsorbL6kk0tFgp1qTnJF pHBvmN6zYBhfIOIThx+LAwBAyXwCCQ88RBCYZO1D6Xp3F1u8vd/r7WgKJRVlkwxXTjT+ vlhR1CtrIdcRnJ2lIc6wWgiXvWx2CIy8EnVVreHqUVhBE2KTmNA9fokpTJQB9Pcv1c5O aRSgtxEbgLZ6vRyQlXUgXQqdO7sZKW72W1pn0HzlKxeS6B8oCmpHkKpaYuWLcerErxCK rTkA== X-Gm-Message-State: AOAM532sklc8ecn8MKm6BxixUf3kGoTBYYvBnDZWXm6chgLYzRnsCKgc dOQJU2n4ff6W5kgRO7dtxNdq+S+L1Dckc+T9lqk= X-Google-Smtp-Source: ABdhPJxwBIUii88n0wi2wVdMYW8XU2rO+MLzuo2youWN5bW5MQBVVE8IZoBsRHOaZjWQ6MGkDUpDrg== X-Received: by 2002:a37:a505:0:b0:60d:df5e:16c7 with SMTP id o5-20020a37a505000000b0060ddf5e16c7mr9962901qke.448.1645997660530; Sun, 27 Feb 2022 13:34: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 p4-20020a05622a00c400b002de0b744039sm5750902qtw.43.2022.02.27.13.34.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Feb 2022 13:34:20 -0800 (PST) From: Philip McGrath Date: Sun, 27 Feb 2022 16:29:20 -0500 Message-Id: <20220227212920.2009000-25-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-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 50ef8c1f5e..8d44241414 100644 --- a/gnu/packages/racket.scm +++ b/gnu/packages/racket.scm @@ -399,7 +399,7 @@ (define-public racket-vm-cs (native-inputs (modify-inputs (package-native-inputs racket-vm-cgc) (delete "libtool") - (prepend chez-scheme-for-racket-bootstrap-bootfiles + (prepend chez-scheme-for-racket chez-nanopass-bootstrap racket-vm-bc))) (arguments @@ -409,18 +409,15 @@ (define-public racket-vm-cs (add-after 'unpack 'unpack-nanopass+stex (lambda args (with-directory-excursion "racket/src/ChezScheme" - #$unpack-nanopass+stex))) - (add-after 'unpack-nanopass+stex 'unpack-bootfiles - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (with-directory-excursion "racket/src/ChezScheme" - (copy-recursively - (search-input-directory (or native-inputs inputs) - "lib/chez-scheme-bootfiles") - "boot")))))) + #$unpack-nanopass+stex))))) ((#:configure-flags _ '()) #~(cons* "--enable-csonly" "--enable-libz" "--enable-lz4" + (string-append "--enable-scheme=" + #$(this-package-native-input + "chez-scheme-for-racket") + "/bin/scheme") #$(racket-vm-common-configure-flags))))) (synopsis "Racket CS implementation") (description "The Racket CS implementation, which uses ``Chez Scheme'' as