From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mALkIcXtG2LQHAAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 22:31:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qNxqH8XtG2L+rQAA9RJhRA (envelope-from ) for ; Sun, 27 Feb 2022 22:31:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 25B8515DC6 for ; Sun, 27 Feb 2022 22:31:49 +0100 (CET) Received: from localhost ([::1]:58958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR8u-0000Ha-7O for larch@yhetil.org; Sun, 27 Feb 2022 16:31:48 -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=A8s?= , 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645997509; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Yq0zPrs4S7KllmXpGmTarSZjJiNT7KonIgGzWbcUl1Y=; b=NsnUTsXGxUv8OVH9DL6fPLBaW5Yn4NKC74dSWgDpVoLR2T88RRv322cXTxFCf00E/NL5Rj Vfd+DQIrG8uD7xzFZwHzIaGgDf+MRF6LzbogNSQwL55Gn8htqHlwicxkN3nC9C2iNbYMsD aZHXQZKH5C6xbeAdtWzqP5GxjTv8yCa6THbTKhihxpCBnd+nHQWSX6KTD++QdHdyFlV9i2 zcmKYr4oI5R7csvE8qKB/Ei5DwqEN3nvOklEZggbAt+lRNEdtxpnMIvvEsAirMN8Y/YYx6 4AT/HVzSqzNMxPe53mqkEwD1TyYukNKpxBsjOzcYb1kekHz/3Bnxelz6Yu3wDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645997509; a=rsa-sha256; cv=none; b=Jjo6mM0WRsq/k3k+xG2LiqWgENXH02I9av1ZfYxn7utiJeUn1lk+nS8i1iL0SaxOVTIAhY P8IkR45ZFM+4ES9hHjdsN4PTu8MwoR/Zl3FlGiyodubBCV3eGrkMq1lqvR8dd/umAxsrHW S9AHwzk2ThQdE+jJS8y5g1T7s2oOknIUEKzwk4gyOn3AYJqa1GHsEYk37zQrU66sEqMq00 ejjSu7Ltqj/cDeoby9RsAsXtuAo1hFZBqQrqXDqwcwkKJPfZmzamWVE3LaQbsNL2rNYpXx +2xXubKxF9dXxcszVUrUo4nSuHXYEaDo8Xx3jD+UgBVlmH76/bi13d6a3l9inA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="OUmSW/s7"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b="OUmSW/s7"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 25B8515DC6 X-Spam-Score: 2.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: vSjKUbEek7/9 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 -- 2.32.0