GNU bug report logs - #53878
[PATCH 00/11] Update Racket to 8.4. Adjust Chez Scheme

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Philip McGrath <philip@HIDDEN>; Keywords: patch; merged with #53997; Done: Liliana Marie Prikler <liliana.prikler@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.
bug unarchived. Request was from Maxime Devos <maximedevos@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 28 Apr 2022 16:17:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 28 12:17:35 2022
Received: from localhost ([127.0.0.1]:49750 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nk6pi-0008Ls-78
	for submit <at> debbugs.gnu.org; Thu, 28 Apr 2022 12:17:35 -0400
Received: from mail-ed1-f68.google.com ([209.85.208.68]:45627)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nk6pg-0008Gi-8X
 for 53878 <at> debbugs.gnu.org; Thu, 28 Apr 2022 12:17:33 -0400
Received: by mail-ed1-f68.google.com with SMTP id be20so6091524edb.12
 for <53878 <at> debbugs.gnu.org>; Thu, 28 Apr 2022 09:17:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:date:in-reply-to:references:user-agent
 :mime-version:content-transfer-encoding;
 bh=l8TLHHX31Xsd2yefG4Egeo0kQpxPnlXeqetWkBRkaBQ=;
 b=XInaOyvBSRmCj0nxX0RZ4l3ApBvHvYj5I8fON5leXcGpDUYUqDvf/DdeussluBaxWQ
 4LirYxVV0f7u78wHSespi5bz0t0TFHV5QtuGVfI3C5xcgXulYmreEJtpI5i0ZrZ6g92h
 O5L9I9lgI6gkoOO5MdJpLWO/9TNc8uy7s44QxqRwUbc//nZQRgAoWfTsoQHAFgdgJnil
 lIi3xFHLjwLiqNxh+xGb6FFsgMRlQAFAdi5O0eRSVVKI5B6OqfJqt84QfrbfRhhIIOS3
 pbCbQmMQbHBrXSp0Ichv9hmTX2S0DRa3abp00GVN6PQOo1p647HbmpjoEpQ2gPz/u3Cc
 TbQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=l8TLHHX31Xsd2yefG4Egeo0kQpxPnlXeqetWkBRkaBQ=;
 b=fGr2T+sEatGxmjESzUCbu4vvnKZUapXYOqjdAveninE50MUmrFdwfYFa/zd4VaZ5FH
 oECy8vG9lNSixgzMH0nkmqC5R/IJlA+gqV0rejQP1DbdehJ4iKOrv+UHATg3xJzzEOFp
 jWV7kKIVqU8gL7Vd36CDICgnhVDhvRGE0cC+8jZHg3HpH2/FrUNVbSIeNhGfCgt5cF58
 tclOAdLv4vyZY/c94Lqat/iT9Eftykk2st86NQ0B+BEFMuLoE/5hpV5+adaq+cEIiQtF
 VdcEX8DaLrkX1HSPzRWQH2fEjxbVcAXq2dmLA8V1wXMv5V/iKimd8UFeqNof8hj/7EUy
 xfrw==
X-Gm-Message-State: AOAM533vC1+6z5oxtrY/VF9r2DCWEhxF+pHrE4gCeOvW1k4ZqW2d+Ki5
 /Fb5cj+thPfb99BWlwlQ06U=
X-Google-Smtp-Source: ABdhPJx2wcsGiTyDCZUqGts4a0AnjmqcVeEA9GsquEV9MV34n9DEz0KsbB14w1tY+BHO0VUHvLmL4Q==
X-Received: by 2002:a50:ed16:0:b0:425:f420:e51a with SMTP id
 j22-20020a50ed16000000b00425f420e51amr19239254eds.23.1651162646156; 
 Thu, 28 Apr 2022 09:17:26 -0700 (PDT)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 v17-20020a1709060b5100b006f38cf075cbsm164883ejg.104.2022.04.28.09.17.24
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 28 Apr 2022 09:17:25 -0700 (PDT)
Message-ID: <67098dcc5d7670d6edf286b48aa67e56f4b66087.camel@HIDDEN>
Subject: Re: Fwd: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme
 packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878 <at> debbugs.gnu.org
Date: Thu, 28 Apr 2022 18:17:23 +0200
In-Reply-To: <6f8a5468-a62d-d54b-d1ac-c85fd32795d1@HIDDEN>
References: <ed47c269-ddb6-8fea-ebcf-3311b4ff136d@HIDDEN>
 <6f8a5468-a62d-d54b-d1ac-c85fd32795d1@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 53878
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Philip,

Am Mittwoch, dem 27.04.2022 um 16:03 -0400 schrieb Philip McGrath:
> [...]
> On 3/4/22 17:59, Liliana Marie Prikler wrote:
> > Hi Philip,
> > 
> > Am Sonntag, dem 27.02.2022 um 16:28 -0500 schrieb Philip McGrath:
> > > Rather than debate it, I'm sending a v7 with the change to patch
> > > 03/24 that Liliana requested in
> > > <https://issues.guix.gnu.org/53878#187>.
> > Sorry for the delay.  I cleaned up some of your commits and their
> > messages, but apart from that pushed v7 without major changes.  I'm
> > marking this as done now; if you feel I've made a mistake
> > somewhere, don't hesitate to reopen.
> > 
> 
> While getting ready for the upcoming Racket 8.5 release, I noticed
> some differences between my issue 53878 v7 patch series and the
> commits as applied to Guix that I hadn't noticed at the time. I don't
> want to make a big a deal out of it---I'm sure everyone was acting in
> good faith, and it isn't enormously consequential in the grand scheme
> of things---but it took me by surprise.
As stated above, I find the things below to be "cleanup"s, which I will
explain below.

> > diff --cc gnu/packages/racket.scm
> > index 8d44241414,471a11dd48..0000000000
> > --- a/gnu/packages/racket.scm
> > +++ b/gnu/packages/racket.scm
> > @@@ -248,7 -248,10 +248,14 @@@
> >         ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
> >                         #$(file-append bash-minimal "/bin/sh"))
> >         "--disable-strip"
> > ++<<<<<<< HEAD
> >  +      "--enable-origtree"))
> > ++=======
> > +       ;; XXX: origtree layout is required by some other packages
> > down the
> > +       ;; bootstrap chain.  Remove these flags as soon as we can
> > do without them.
> > +       "--enable-origtree"
> > +       ,(string-append "--prefix=" #$output "/opt/racket-vm")))
> > ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
> >   
> 
> This comment was what first gave me pause: I was concerned it meant 
> something had gone, so I went looking through the Git blame to find
> when it was added, and Git blamed me.
> 
> I think the comment is not quite right, factually (or, at least, is
> only true for very specific definitions of "required" and "bootstrap
> chain"), and, more significantly, I disagree that it should be a goal
> to "remove these flags": IMO, adding these flags brought us closer to
> being able to build the Racket VM, Racket packages, and Racket
> installation layers in a well-organized fashion.
While that is true, it comes at the cost of dumping literally
everything in a standard non-standard directory, which in and of
itself, is bad.  At the time I agreed to doing so because it moved
things forward to the inclusion of Racket 8.4 (and possibly 8.5 pp as
well), but getting things into an actual layout should be a long-term
goal for both the Guix packaging of Racket and Racket itself.

In particular, the parts of Racket that make it currently impossible to
build it in a more FHS-conforming way (such as layers) should be
implemented in terms of features we have and that are acceptable, such
as search paths.  I personally find it baffling that whatever is
achieved by layers needs those in the first place and can not be
achieved in a more standardized manner.

> >   (define-public racket-vm-cgc
> >     ;; Eventually, it may make sense for some vm packages to not be
> > hidden,
> > @@@ -282,69 -285,36 +289,102 @@@
> >          #:strip-directories #~'("opt/racket-vm/bin"
> >                                  "opt/racket-vm/lib")
> >          #:phases
> > ++<<<<<<< HEAD
> >  +       #~(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)))))))
> > ++=======
> > +        #~(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"))))))
> > ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
> >        (home-page "https://racket-lang.org")
> >        (synopsis "Old Racket implementation used for
> > bootstrapping")
> >        (description "This variant of the Racket BC (``before Chez''
> > or
> > @@@ -599,6 -569,7 +639,10 @@@ DrRacket IDE, are not included."
> 
> More concretely, removing `wrap-racket-vm-outputs` here without a 
> replacement means that the phases in question did not run on the 
> relevant files/directories. For example, this interaction illustrates
> that the patches as applied don't generate a `ld.so.cache` for
> Racket:
This should tell you more so that you ought not place stuff in /opt. 
Just look at the code you wrote.  You have to resort to an ugly hack to
get indentation close to where you want and even then it's a painful
read.  I can not recall ever being fine with this.  Most of the phases
should not need patching with prefix set.  For the rest...

> ```
> philip@bastet:~$ echo v7
> v7
> philip@bastet:~$ ls $(guix time-machine 
> --url=https://gitlab.com/philip1/guix-patches.git 
> --disable-authentication 
> --branch=racket-chez-refactor-guix-issue-53878-v7 -- build -e "(@
> (gnu 
> packages racket) racket-vm-cs)" 2>/dev/null | tail -n 1)/opt/racket-
> vm/etc
> config.rktd  ld.so.cache
> philip@bastet:~$ echo as applied
> as applied
> philip@bastet:~$ ls $(guix time-machine 
> --commit=992ed3b4ce20335ca61df0d29bfd02495dee87e6 -- build -e "(@
> (gnu 
> packages racket) racket-vm-cs)" 2>/dev/null | tail -n 1)/opt/racket-
> vm/etc
> config.rktd
> philip@bastet:~$
> ```
> 
> I thought we had discussed the reason for this e.g. in 
> <https://issues.guix.gnu.org/53878#32>.
Note, that you would have to look for the ld.so.cache in /etc, not
/opt/wherever/etc.  That currently changes little, as /opt is not
searched for constructing the cache.  With /opt being a free for all,
that is sane behaviour, though.  If we find that we need to accomodate
further bin-directories, perhaps we might adjust make-dynamic-linker-
cache, but I wouldn't count on that necessity.

> >       (inherit racket-minimal)
> >       (name "racket")
> >       (source #f)
> > ++<<<<<<< HEAD
> > ++=======
> > +     (native-inputs (list racket-minimal)) ; XXX: conservative
> > estimate, untested
> > ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
> >       (inputs
> >        (list
> >         cairo
> 
> (For completeness, this was also a change: it really isn't a big
> deal, but much more will be needed to be able to cross-compile Racket
> code, and I think it would be best addressed in the context of a 
> 'racket-build-system'.)
Since racket-minimal does not suffice for cross-compilation as per this
comment and your words here, I decided to communicate this more clearly
by not having native-inputs – which itself suggests, that cross-
compilation was not yet thought of (hard enough).

> I certainly don't want anything that would further burden reviewers
> or slow down the process (this patch series having taken 7 revisions
> and almost a month as it is). For me, at least, it would have been
> easier to notice these changes if they had been in their own commit
> (or commits), rather than mixed in with changes that had been revised
> and discussed several times.
I understand that, but for me as a reviewer and a committer it doesn't
make an awful lot of sense to commit a huge chunk of garbage that will
be reverted in the next.  (Don't take garbage personal here, it refers
more so to the fact that these are gratuitous lines of diffs that
*everyone* will have to pull, which is not climate friendly.)

As for discussing changes, I am personally also a fan of communicating
more clearly, but I was urged for time and there is some consensus that
silently improving things is okay.

I would heavily advise you to not completely change things once more
for Racket 8.5.  That would just serve to show how bad packaging Racket
really is.  Improvements concerning build systems etc. are welcome, but
they should overall result in less of a mess than we had before
(particularly also considering the /opt mess).

I know this reply was dominated by me hating on /opt and I apologize
for that, but despite Guix itself not strictly adhering to FHS given
the /gnu/store directory, we don't disagree with the standard in the
sense that we believe separating binaries from libraries and data is a
bad thing.  Au contraire, this separation is important information and
should be embraced!

Cheers




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Apr 2022 20:03:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 27 16:03:29 2022
Received: from localhost ([127.0.0.1]:44484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1njnsj-0003Fv-T1
	for submit <at> debbugs.gnu.org; Wed, 27 Apr 2022 16:03:29 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36817)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1njnsj-0003Fi-0Z
 for 53878 <at> debbugs.gnu.org; Wed, 27 Apr 2022 16:03:25 -0400
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailout.nyi.internal (Postfix) with ESMTP id E12595C021C;
 Wed, 27 Apr 2022 16:03:19 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Wed, 27 Apr 2022 16:03:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:content-transfer-encoding:content-type
 :date:date:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:sender:subject:subject:to:to;
 s=fm1; t=1651089799; x=1651176199; bh=+9xfCgmriagGVRs4GPw0qZplV
 R9eUxOVeZUNJkhw1rI=; b=Yl42UeUvTRWgalULZJ/+yCnBWi5Y9XCzcJCMbIQDs
 fP5t5+vAVUSh/lO3fwl9rlyTajxvnZTZ6Mxc3bTp72Y2EsTb5B477WBpsqt9s8qF
 S2MfQt5npOjRNLK5lduSPmnrbOJswKcg8p3JOWse3PJRLil8GL83UfQVxsW+Xl9r
 zMjxHLQo/4f38hrZLufTucRRQgYI3Ht2Pr+bFSi0D4rIUUWnUj3yg9eyvXEu7axR
 J6HG4gWjdH8SDwi5q/CNPgG13SRR2WQayMz9RZIN7nJ8H66W6TyxDo/y9ZHn4vji
 /EnYwl0iIOt+bFV7VUKa7xpUvKsbQfqE/GiL2f/Nb2LHA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:date:from:from:in-reply-to:in-reply-to:message-id
 :mime-version:references:reply-to:sender:subject:subject:to:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm1; t=1651089799; x=1651176199; bh=+9xfCgmriagGVRs4GPw0qZplVR9e
 UxOVeZUNJkhw1rI=; b=GslqK7XHwihhxjWO2EPGGXKWm0/Ya0uG+BwFfeP/YlWT
 pX8SBMLDMupR/toDI/R1jMgXfyVPxziDrI+Q13qe49OiZerikRr9HRDaf9zOPele
 mrLPH0FNEXkxItb+OBONUDgxPozm9R77HNh9tQv0EztOWn3X0eIlV3kpf5K1Mx4x
 iwRCZY+Q1sVo5cqa4MTgzshz9/30qRTb5ywrTOV+hjGkEtXsKQsODQTBQdtLos1U
 feHbJOCmaYo8k1BWlRnLjcWcU34vmlBEND2e4ndbORtUWOMOE+EpSwWZTBPZDDy+
 FwlNeWL2BS4feNKx0A4zrbyOhlDtOPeKpoz5evwJ+w==
X-ME-Sender: <xms:h6FpYo7KNlKpV0EfJDNZwPF5pYoDUcV53xR_sjC0QVi3KVq0CQfnHg>
 <xme:h6FpYp7uLWL2ci4H88U28vDJcwZT4HDej4lq9-gMhrWiuy0lk6JKF-XCVgQVbb-zP
 un333cqw4Pyp37kiKQ>
X-ME-Received: <xmr:h6FpYnfl-Aa_aYy0fmxhmS2pekGPbiCtPxs98-RiMqg-sOx-sB_FA6gIM1t5js9quBeNaqSPz-YYN9WElfVJ1VACmvUKQG_dvfJWaQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudehgddugeduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhepkfffgggfufhfvffhjggtgfesthejredttdefjeenucfhrhhomheprfhhihhl
 ihhpucfotgfirhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtoh
 hmqeenucggtffrrghtthgvrhhnpefhvddtheefteejkeegffdtfeeigefgkeeileelgfeh
 vdfhvedvvdeijeefgfduteenucffohhmrghinhepghhnuhdrohhrghdprhgrtghkvghtqd
 hlrghnghdrohhrghdpghhithhlrggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptden
 ucfrrghrrghmpehmrghilhhfrhhomhepphhhihhlihhpsehphhhilhhiphhmtghgrhgrth
 hhrdgtohhm
X-ME-Proxy: <xmx:h6FpYtIJupZzUjZ70L58VtvTfJbJskzmqtm2zvahJjH2i5iNK0_3zw>
 <xmx:h6FpYsKe5LcSWKp3K975aal4WGK4GunyNM55r7Hp9t26Tdypc5zQnQ>
 <xmx:h6FpYuyAuMotUyNsxxS-paRb3ZsQIBUFGkSyF8NNzMCTlBvax4O8Lw>
 <xmx:h6FpYhELH6KvOa5AlBoR-IkMZo9b9IXTRcAjch1fQRlEk71GYl00GA>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 27 Apr 2022 16:03:19 -0400 (EDT)
Message-ID: <6f8a5468-a62d-d54b-d1ac-c85fd32795d1@HIDDEN>
Date: Wed, 27 Apr 2022 16:03:19 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.7.0
Subject: Fwd: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme
 packages.
Content-Language: en-US
References: <ed47c269-ddb6-8fea-ebcf-3311b4ff136d@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>
From: Philip McGrath <philip@HIDDEN>
In-Reply-To: <ed47c269-ddb6-8fea-ebcf-3311b4ff136d@HIDDEN>
X-Forwarded-Message-Id: <ed47c269-ddb6-8fea-ebcf-3311b4ff136d@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 53878
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

(Hopefully I've made the necessary debbugs incantations for this to go 
through this time.)

-------- Forwarded Message --------
Subject: Re: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme 
packages.
Date: Wed, 27 Apr 2022 15:52:49 -0400
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>, 53878 <at> debbugs.gnu.org

Hi,

On 3/4/22 17:59, Liliana Marie Prikler wrote:
> Hi Philip,
> 
> Am Sonntag, dem 27.02.2022 um 16:28 -0500 schrieb Philip McGrath:
>> Rather than debate it, I'm sending a v7 with the change to patch
>> 03/24 that Liliana requested in
>> <https://issues.guix.gnu.org/53878#187>.
> Sorry for the delay.  I cleaned up some of your commits and their
> messages, but apart from that pushed v7 without major changes.  I'm
> marking this as done now; if you feel I've made a mistake somewhere,
> don't hesitate to reopen.
> 

While getting ready for the upcoming Racket 8.5 release, I noticed some 
differences between my issue 53878 v7 patch series and the commits as 
applied to Guix that I hadn't noticed at the time. I don't want to make 
a big a deal out of it---I'm sure everyone was acting in good faith, and 
it isn't enormously consequential in the grand scheme of things---but it 
took me by surprise.

Considering a diff between my v7 and the series as merged:

> diff --cc gnu/packages/racket.scm
> index 8d44241414,471a11dd48..0000000000
> --- a/gnu/packages/racket.scm
> +++ b/gnu/packages/racket.scm
> @@@ -248,7 -248,10 +248,14 @@@
>         ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
>                         #$(file-append bash-minimal "/bin/sh"))
>         "--disable-strip"
> ++<<<<<<< HEAD
>  +      "--enable-origtree"))
> ++=======
> +       ;; XXX: origtree layout is required by some other packages down the
> +       ;; bootstrap chain.  Remove these flags as soon as we can do without them.
> +       "--enable-origtree"
> +       ,(string-append "--prefix=" #$output "/opt/racket-vm")))
> ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
>   

This comment was what first gave me pause: I was concerned it meant 
something had gone, so I went looking through the Git blame to find when 
it was added, and Git blamed me.

I think the comment is not quite right, factually (or, at least, is only 
true for very specific definitions of "required" and "bootstrap chain"), 
and, more significantly, I disagree that it should be a goal to "remove 
these flags": IMO, adding these flags brought us closer to being able to 
build the Racket VM, Racket packages, and Racket installation layers in 
a well-organized fashion.

>   (define-public racket-vm-cgc
>     ;; Eventually, it may make sense for some vm packages to not be hidden,
> @@@ -282,69 -285,36 +289,102 @@@
>          #:strip-directories #~'("opt/racket-vm/bin"
>                                  "opt/racket-vm/lib")
>          #:phases
> ++<<<<<<< HEAD
>  +       #~(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)))))))
> ++=======
> +        #~(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"))))))
> ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
>        (home-page "https://racket-lang.org")
>        (synopsis "Old Racket implementation used for bootstrapping")
>        (description "This variant of the Racket BC (``before Chez'' or
> @@@ -599,6 -569,7 +639,10 @@@ DrRacket IDE, are not included."

More concretely, removing `wrap-racket-vm-outputs` here without a 
replacement means that the phases in question did not run on the 
relevant files/directories. For example, this interaction illustrates 
that the patches as applied don't generate a `ld.so.cache` for Racket:

```
philip@bastet:~$ echo v7
v7
philip@bastet:~$ ls $(guix time-machine 
--url=https://gitlab.com/philip1/guix-patches.git 
--disable-authentication 
--branch=racket-chez-refactor-guix-issue-53878-v7 -- build -e "(@ (gnu 
packages racket) racket-vm-cs)" 2>/dev/null | tail -n 1)/opt/racket-vm/etc
config.rktd  ld.so.cache
philip@bastet:~$ echo as applied
as applied
philip@bastet:~$ ls $(guix time-machine 
--commit=992ed3b4ce20335ca61df0d29bfd02495dee87e6 -- build -e "(@ (gnu 
packages racket) racket-vm-cs)" 2>/dev/null | tail -n 1)/opt/racket-vm/etc
config.rktd
philip@bastet:~$
```

I thought we had discussed the reason for this e.g. in 
<https://issues.guix.gnu.org/53878#32>.

>       (inherit racket-minimal)
>       (name "racket")
>       (source #f)
> ++<<<<<<< HEAD
> ++=======
> +     (native-inputs (list racket-minimal)) ; XXX: conservative estimate, untested
> ++>>>>>>> 992ed3b4ce20335ca61df0d29bfd02495dee87e6
>       (inputs
>        (list
>         cairo

(For completeness, this was also a change: it really isn't a big deal, 
but much more will be needed to be able to cross-compile Racket code, 
and I think it would be best addressed in the context of a 
'racket-build-system'.)

I certainly don't want anything that would further burden reviewers or 
slow down the process (this patch series having taken 7 revisions and 
almost a month as it is). For me, at least, it would have been easier to 
notice these changes if they had been in their own commit (or commits), 
rather than mixed in with changes that had been revised and discussed 
several times.

-Philip




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.
bug unarchived. Request was from Philip McGrath <philip@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
bug archived. Request was from Debbugs Internal Request <help-debbugs@HIDDEN> to internal_control <at> debbugs.gnu.org. Full text available.

Message received at 53878-done <at> debbugs.gnu.org:


Received: (at 53878-done) by debbugs.gnu.org; 4 Mar 2022 22:59:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 04 17:59:11 2022
Received: from localhost ([127.0.0.1]:46985 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nQGtD-0008GL-HO
	for submit <at> debbugs.gnu.org; Fri, 04 Mar 2022 17:59:11 -0500
Received: from mail-ed1-f67.google.com ([209.85.208.67]:43656)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nQGtB-0008G5-O5
 for 53878-done <at> debbugs.gnu.org; Fri, 04 Mar 2022 17:59:10 -0500
Received: by mail-ed1-f67.google.com with SMTP id f8so12542302edf.10
 for <53878-done <at> debbugs.gnu.org>; Fri, 04 Mar 2022 14:59:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=U7NGcfHMw9fIlx0zjv08u1EBzZLiWF+0Z8ViKlAJc90=;
 b=Kl5My12jdYypV8aC/FnZKKYzgbD9oEbAgpjcK1Dp7SG2IYJXSJTAltdsT3xXGjxor9
 ZyojjZJkuNU/8ekDKLewNQwzLfG0BZGCVADFkzq1LzSydNU4biqc6xiXthWaStWiNhAK
 xoso1+y4Ii/1LdulblssrkAbWnnEFi0CZXPp47TJxFKLkXfdX9nSLfoppXSskJo2Ug5j
 7q4V+t2yV9ul6AyFtMDkXfyTMXoFdKJBKKZZQ0D/O7EhZmwm9TTw1XEwM9wg2fEmYLKz
 CXR5ev7BJ+vo3HqFWLhR95ckZ7qIScdwJUA3+Lc1D0XziXT/GuPfFaVdKsEVguFs/FL0
 yT1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=U7NGcfHMw9fIlx0zjv08u1EBzZLiWF+0Z8ViKlAJc90=;
 b=6vsY4y7rcXde9xnKVy8sr0Nyip4BykkX/02357vDgxwppgXDGr3iqxZPmiolNkIHz8
 lspGckbZ6AGu/qhwjx3TmHuwpca56jxiMZ9rWFv/cnEY5RRlVtKaF4gjSpXfiUklHCEI
 AMsgi1BvuhDs/J9NInMBGn4w+mj4eUKyuJMcjHAmmnsePQc5UyZGaKAzOp7oprth1atL
 DvEtT6jkOPn+52qU/Q1QD73pGbzkDUq0uajp+Gt40I6Cr1uoDr97gdAeArgXdUXvN5aE
 hgvIuuOBjqFVk+L9cfo8Cu3JYAJMqDHSknFixG1whUnnxnAdPBKtY5gM2YuIW2CMoi3t
 IEDQ==
X-Gm-Message-State: AOAM530aecbdVgvKpzj3F6PWIkIoZvuPSkk4vzJdXvTPqC7V3ciNvLef
 o9DNHsECDjxjukWHX/ujWhM=
X-Google-Smtp-Source: ABdhPJyZ/HW+NJp7jc2y4VM3nYp6fYMiJyafQXQEx+8l5zpCcVN5K04GdXoQlYIpARpwsMxUtemLDw==
X-Received: by 2002:aa7:cb18:0:b0:413:3a7a:b5d6 with SMTP id
 s24-20020aa7cb18000000b004133a7ab5d6mr730886edt.254.1646434743644; 
 Fri, 04 Mar 2022 14:59:03 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 z15-20020a170906240f00b006d703ca573fsm2200270eja.85.2022.03.04.14.59.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 04 Mar 2022 14:59:03 -0800 (PST)
Message-ID: <4f9873896a7d2c42dd11e546ddda3dbf002bcf07.camel@HIDDEN>
Subject: Re: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme
 packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878-done <at> debbugs.gnu.org, 
 zimoun <zimon.toutoune@HIDDEN>
Date: Fri, 04 Mar 2022 23:59:00 +0100
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 53878-done
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Philip,

Am Sonntag, dem 27.02.2022 um 16:28 -0500 schrieb Philip McGrath:
> Hi,
> 
> On Sunday, February 27, 2022 3:42:46 AM EST Liliana Marie Prikler
> wrote:
> > 
> > Perhaps I wasn't clear enough about this in v5, but I think spec
> > should
> > be a single argument rather than multiple ones.  This way, if we do
> > find that we need to extend it to support an additional argument,
> > we
> > don't have to awkwardly code around the #:rest.
> > 
> 
> Rather than debate it, I'm sending a v7 with the change to patch
> 03/24 that Liliana requested in
> <https://issues.guix.gnu.org/53878#187>.
Sorry for the delay.  I cleaned up some of your commits and their
messages, but apart from that pushed v7 without major changes.  I'm
marking this as done now; if you feel I've made a mistake somewhere,
don't hesitate to reopen.

Cheers  




Notification sent to Attila Lendvai <attila@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Liliana Marie Prikler <liliana.prikler@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 53878-done <at> debbugs.gnu.org:


Received: (at 53878-done) by debbugs.gnu.org; 4 Mar 2022 22:59:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 04 17:59:11 2022
Received: from localhost ([127.0.0.1]:46985 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nQGtD-0008GL-HO
	for submit <at> debbugs.gnu.org; Fri, 04 Mar 2022 17:59:11 -0500
Received: from mail-ed1-f67.google.com ([209.85.208.67]:43656)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nQGtB-0008G5-O5
 for 53878-done <at> debbugs.gnu.org; Fri, 04 Mar 2022 17:59:10 -0500
Received: by mail-ed1-f67.google.com with SMTP id f8so12542302edf.10
 for <53878-done <at> debbugs.gnu.org>; Fri, 04 Mar 2022 14:59:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=U7NGcfHMw9fIlx0zjv08u1EBzZLiWF+0Z8ViKlAJc90=;
 b=Kl5My12jdYypV8aC/FnZKKYzgbD9oEbAgpjcK1Dp7SG2IYJXSJTAltdsT3xXGjxor9
 ZyojjZJkuNU/8ekDKLewNQwzLfG0BZGCVADFkzq1LzSydNU4biqc6xiXthWaStWiNhAK
 xoso1+y4Ii/1LdulblssrkAbWnnEFi0CZXPp47TJxFKLkXfdX9nSLfoppXSskJo2Ug5j
 7q4V+t2yV9ul6AyFtMDkXfyTMXoFdKJBKKZZQ0D/O7EhZmwm9TTw1XEwM9wg2fEmYLKz
 CXR5ev7BJ+vo3HqFWLhR95ckZ7qIScdwJUA3+Lc1D0XziXT/GuPfFaVdKsEVguFs/FL0
 yT1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=U7NGcfHMw9fIlx0zjv08u1EBzZLiWF+0Z8ViKlAJc90=;
 b=6vsY4y7rcXde9xnKVy8sr0Nyip4BykkX/02357vDgxwppgXDGr3iqxZPmiolNkIHz8
 lspGckbZ6AGu/qhwjx3TmHuwpca56jxiMZ9rWFv/cnEY5RRlVtKaF4gjSpXfiUklHCEI
 AMsgi1BvuhDs/J9NInMBGn4w+mj4eUKyuJMcjHAmmnsePQc5UyZGaKAzOp7oprth1atL
 DvEtT6jkOPn+52qU/Q1QD73pGbzkDUq0uajp+Gt40I6Cr1uoDr97gdAeArgXdUXvN5aE
 hgvIuuOBjqFVk+L9cfo8Cu3JYAJMqDHSknFixG1whUnnxnAdPBKtY5gM2YuIW2CMoi3t
 IEDQ==
X-Gm-Message-State: AOAM530aecbdVgvKpzj3F6PWIkIoZvuPSkk4vzJdXvTPqC7V3ciNvLef
 o9DNHsECDjxjukWHX/ujWhM=
X-Google-Smtp-Source: ABdhPJyZ/HW+NJp7jc2y4VM3nYp6fYMiJyafQXQEx+8l5zpCcVN5K04GdXoQlYIpARpwsMxUtemLDw==
X-Received: by 2002:aa7:cb18:0:b0:413:3a7a:b5d6 with SMTP id
 s24-20020aa7cb18000000b004133a7ab5d6mr730886edt.254.1646434743644; 
 Fri, 04 Mar 2022 14:59:03 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 z15-20020a170906240f00b006d703ca573fsm2200270eja.85.2022.03.04.14.59.02
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 04 Mar 2022 14:59:03 -0800 (PST)
Message-ID: <4f9873896a7d2c42dd11e546ddda3dbf002bcf07.camel@HIDDEN>
Subject: Re: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme
 packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878-done <at> debbugs.gnu.org, 
 zimoun <zimon.toutoune@HIDDEN>
Date: Fri, 04 Mar 2022 23:59:00 +0100
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 53878-done
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Philip,

Am Sonntag, dem 27.02.2022 um 16:28 -0500 schrieb Philip McGrath:
> Hi,
> 
> On Sunday, February 27, 2022 3:42:46 AM EST Liliana Marie Prikler
> wrote:
> > 
> > Perhaps I wasn't clear enough about this in v5, but I think spec
> > should
> > be a single argument rather than multiple ones.  This way, if we do
> > find that we need to extend it to support an additional argument,
> > we
> > don't have to awkwardly code around the #:rest.
> > 
> 
> Rather than debate it, I'm sending a v7 with the change to patch
> 03/24 that Liliana requested in
> <https://issues.guix.gnu.org/53878#187>.
Sorry for the delay.  I cleaned up some of your commits and their
messages, but apart from that pushed v7 without major changes.  I'm
marking this as done now; if you feel I've made a mistake somewhere,
don't hesitate to reopen.

Cheers  




Notification sent to Philip McGrath <philip@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Liliana Marie Prikler <liliana.prikler@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 1 Mar 2022 01:47:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 28 20:47:56 2022
Received: from localhost ([127.0.0.1]:35061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOrcJ-0004BY-Or
	for submit <at> debbugs.gnu.org; Mon, 28 Feb 2022 20:47:56 -0500
Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]:51371)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nOrcI-0004Ay-Nr
 for 53878 <at> debbugs.gnu.org; Mon, 28 Feb 2022 20:47:55 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailnew.west.internal (Postfix) with ESMTP id 5AA0F2B00208;
 Mon, 28 Feb 2022 20:47:48 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Mon, 28 Feb 2022 20:47:49 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=/WrC8PomR8thek
 FJA8o1pM0qQZihzP2DUNTsgNTTV0A=; b=FuvLFzAxBcxROt0P0/hyEEoW+1ItG8
 NbEglo3KrCPB1JlIftMtVhUlhQJB3fQ/hHf3omxXm2xlXglUAXlHGMHvj73nCJB+
 5oEOF27F9S8QyiQskswgb2oVuw+9uDxIZUBdqo/Cf2pqbb4WgSuxq2q3WiQcMOQj
 gEC9tY4Bf5GmRqkTZ34l688VmSEL6Fs7kEiTikmW/RMwBch0yIUZHnjc1fh/gGIc
 +LTrLk5FTizjJ3TZt2LlRT9b8RXVYVZKkOty4PiGekz9CNFcFa34r1y/dJ+7A6iC
 cMQplMPZPgIjlFtKeTY9vZOlN9faRr9Nk2HG7wrTA9bwdFARXH7w78uw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/WrC8PomR8thekFJA
 8o1pM0qQZihzP2DUNTsgNTTV0A=; b=omt2csIfYy7MiRvt3B9Q7e+sb7AJmwRGD
 g6N2amWY0kqsGNcWrFmBnbDeCkiAfZ7IyGSO8bzhqhPY3GqCMQohz7W8JnhQR8lU
 8sFPfW5V2gCFFWwjyo/q0ghMg0mzDev3gTvcp4zRhpXowj9OSAuwCrO/2XlpBy04
 o2va4Sg3Wep9fPbN0aEua0+Ew40cg4/+QvR+mtHbUwRttIC9uPaAaoytBp4t9Mis
 6TfQ+Aqt6uy9lnxPuFwYNEonIf913Shf5yxNaZQSORhsjaiWFtI4cn5SyljqrwwQ
 oXHbW0mfty3tsJa9UhLcjt0EuI/ser1A/uc+wr5OjDFA0LTOAJmGw==
X-ME-Sender: <xms:QnsdYsF9CkzHsdEsBXKGFX1I0bMrg-_DGYCPyRLOOvCBs5H4DrLZdw>
 <xme:QnsdYlUNVWFAoVHqnN7uxqdmHQUCdV66_dzxVDGqpFhdAvI8cq2udsDv5ASVSxfne
 UXziffVu5bFkDDimVo>
X-ME-Received: <xmr:QnsdYmJj7dIwhYlQ4JF55N8bHdUxizJPFHZSHzBECZmgPauaF_Ai1yATTURgk6Prboh5vqjz7U-dIr6OyAhYGLqe5bbym1yl0qM-TA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddruddtuddgfeejucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhggtgesghdtreertddtvdenucfhrhhomheprfhhihhlihhp
 ucfotgfirhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhmqe
 enucggtffrrghtthgvrhhnpeeiieefheeutedutdfgffdtheehtedtudevtedtgfeludel
 leekgfduteejkefggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih
 hlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh
X-ME-Proxy: <xmx:QnsdYuHImPXALYfuauviD1GwDEuzMijXUO7s1A43PWvgNxIdq89BHA>
 <xmx:QnsdYiVyN2AzVcyLlpSuuqQci2FKlhZeqEKuFw-kdRQ0X6Z4BDApOw>
 <xmx:QnsdYhN0K5nCN5ZW4x03fzG_2_jE5ZvSPd8AdYJyPKNkNTq15iFVeA>
 <xmx:Q3sdYpOxIjIrBRgl1PNEUF_RTYwlOcb4Y31BmYTlHBwYF5uVgXNQt6lg42A>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 28 Feb 2022 20:47:46 -0500 (EST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 14:55:59 -0500
Message-ID: <3566149.rYT2d9vS2d@bastet>
In-Reply-To: <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <19823080.dSP1spjjOr@bastet>
 <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart3472970.ViWdsapti3";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--nextPart3472970.ViWdsapti3
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>, Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 14:55:59 -0500
Message-ID: <3566149.rYT2d9vS2d@bastet>
In-Reply-To: <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN> <19823080.dSP1spjjOr@bastet> <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>

On Saturday, February 26, 2022 1:30:08 PM EST Liliana Marie Prikler wrote:
> Hi,
> 
> Am Samstag, dem 26.02.2022 um 12:23 -0500 schrieb Philip McGrath:
> > Hi,
> > 
> > On Saturday, February 26, 2022 9:26:29 AM EST Liliana Marie Prikler
> > 
> > wrote:
> > > I'm not talking about the generated file, but the procedure that
> > > generates it.  Special characters like dots and slash are still
> > > pretty special in Scheme, even if they're allowed as identifiers.
> > 
> > Do you mean A, B, C, and/or D of these:
> > a
> > 
> > >           (replace 'configure
> > >             (lambda* (#:key inputs configure-flags #:allow-other-
> > > keys)
> > >               (let* ((racket (search-input-file inputs
> > > "bin/racket")))
> > >                 (apply invoke
> > >                        racket
> > >                        #$make-installation-layer.rkt ;; <--- A
> > >                        `(,@configure-flags
> > >                          ,(dirname (dirname racket))
> > >                          ,#$output))
> > >                 (invoke racket
> > >                         "--config" (string-append #$output
> > > "/etc/racket")
> > >                         "-l" "raco" "setup"
> > >                         "--no-user"))))
> > > 
> > > [...]
> > > 
> > > (define make-installation-layer.rkt ;; <--- B
> > >   (scheme-file
> > >    "make-installation-layer.rkt" ;; <--- C
> > >    `(module
> > >      make-installation-layer racket/base ;; <--- D
> > >      (require racket/cmdline
> > 
> > or something else?
> 
> The name in B is confusing imo, because it implies a procedure when it
> is in fact a file.  Of course, that'd affect A as well.  The file name
> in C does not matter too much, but should probably be matched with B to
> some extent (but importantly keeping the .rkt extension even if we drop
> it from B).  I'm not sure if D is a function call or not, but if it's a
> module name perhaps we should make it match B.
> 
> Given that we pass configure-flags to this thing, how about "configure-
> racket-layer", "configure-layer.rkt" or something along those lines?
> 

"configure-layer.rkt" seems fine. I do see the potential for confusion about 
whether this was "making" an "installation-layer.rkt".

(D is a module name and should for clarity match C without the suffix. 
Ultimately, for a module that is not a submodule, it is ignored and the name 
comes from context. This is an older way of writing modules that predates 
"#lang" (which would be inconvenient with `scheme-file`). Calling `read` with 
the appropriate parameters on the input "#lang racket/base 42" would produce 
the datum `(module anonymous-module racket/base (#%module-begin 42))`.)

> > In particular, not to be dense, but B is not a function.
> 
> Yeah, that's my bad for only skimming these and not paying too close
> attention to brackets.  The name itself implies a function, hence my
> confusion.  Looking at things closely would make me see more typos like
> ";; workaroung Guile reader/printer:"
> workaround.
> 

Thanks.

> > > > > I think some way to shorten those origins would do wonders in
> > > > > terms
> > > > > of the number of lines this patch adds.
> > > > 
> > > > At one point, I had abbreviated the origins as something like:
> > > > 
> > > >   (REPO-SPEC SHA256 [COMMIT])
> > > > 
> > > > [...]
> > > 
> > > I wouldn't do this inside of extract-package-source, but define a
> > > one or two liner for adding specifically packages hosted on
> > > racket's github.  WDYT?
> > > 
> > > > I wasn't sure about the trade-off between being slightly more
> > > > cryptic
> > > > than explicit origins, but a lot shorter.
> > > 
> > > Note that the goal is not to code golf, but to be understandable. 
> > > When adding a bunch of origins as inputs, understandability suffers
> > > by induced scrolling.
> > 
> > I've done this, and it was a very good idea. In particular, it helped
> > find some places where I hadn't switched to using `%racket-commit`
> > once the release was tagged.
> 
> That is better, but can still be improved.  As hinted at in my comment
> to your tree, origin snippets might be a better solution here unless
> I'm missing something in the heat of the moment.

Could you give an example of what you imagine the result might look like in 
use? E.g. (but I'm not sure this would really be an improvement):

> (cons*
>  ...
>  libedit
>  racket-minimal
>  (append
>   (racket-package-sources
>    "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
>    "2d" "2d-doc" "2d-lib")
>   (racket-package-sources
>    "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx")
>    '("algol60" "."))
>   ...))

-Philip

--nextPart3472970.ViWdsapti3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmIahc8ACgkQygNjjfo/
HHrIfxAApQt8KeuiaXltoyLKUkwtufzJgzRmu0EYtKjKglt+g8RQfl7FoRWwmQq8
Ib2p+c4mCwiiwwfEmuSi+UfMf2ZjR76u+uAQbvPXEyCLOkMrD/JuUZd9LMuDuBbD
7aTGJbLKWgGaZQ1+ly22cvJ1vTR0uDKCiJlgGZBS2GjrXmRdoHjoeeCJCeT4Qb47
5dw8hjaNEKcPZuqP2A0/6ETqoIuUg4BdhUn4tYnFTfX8SLx2jLiXYTmDUrbpVh2k
h0yeypVA0dU53RmZQ54ATGCHSyCpiZvm7kgvOffB2zVB4N+IB7TYlxIvjUdGeCIk
7C+U1RbdRvWAG4kUuOQ0hWCHhPOzPwfd3yNEubszMV6YZ2Vbrx7LdfMEfHXWfJ9S
IaMJ8jCjZ3X0Ym98JsV9hLriZUvz/2OblyqaZZR0bpBXtaSANg8Plcme+hIz87Fd
umnuoAC6oL9G+ZMXCkfh5r1CG8q2fWvHBUyRmw4BYVJpls7BWruf2GJQ87JtwIL2
ajsGuGcc/hwAZdT9iwTioFt5T9dslLGIhRsTt2fwxxXccz3Y+6DsFy58jJfbxUw5
J+BxJ+MkP3UFedIEnDk9BODApHpoE//OaXsyiddToe77o19cJHLwfSGMySCUk7sW
+BoXmDzqcVPDLoBidR8b1B+DZGV+AAhw1zRWBwk0c5f1UHxLq/Q=
=BixL
-----END PGP SIGNATURE-----

--nextPart3472970.ViWdsapti3--







Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:34:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:34:27 2022
Received: from localhost ([127.0.0.1]:59412 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nORBT-0008Nx-0Y
	for submit <at> 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 <philip@HIDDEN>) id 1nORBR-0008Nj-Vv
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 24/24] gnu: racket-vm-cs: Build with "--enable-scheme".
Date: Sun, 27 Feb 2022 16:29:20 -0500
Message-Id: <20220227212920.2009000-25-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:34:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:34:12 2022
Received: from localhost ([127.0.0.1]:59409 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nORBD-0008NT-GV
	for submit <at> 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 <philip@HIDDEN>) id 1nORBB-0008NF-U5
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 23/24] gnu: chez: Add 'chez-scheme-for-system'.
Date: Sun, 27 Feb 2022 16:29:19 -0500
Message-Id: <20220227212920.2009000-24-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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)
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:33:52 2022
Received: from localhost ([127.0.0.1]:59403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nORAt-0008MJ-W1
	for submit <at> 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 <philip@HIDDEN>) id 1nORAr-0008M7-RG
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 22/24] gnu: Add chez-scheme-for-racket.
Date: Sun, 27 Feb 2022 16:29:18 -0500
Message-Id: <20220227212920.2009000-23-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:33:27 2022
Received: from localhost ([127.0.0.1]:59400 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nORAV-0008Ld-MD
	for submit <at> 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 <philip@HIDDEN>) id 1nORAU-0008LS-UK
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 21/24] gnu: chez-mit: Support chez-scheme-for-racket.
Date: Sun, 27 Feb 2022 16:29:17 -0500
Message-Id: <20220227212920.2009000-22-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Racket's variant of Chez Scheme defines 'string->uninterned-symbol',
which conflicts with the definition from '(chez mit)'. See discussion at
<https://github.com/racket/racket/issues/4151>.

* gnu/packages/chez.scm (chez-mit)[origin]<snippet>: 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:33:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:33:12 2022
Received: from localhost ([127.0.0.1]:59397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nORAG-0008LB-6I
	for submit <at> 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 <philip@HIDDEN>) id 1nORAD-0008Kv-Tp
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 20/24] gnu: chez-scheme: Explicitly package bootstrap
 bootfiles.
Date: Sun, 27 Feb 2022 16:29:16 -0500
Message-Id: <20220227212920.2009000-21-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

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:
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:32:52 2022
Received: from localhost ([127.0.0.1]:59389 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR9v-0008Jr-JC
	for submit <at> 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 <philip@HIDDEN>) id 1nOR9u-0008Jd-CB
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 19/24] gnu: Add chez-nanopass.
Date: Sun, 27 Feb 2022 16:29:15 -0500
Message-Id: <20220227212920.2009000-20-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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"
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:32:37 2022
Received: from localhost ([127.0.0.1]:59386 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR9g-0008JO-UV
	for submit <at> 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 <philip@HIDDEN>) id 1nOR9e-0008JA-Tt
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 18/24] gnu: Add stex.
Date: Sun, 27 Feb 2022 16:29:14 -0500
Message-Id: <20220227212920.2009000-19-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:32:18 2022
Received: from localhost ([127.0.0.1]:59383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR9O-0008Is-7k
	for submit <at> 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 <philip@HIDDEN>) id 1nOR9M-0008If-Ne
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 17/24] gnu: chez-scheme: Use new package style.
Date: Sun, 27 Feb 2022 16:29:13 -0500
Message-Id: <20220227212920.2009000-18-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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")
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:32:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:32:06 2022
Received: from localhost ([127.0.0.1]:59380 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR9B-0008IR-Tw
	for submit <at> 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 <philip@HIDDEN>) id 1nOR93-0008Gm-Va
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 16/24] gnu: chez-scheme: Use shared zlib and lz4.
Date: Sun, 27 Feb 2022 16:29:12 -0500
Message-Id: <20220227212920.2009000-17-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

This change also involves building 'libkernel.a' instead of 'kernel.o'.

Support for these build options was merged upstream in 2019: see
discussion at <https://github.com/cisco/ChezScheme/pull/443>.

* 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:
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:57 2022
Received: from localhost ([127.0.0.1]:59369 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR93-0008Gt-Hw
	for submit <at> 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 <philip@HIDDEN>) id 1nOR8p-0008GD-K5
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search
 path.
Date: Sun, 27 Feb 2022 16:29:11 -0500
Message-Id: <20220227212920.2009000-16-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

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/"
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:44 2022
Received: from localhost ([127.0.0.1]:59366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8p-0008GM-C9
	for submit <at> 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 <philip@HIDDEN>) id 1nOR8a-0008Ft-3z
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 14/24] gnu: chez-scheme: Use new style for Chez packages.
Date: Sun, 27 Feb 2022 16:29:10 -0500
Message-Id: <20220227212920.2009000-15-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:43 2022
Received: from localhost ([127.0.0.1]:59364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8p-0008GJ-3O
	for submit <at> 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 <philip@HIDDEN>) id 1nOR8J-0008Ew-Er
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 13/24] gnu: racket: Add 'racket-vm-for-system'.
Date: Sun, 27 Feb 2022 16:29:09 -0500
Message-Id: <20220227212920.2009000-14-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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"))
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:14 2022
Received: from localhost ([127.0.0.1]:59361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8L-0008Fa-Dj
	for submit <at> 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 <philip@HIDDEN>) id 1nOR87-0008DP-Nx
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 12/24] gnu: chez: Add utilities for Chez machine types.
Date: Sun, 27 Feb 2022 16:29:08 -0500
Message-Id: <20220227212920.2009000-13-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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")
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:13 2022
Received: from localhost ([127.0.0.1]:59359 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8K-0008FR-P9
	for submit <at> 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 <philip@HIDDEN>) id 1nOR83-0008DF-8z
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 11/24] gnu: racket: Move Chez bootfiles to (gnu packages
 chez).
Date: Sun, 27 Feb 2022 16:29:07 -0500
Message-Id: <20220227212920.2009000-12-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:12 2022
Received: from localhost ([127.0.0.1]:59356 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8I-0008FD-DS
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7z-0008D4-4s
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 10/24] gnu: racket-minimal: Separate from the Racket VM.
Date: Sun, 27 Feb 2022 16:29:06 -0500
Message-Id: <20220227212920.2009000-11-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

For consistency with other Racket distributions, 'racket-minimal' should
have the "racket-lib" Racket package installed: see
<https://github.com/racket/racket/issues/3851#issuecomment-942368947>.

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 (<https://github.com/racket/racket>) 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. <https://github.com/pycket/pycket>.)
+;;
+;; 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 <https://github.com/racket/racket/issues/3851>.
-             ;; 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:10 2022
Received: from localhost ([127.0.0.1]:59354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8H-0008F3-NR
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7u-0008Ch-5o
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 09/24] gnu: configure-layer.rkt: Adjust indentation.
Date: Sun, 27 Feb 2022 16:29:05 -0500
Message-Id: <20220227212920.2009000-10-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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)))))))
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:31:09 2022
Received: from localhost ([127.0.0.1]:59352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR8H-0008F0-DI
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7p-0008CG-D1
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 08/24] gnu: racket-minimal: Add "debug" output.
Date: Sun, 27 Feb 2022 16:29:04 -0500
Message-Id: <20220227212920.2009000-9-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:44 2022
Received: from localhost ([127.0.0.1]:59338 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7r-0008Cq-DM
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7l-0008C0-5o
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 07/24] gnu: racket-minimal: Adjust indentation.
Date: Sun, 27 Feb 2022 16:29:03 -0500
Message-Id: <20220227212920.2009000-8-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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 <https://github.com/racket/racket/issues/3851>.
-            ;; 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 <https://github.com/racket/racket/issues/3851>.
+             ;; 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:43 2022
Received: from localhost ([127.0.0.1]:59335 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7n-0008Ca-PU
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7g-0008Bj-Lw
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 06/24] gnu: racket-minimal: Change inheritance to follow
 bootstrapping.
Date: Sun, 27 Feb 2022 16:29:02 -0500
Message-Id: <20220227212920.2009000-7-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.3 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 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 [...] 
 Content analysis details:   (2.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.221.180 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.221.180 listed in wl.mailspike.net]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  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 [...] 
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.221.180 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.221.180 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ambrevar.xyz (xyz)]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

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 <ludo@HIDDEN>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright © 2020 Pierre Neidhardt <mail@HIDDEN>
-;;; Copyright © 2021 Philip McGrath <philip@HIDDEN>
+;;; Copyright © 2021, 2022 Philip McGrath <philip@HIDDEN>
 ;;; Copyright © 2021 jgart <jgart@HIDDEN>
 ;;;
 ;;; 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





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:39 2022
Received: from localhost ([127.0.0.1]:59333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7n-0008CS-AT
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7b-0008BS-Rz
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 05/24] gnu: racket-minimal: Don't configure non-existant
 catalogs.
Date: Sun, 27 Feb 2022 16:29:01 -0500
Message-Id: <20220227212920.2009000-6-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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")))
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:39 2022
Received: from localhost ([127.0.0.1]:59331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7m-0008CP-Bp
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7X-0008BH-Qq
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 04/24] gnu: racket-minimal: Use new package style.
Date: Sun, 27 Feb 2022 16:29:00 -0500
Message-Id: <20220227212920.2009000-5-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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 <https://github.com/racket/racket/issues/3851>.
-           ;; 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 <https://github.com/racket/racket/issues/3851>.
+            ;; 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,
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:33 2022
Received: from localhost ([127.0.0.1]:59327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7f-0008Bt-5O
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7T-0008B3-Ma
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 03/24] gnu: racket: Use Git origins for Racket packages.
Date: Sun, 27 Feb 2022 16:28:59 -0500
Message-Id: <20220227212920.2009000-4-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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 <https://github.com/racket/srfi/pull/15>.
-            ;; 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 <https://github.com/racket/srfi/pull/15>.
+                      (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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:31 2022
Received: from localhost ([127.0.0.1]:59323 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7X-0008BX-FO
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7N-0008A7-MN
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 02/24] gnu: racket: Update to 8.4.
Date: Sun, 27 Feb 2022 16:28:58 -0500
Message-Id: <20220227212920.2009000-3-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.3 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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/ra [...] 
 Content analysis details:   (2.3 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.50 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.50 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: liltechdude.xyz (xyz)]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.3 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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/ra [...] 
 
 Content analysis details:   (1.3 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: liltechdude.xyz (xyz)]
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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.
<patches>: Use "racket-gui-tethered-launcher-backport.patch".
<snippet>: 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 <monego@HIDDEN>
 # Copyright © 2021 Björn Höfling <bjoern.hoefling@HIDDEN>
 # Copyright © 2021 Greg Hogan <code@HIDDEN>
-# Copyright © 2021 Philip McGrath <philip@HIDDEN>
+# Copyright © 2021, 2022 Philip McGrath <philip@HIDDEN>
 # Copyright © 2021 Arun Isaac <arunisaac@HIDDEN>
 # Copyright © 2021 Sharlatan Hellseher <sharlatanus@HIDDEN>
 # Copyright © 2021 Dmitry Polyakov <polyakov@HIDDEN>
@@ -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 <mflatt@HIDDEN>
+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>             prefix tool (compiler, linker, ...) names"
+   echo "  --[no]gzip-man-pages              compress manual pages ($gzipmanpages)"
+   echo "  --workarea=<pathname>             build directory ($w)"
++  echo "  --force                           configure even without boot files"
+   echo "  CC=<C compiler>                   C compiler"
+   echo "  CPPFLAGS=<C preprocessor flags>   C preprocessor flags"
+   echo "  CFLAGS=<C compiler flags>         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="<machine type>"
+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 <mflatt@HIDDEN>
+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)
++
+ # <machine>.bootquick to build boot files for <machine>
+ # 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-<host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files
++XPATCH_DEPS_built = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \
++                    $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot
++XPATCH_DEPS_existing = 
++XPATCH_DEPS = $(XPATCH_DEPS@USE_SCHEME_MODE@)
+ 
+-$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(XPATCH_DEPS)
++$(XPATCH_FILE): $(XPATCH_DEPS)
+ 	$(MAKE) bounce TARGET=build-xpatch-using-host
+ 
+ build-xpatch-using-host:
+ 	cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/s && $(MAKE) -f Mf-cross m=$(MACH) xm=$(TARGET_MACH) Scheme="$(SCHEME_BIN)" SCHEMEHEAPDIRS="$(SCHEME_INC)"
+ 
+ XPATCH =
+-XPATCHcross = --xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++XPATCHcross = --xpatch $(XPATCH_FILE)
+ 
+ racket.boot: racket.so
+ 	$(SCHEME) --script $(srcdir)/convert-to-boot.ss @BOOT_COMPRESS_COMP@ $(XPATCH@CROSS_MODE@) racket.so racket.boot $(TARGET_MACH)
+@@ -410,7 +434,7 @@ install-cross:
+ 	$(MAKE) compile-xpatch.$(TARGET_MACH)
+ 	$(MAKE) library-xpatch.$(TARGET_MACH)
+ 
+-SCHEME_XPATCH = $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++SCHEME_XPATCH = $(XPATCH_FILE)
+ 
+ CROSS_SERVE_DEPS = $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss \
+                    $(srcdir)/../expander/env.ss $(srcdir)/../linklet/config.ss
+diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure
+index 21695a431a..1eeef57753 100755
+--- a/racket/src/cs/c/configure
++++ b/racket/src/cs/c/configure
+@@ -654,6 +654,9 @@ MINGW
+ NOT_OSX
+ OSX
+ SETUP_BOOT_MODE
++USE_SCHEME_MODE
++MAKE_SCHEME_SCHEME
++MAKE_SCHEME_MODE
+ TT_CROSS_MODE
+ T_CROSS_MODE
+ CROSS_MODE
+@@ -1448,7 +1451,7 @@ Optional Features:
+   --enable-docs           build docs on install (enabled by default)
+   --enable-usersetup      setup user-specific files on install
+   --enable-racket=<path>  use <path> as Racket for build; or "auto" to create
+-  --enable-scheme=<path>  use <path> as host's build directory for cross
++  --enable-scheme=<path>  use <path> as host build for cross
+   --enable-mach=<mach>    use Chez Scheme machine type <mach>
+   --enable-target=<mach>  cross-build for Chez Scheme machine type <mach>
+   --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=<path>  use <path> as Racket for build; or "auto" to create])
+-AC_ARG_ENABLE(scheme,     [  --enable-scheme=<path>  use <path> as host's build directory for cross])
++AC_ARG_ENABLE(scheme,     [  --enable-scheme=<path>  use <path> as host build for cross])
+ AC_ARG_ENABLE(mach,       [  --enable-mach=<mach>    use Chez Scheme machine type <mach>])
+ AC_ARG_ENABLE(target,     [  --enable-target=<mach>  cross-build for Chez Scheme machine type <mach>])
+ 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 <mflatt@HIDDEN>
+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 <https://github.com/racket/srfi/pull/15>.
+            ;; 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:14 2022
Received: from localhost ([127.0.0.1]:59319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7O-0008Av-1A
	for submit <at> 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 <philip@HIDDEN>) id 1nOR7I-00089Q-Qq
 for 53878 <at> 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 <at> 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 <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 01/24] gnu: Use license prefix in (gnu packages racket).
Date: Sun, 27 Feb 2022 16:28:57 -0500
Message-Id: <20220227212920.2009000-2-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227212920.2009000-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227212920.2009000-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

* 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 <http://www.gnu.org/licenses/>.
 
 (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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:30:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 16:30:06 2022
Received: from localhost ([127.0.0.1]:59315 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOR7F-00089V-KT
	for submit <at> debbugs.gnu.org; Sun, 27 Feb 2022 16:30:05 -0500
Received: from mail-vs1-f47.google.com ([209.85.217.47]:44580)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nOR7C-00088V-Qc
 for 53878 <at> debbugs.gnu.org; Sun, 27 Feb 2022 16:30:03 -0500
Received: by mail-vs1-f47.google.com with SMTP id y4so11044643vsd.11
 for <53878 <at> debbugs.gnu.org>; Sun, 27 Feb 2022 13:30:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=1TD+mmEC5lXYMkOe5PlM2aylzWfpKdZ/eLU50jlGjq8=;
 b=Aeti9qJfnqJpWZZq9RCcGbuRZMGNT4r1/OB82LRhnKzQBdaDfKK5H47Sbjw7FrVllh
 DLopbqOJ4snd1rpOesxJr4yZJm/Grsbdpssxhsz0svLN4IXULyX1Hnpas2On7kiLdE6K
 +dVDyq3wg+09scyBOo/TIskEU2Z5Voy2odjAycCgFsWCDhoFik7RX6pFlDL8fOlsGy0e
 Dr3uDUWvymIxnCKzioxmPOiFqcn9zBdBl6BCpRJFaEex626uQToQbT9JDZbc/5Ei6Fi4
 33EzygEQ5sJPLEWCcV1SbPhH+ZWBZlv6hCsU0VzWf7sDO0XaXCcT30PFnGldbJmIUdlI
 tx9Q==
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=1TD+mmEC5lXYMkOe5PlM2aylzWfpKdZ/eLU50jlGjq8=;
 b=5mS0XX/hgSNsmdTqsSPVaIrfm0R7q+r8VUUjzYxpl13MHNuEh/B3L1f9GkrTr3H7MN
 TM+WZmp0OmJOutqUqTVmihku41wNh/H7ykwmxGOHs9MQ71PZu4YQLHbhPLTc7FNMYCsD
 LlWFIHU8O4qn2Qvt3y3VkQYw62zY0VIKUSem2kTXEmxZZbj9mFTePPN3c/YhTJAy4+u8
 yS07OooEzlV8/sMkPy+e+RAKv6EWVg0J8ukvnFhgXy0AvpNU0fi/4dHRpiXRQEmu2TXX
 G1Ek1sunGrT0pyjbHNB3QDE0iZAHUxWgxjtHDklpoteQrtm+bHSoX0MlxkTGnmkcwBME
 q1Sg==
X-Gm-Message-State: AOAM530r/r6NfFhcF6oOm4t1cokfyurGRyFesrzzYM/eYAA6wNDG4XZR
 Z5lvHUX+MgYzy3CHwZKUvV3J1O0i7OU1mvdTYug=
X-Google-Smtp-Source: ABdhPJz5N2mp1Hfi8TFXZHOu8VNFWCjASEDKmpVjt5ZwIHvJQMKttrdDDCPM/LbzP4XAjePSy8rSFQ==
X-Received: by 2002:a67:d589:0:b0:31b:5561:b18e with SMTP id
 m9-20020a67d589000000b0031b5561b18emr6630819vsj.53.1645997397066; 
 Sun, 27 Feb 2022 13:29:57 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 h127-20020a676c85000000b0031c5721b5ddsm1154980vsc.32.2022.02.27.13.29.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 27 Feb 2022 13:29:56 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v7 00/24] Update Racket to 8.4. Adjust Chez Scheme packages.
Date: Sun, 27 Feb 2022 16:28:56 -0500
Message-Id: <20220227212920.2009000-1-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220220060610.178131-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.4 (/)

Hi,

On Sunday, February 27, 2022 3:42:46 AM EST Liliana Marie Prikler wrote:
> 
> Perhaps I wasn't clear enough about this in v5, but I think spec should
> be a single argument rather than multiple ones.  This way, if we do
> find that we need to extend it to support an additional argument, we
> don't have to awkwardly code around the #:rest.
> 

Rather than debate it, I'm sending a v7 with the change to patch 03/24 that
Liliana requested in <https://issues.guix.gnu.org/53878#187>.

In the medium term, I'd rather put effort into making a `racket-build-system`
than tinker too much with the current way of doing things.

 -Philip

Philip McGrath (24):
  gnu: Use license prefix in (gnu packages racket).
  gnu: racket: Update to 8.4.
  gnu: racket: Use Git origins for Racket packages.
  gnu: racket-minimal: Use new package style.
  gnu: racket-minimal: Don't configure non-existant catalogs.
  gnu: racket-minimal: Change inheritance to follow bootstrapping.
  gnu: racket-minimal: Adjust indentation.
  gnu: racket-minimal: Add "debug" output.
  gnu: configure-layer.rkt: Adjust indentation.
  gnu: racket-minimal: Separate from the Racket VM.
  gnu: racket: Move Chez bootfiles to (gnu packages chez).
  gnu: chez: Add utilities for Chez machine types.
  gnu: racket: Add 'racket-vm-for-system'.
  gnu: chez-scheme: Use new style for Chez packages.
  gnu: chez-scheme: Use "lib/chez-scheme" for search path.
  gnu: chez-scheme: Use shared zlib and lz4.
  gnu: chez-scheme: Use new package style.
  gnu: Add stex.
  gnu: Add chez-nanopass.
  gnu: chez-scheme: Explicitly package bootstrap bootfiles.
  gnu: chez-mit: Support chez-scheme-for-racket.
  gnu: Add chez-scheme-for-racket.
  gnu: chez: Add 'chez-scheme-for-system'.
  gnu: racket-vm-cs: Build with "--enable-scheme".

 gnu/local.mk                                  |    4 +-
 gnu/packages/chez.scm                         | 1264 ++++++++++-----
 gnu/packages/emacs-xyz.scm                    |    2 +-
 gnu/packages/loko.scm                         |    2 +-
 .../racket-enable-scheme-backport.patch       |  465 ++++++
 ...acket-gui-tethered-launcher-backport.patch |   26 +
 gnu/packages/racket.scm                       | 1433 +++++++++++------
 7 files changed, 2342 insertions(+), 854 deletions(-)
 create mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch
 create mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch

-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 08:49:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 03:49:09 2022
Received: from localhost ([127.0.0.1]:56828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOFEq-00078I-Px
	for submit <at> debbugs.gnu.org; Sun, 27 Feb 2022 03:49:08 -0500
Received: from mail-ed1-f66.google.com ([209.85.208.66]:38489)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nOFEp-000784-AQ
 for 53878 <at> debbugs.gnu.org; Sun, 27 Feb 2022 03:49:07 -0500
Received: by mail-ed1-f66.google.com with SMTP id s24so13286753edr.5
 for <53878 <at> debbugs.gnu.org>; Sun, 27 Feb 2022 00:49:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=Itc9Xxh9JfibZ0w4mtMZ3giRKkL7cVqbqngfo9ajXjg=;
 b=Qmje9Tnj1rNNjg4JE9W/GZGI25sRnuoM3a48WwjYkkVGsg/FbAjxDBUdEwLp7AKxXc
 Bf2nOSC3KwpFo2H1j4kV8JHp982v7tkrGYce+vVYirVzyIR1HoumY2b0ETlby1I0AUtw
 Ln8Qg3h2aDc/HxsrYFEhYfqcrtL1vUaD6NsW3iZD8QX80jLvoTgqwoPNxg/I6cDcY/nR
 Ts9VhLzdR1/gu73xdN6R3FtxQnSAlMr6TQWZ6K1VgEtuQRShRPssKhBS4/PXytABpiew
 zIMMfiwYH+IulCQ8oOFNyiAIAwQzQpC87aFXF8b55WpS8VOQWa6MR1IJAGqj+NVYiEjE
 a6YQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=Itc9Xxh9JfibZ0w4mtMZ3giRKkL7cVqbqngfo9ajXjg=;
 b=hJmjh5Nh4eO2SvKivXbiGAP0SjsUbjGJ2Ay+kwb+ziFiN8IxkbKoezNgpt5uj4LZv3
 XQL2wALdm5hd2UWxXmBTmmONBRYhN/qVUAkpI0cHw8x0II4HEzxpyXDAdGHrUokHcNgL
 5XsGOKtueg2wpmD5CfeIHqQYsNkjB7YqL6qHJradhEXrGIBHK7QZMo7S0PQQfEn1eLry
 nyFgfZJAXyvQGAB69SSbJneUUJWHyM5IPWFUPUiXcu9IBlOvAxsd9zt/sIzgIvvJy0GC
 XwLB3xS/yp2KQ3YrF5p1A2TjhLEKsVYH2Sa/QoVNz9AbuLiQS5La7SmvCgWZJd8ymDUU
 7ToA==
X-Gm-Message-State: AOAM5328Miw7/DlNXTs8CkLQOkQ3AmvmO8+R/Q807JeT8MihlplqyGcf
 SbBLWh6C6jGVJmix73/Y9k0=
X-Google-Smtp-Source: ABdhPJxMd0yXKzJa2onsxziFHdlzhJCj6+1lByqaEZq9WOqfcsWKhlwQq/MInCUevAWZ0JjgAa8fpw==
X-Received: by 2002:a05:6402:190a:b0:408:9d75:eab6 with SMTP id
 e10-20020a056402190a00b004089d75eab6mr14127973edz.286.1645951741438; 
 Sun, 27 Feb 2022 00:49:01 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 la3-20020a170906ad8300b006d0562a1011sm3122767ejb.21.2022.02.27.00.49.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 27 Feb 2022 00:49:01 -0800 (PST)
Message-ID: <25b0d1cd85520225008fd3a08b8597828ca71770.camel@HIDDEN>
Subject: Re: [PATCH v6 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for
 search path.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878 <at> debbugs.gnu.org, zimoun
 <zimon.toutoune@HIDDEN>
Date: Sun, 27 Feb 2022 09:48:59 +0100
In-Reply-To: <20220227023450.1877215-16-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
 <20220227023450.1877215-16-philip@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Am Samstag,
 dem 26.02.2022 um 21:34 -0500 schrieb Philip McGrath:
 > There does not seem to be any widely accepted standard path to use > for
 "CHEZSCHEMELIBDIRS". Using a path without a version number [...] 
 Content analysis details:   (1.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (liliana.prikler[at]gmail.com)
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.208.66 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

Am Samstag, dem 26.02.2022 um 21:34 -0500 schrieb Philip McGrath:
> 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.
Having separated this from cosmetic changes makes it much easier to
review, thanks.  LGTM




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 08:43:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 27 03:43:01 2022
Received: from localhost ([127.0.0.1]:56824 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nOF8q-0006wk-4P
	for submit <at> debbugs.gnu.org; Sun, 27 Feb 2022 03:43:01 -0500
Received: from mail-ej1-f66.google.com ([209.85.218.66]:43663)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nOF8o-0006wW-0z
 for 53878 <at> debbugs.gnu.org; Sun, 27 Feb 2022 03:42:54 -0500
Received: by mail-ej1-f66.google.com with SMTP id d10so19011354eje.10
 for <53878 <at> debbugs.gnu.org>; Sun, 27 Feb 2022 00:42:53 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=vGFOHGGSXYAmTmBpNW4tlRDglUmF/CfPSvu/LylXWGA=;
 b=gAjG7enjIO1Hmg1rxxI1v4M+a3QWX9nODXU69MAYtPzvbf44zEUXrHYeTMhv8f4vbH
 AdTPrWjOZyTwsrqkTd5Mf06axnaYY7KNknVUMgeq+6m229rbnxNMBftp20dDe2yd38Wb
 X0VgSCWgQYCT8V0fcqmpFkYAimrxD0V4qEQGWhV1UlqZKF2D8fxHZuVaJpf8TbzGbzHs
 kKTp41ToPyte9NsdDRcPbaCA8ifn3W2p5CAQTl+UsKO+zUtue6gFyoQfNPqSLjL71pQ8
 Yh/CEze4NIAPp5bMMl19Ju2UYpk4C0lwXEmde83H4AYZRrNPXrzJ/lDwF0YAMMW4qicq
 xL4g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=vGFOHGGSXYAmTmBpNW4tlRDglUmF/CfPSvu/LylXWGA=;
 b=ct6QpblXhjGnmKOVFTiEjJHvRCedgwJSbeoj26P9b/erkQTWDpXkIpJO1s7ZrinVXM
 SuQgOdcJhd3fRRqmcdrQRvc1cQlr7j39l85Vdhgqo2O7DakE7qmZ/FYTlELIe0yvkLxv
 6IOVzZ5DfYE81TTI7CZSkDF9TYJztMkPak0tloG0h7pACZhAMhDTpC2//wCYzPERzBBp
 l18q32Y9Z5QtCY/63TP+0L3T2O5YInxvAAtcH5unky/LOxyEqGNno+6S5LjfJT04P5S6
 XPr9fmX3SFLGiO/+KRxoITeMg0WF1nPH5XWmZkpcJG4j3Kw5rNnS+thUVOHXDJZIb4TI
 ZPRg==
X-Gm-Message-State: AOAM530MjlOfW/Wm3SmKA7bW7u9Wea0zFgwtI5z7IT87Rvx5ZNqPRnS+
 5AI+faDS22K3CI/8CcDpHKE=
X-Google-Smtp-Source: ABdhPJzJDsqpSUNcMDM6V9D5I1iD7dPiq/ylXemV6gOc46+XobZxZgL7raUTOEWnWZSS1IKCEh2mLA==
X-Received: by 2002:a17:906:35ca:b0:6ce:d3b5:38f5 with SMTP id
 p10-20020a17090635ca00b006ced3b538f5mr11638770ejb.276.1645951367940; 
 Sun, 27 Feb 2022 00:42:47 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 j2-20020aa7c0c2000000b00412b6b79d1asm4212131edp.10.2022.02.27.00.42.46
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 27 Feb 2022 00:42:47 -0800 (PST)
Message-ID: <09090412d57b03233435146bfa13eb6a73c12990.camel@HIDDEN>
Subject: Re: [PATCH v6 03/24] gnu: racket: Use Git origins for Racket packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878 <at> debbugs.gnu.org, zimoun
 <zimon.toutoune@HIDDEN>
Date: Sun, 27 Feb 2022 09:42:46 +0100
In-Reply-To: <20220227023450.1877215-4-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
 <20220227023450.1877215-4-philip@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.7 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, Am Samstag, dem 26.02.2022 um 21:34 -0500 schrieb Philip
 McGrath: > * gnu/packages/patches/racket-gui-tethered-launcher-backport.patch:
 > Adjust path. > * gnu/packages/racket.scm (racket-packages-orig [...] 
 Content analysis details:   (2.7 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.218.66 listed in list.dnswl.org]
 -0.0 SPF_PASS               SPF: sender matches SPF record
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (liliana.prikler[at]gmail.com)
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.218.66 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 1.2 URI_DOTEDU             Has .edu URI
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

Hi,

Am Samstag, dem 26.02.2022 um 21:34 -0500 schrieb Philip McGrath:
> * gnu/packages/patches/racket-gui-tethered-launcher-backport.patch:
> Adjust path.
> * gnu/packages/racket.scm (racket-packages-origin,
> simple-racket-origin): New procedures.
> (extend-layer): Rename to ...
> (configure-layer.rkt): ... this variable. Tweak command-line
> arguments. Adapt to 'config-tethered-apps-dir'.
> (racket): Stop inheriting from 'racket-minimal'.
> [version]: Use '%racket-version'.
> [source]: Stop using bundled tarball.
> [inputs]: Remove labels. Add 'racket-minimal' and package sources.
> [native-inputs]: Remove, since cross-compilation doesn't work yet.
> [arguments]: Rewrite to use G-expressions, package sources from
> 'inputs', an explicit 'install' phase, and the revised
> 'configure-layer.rkt'.
> ---
>  ...acket-gui-tethered-launcher-backport.patch |   6 +-
>  gnu/packages/racket.scm                       | 714 +++++++++++++---
> --
>  2 files changed, 539 insertions(+), 181 deletions(-)
> 
> diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-
> backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-
> backport.patch
> index abf253486f..1e018eaa79 100644
> --- a/gnu/packages/patches/racket-gui-tethered-launcher-
> backport.patch
> +++ b/gnu/packages/patches/racket-gui-tethered-launcher-
> backport.patch
> @@ -7,13 +7,13 @@ Related to racket/racket#4133
>  
>  (cherry picked from commit 563c68432f127729592f234ef30c31e92618b517)
>  ---
> - share/pkgs/gui-lib/mred/installer.rkt | 3 ++-
> + gui-lib/mred/installer.rkt | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>  
>  diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt
>  index b1691472..9ef06c53 100644
> ---- a/share/pkgs/gui-lib/mred/installer.rkt
> -+++ b/share/pkgs/gui-lib/mred/installer.rkt
> +--- a/gui-lib/mred/installer.rkt
> ++++ b/gui-lib/mred/installer.rkt
>  @@ -72,4 +72,5 @@
>      (list "-A" (path->string (find-system-path 'addon-dir)))))
>   
> diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
> index 00ec587eeb..c4e5ee1311 100644
> --- a/gnu/packages/racket.scm
> +++ b/gnu/packages/racket.scm
> @@ -28,7 +28,9 @@ (define-module (gnu packages racket)
>    #:use-module (guix gexp)
>    #:use-module (guix build-system gnu)
>    #:use-module (srfi srfi-1)
> +  #:use-module (srfi srfi-26)
>    #:use-module (ice-9 match)
> +  #:use-module (ice-9 exceptions)
>    #:use-module (gnu packages)
>    #:use-module (gnu packages autotools)
>    #:use-module (gnu packages bash)
> @@ -389,172 +391,504 @@ (define-public racket-bootstrap-chez-
> bootfiles
>  Chez Scheme.")
>       (license (list license:asl2.0)))))
>  
> +(define (racket-packages-origin name origin spec0 . spec*)
> +  "Extract from ORIGIN the sources for the Racket packages specified
> by SPEC0
> +and any additional arguments SPEC*.  In the resulting file-like
> object, each
> +package's source will be in the directory
> \"/share/racket/pkgs/PKG/\", where
> +PKG is the Racket name for the package.  The NAME will be used in
> the store
> +file name for the resulting file-like object.
>  
> -(define %installer-mirrors
> -  ;; Source:
> -  ;;
> https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58
> -  ;; Matthew Flatt says: "note that many are commented out"
> -  ;; INVARIANT: End with a trailing "/"!
> -  '("https://mirror.racket-lang.org/installers/"
> -    "https://www.cs.utah.edu/plt/installers/"
> -    "https://plt.cs.northwestern.edu/racket-mirror/"
> -    "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/"
> -    ;; Universität Tübingen is using a self-signed HTTPS
> certificate:
> -    "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
> -    "https://racket.infogroep.be/"
> -    ))
> +A package specification is a list of the form:
>  
> -(define %main-repo-main-distribution-pkgs
> -  ;; These are the packages developed in the main Racket Git
> repository
> -  ;; that are part of the main distribution.
> -  '("at-exp-lib"
> -    "base"
> -    "compiler-lib"
> -    ;; NOT "compiler-test"
> -    "compiler"
> -    "net-doc"
> -    "net-lib"
> -    ;; NOT "net-test"
> -    "net"
> -    ;; NOT "plt-services"
> -    ;; NOT "racket-benchmarks"
> -    ;; NOT "racket-build-guide"
> -    "racket-doc"
> -    "racket-index"
> -    "racket-lib"
> -    ;; NOT "racket-test-core"
> -    ;; NOT "racket-test-extra"
> -    ;; NOT "racket-test"
> -    "zo-lib"))
> +  (PKG PATH)
>  
> +where PATH is the path to the package source relative to ORIGIN---
> possibly
> +\".\".  As a special case, a package specification may also be a
> string, which
> +is equivalent to:
> +
> +  (PKG PKG)
> +
> +Examples:
> +
> +- \"expeditor\"
> +- (\"main-distribution\" \".\")
> +- (\"racket-lib\" \"pkgs/racket-lib\")"
> +  (computed-file
> +   (string-append "racket-pkg-" name "-sources")
> +   (with-imported-modules `((guix build utils))
> +     #~(begin
> +         (use-modules (guix build utils))
> +         (mkdir-p (string-append #$output "/share/racket/pkgs"))
> +         (chdir (string-append #$output "/share/racket/pkgs"))
> +         #$@(map (match-lambda
> +                   ((? string? name)
> +                    #~(copy-recursively #$(file-append origin
> (string-append "/" name))
> +                                        #$name))
> +                   ((name ".")
> +                    #~(copy-recursively #$origin #$name))
> +                   ((name path)
> +                    #~(copy-recursively #$(file-append origin
> (string-append "/" path))
> +                                        #$name)))
> +                 (cons spec0 spec*))))))
Perhaps I wasn't clear enough about this in v5, but I think spec should
be a single argument rather than multiple ones.  This way, if we do
find that we need to extend it to support an additional argument, we
don't have to awkwardly code around the #:rest.

> +(define (simple-racket-origin repo hash spec0 . spec*)
> +  "Like 'racket-packages-origin', but specialized for packages
> hosted at
> +\"https://github.com/racket/REPO\" with sha256 checksum HASH.  REPO
> is also
> +used to build the name of the resulting store item."
> +  (apply racket-packages-origin
> +         repo
> +         (origin
> +           (method git-fetch)
> +           (uri (git-reference
> +                 (url (format #f "https://github.com/racket/~a"
> repo))
> +                 (commit %racket-commit)))
> +           (sha256 hash)
> +           (file-name (git-file-name (string-append "racket-" repo)
> +                                     %racket-version)))
> +         spec0
> +         spec*))
Same here, plus it saves us the trouble of a additional "apply".

The effect for 
> +      (simple-racket-origin
> +       "2d" (base32
> "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
> +       "2d" "2d-doc" "2d-lib")
would be that '("2d" "2d-doc" "2d-lib") is more clearly delimited from
the package name and hash, and

> +      (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"))
'(("base" "pkgs/base") ("racket-lib" "pkgs/racket-lib") ...)
needs less quoting over-all.

> +      (simple-racket-origin
> +       "class-iop" (base32
> "08z57q83cr7wnh6g8ah3hdhmsmf9zp1jfs7yvxv188l3hzvygy5l")
> +       "class-iop-lib")
While single strings like this do each cost three additional characters
that way, I wouldn't special-case them.


Cheers




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:35 2022
Received: from localhost ([127.0.0.1]:56613 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9TC-0004LN-Um
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:35 -0500
Received: from mail-qv1-f41.google.com ([209.85.219.41]:39642)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Sh-0004Hp-0R
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:06 -0500
Received: by mail-qv1-f41.google.com with SMTP id a1so9820053qvl.6
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:39:02 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=;
 b=ipGjYQK9quEnWd3gaKrREA0GsKSW/Q8jcj/RBmfjjDy+1FKMyn0zNmORAW6ET9XhRJ
 hMzuBUk27efuJAfSzvBKzQ4bHXTgLc3lX/4IqICXF1FjSMVQmuqQIg9WZ5AWi5jpwk36
 ZjdlN2WYseGDez/N1g6i0tYnQgQ6wDbvCCaIHHnLm+M/zsq/dhMG6uYa8xNK2hXEdlFA
 uYaMG5G1tg3g/Lu3EWGmzDRVKo1xY4iLdVNISMOdH2O7bGvkihoK5k5716EZLvVF3CFr
 s/MvH7UbXIfLwz/YmPHStT+K4+nGN1/BcvCaQ9AxuDjJxRdVioLXNk+qo63Rwmn+G1z3
 L+Yg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=U6sOEQII/nfr63USoeuo2RDShtCjrXl2+vOKM7l7ThA=;
 b=j6QujG6L3d1TmqQaI7re4OtvmuuzijsZkkxa+WztkHhcAN6+R3X9YUHMtMjEWHvwPz
 MHKZeMhfKVimJWUuwtNYEYVD4iA6twxu+oCsEX9W08e3K1nVNimXF2AwQogYVl3kYRAE
 WlT5BsF8SP/YrNOv3ES1G/HtamQOioPI/eiq1DgJEof+Uqja7G1J4xngM0fn/pn57Ns1
 Ruwagev56KPOf5t8EssokR+bn8ioag5O4s5Kwgt7WUIABn93ZgcHgyOrYprIiVqjUURc
 /t9GYwCFR6D3zZDhdWMG71Qkgf1VdpXRjDf/0aEHDCn8NPwNcmn+e4BbM55LJono2ded
 JQdg==
X-Gm-Message-State: AOAM532j5ij3vhSEsLHesyUuwXdpvSE4yz+yDz8qbB0ZcaeGj8/yvlqC
 uDYyr8JbS8gWG2KK+HKPWsdyI1r1zW1P6ucZ+Wo=
X-Google-Smtp-Source: ABdhPJxUNXSzgY9v2kzmBtKZzBoe5VlbFtxJNO+nHvg1kFNssp62zj8L6EMk7vCyDDUZdelDZFRu2w==
X-Received: by 2002:ad4:5f06:0:b0:433:6f6:e2b7 with SMTP id
 fo6-20020ad45f06000000b0043306f6e2b7mr1928841qvb.114.1645929537469; 
 Sat, 26 Feb 2022 18:38:57 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 p20-20020a05620a22b400b00648ca1458b4sm3252776qkh.5.2022.02.26.18.38.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:57 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 23/24] gnu: chez: Add 'chez-scheme-for-system'.
Date: Sat, 26 Feb 2022 21:34:49 -0500
Message-Id: <20220227023450.1877215-24-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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'. * g [...] 
 Content analysis details:   (1.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.41 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.41 listed in list.dnswl.org]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 T_SPF_TEMPERROR        SPF: test of record failed (temperror)
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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'. * g [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.41 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.41 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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)
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:34 2022
Received: from localhost ([127.0.0.1]:56611 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9TC-0004LG-Fw
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:34 -0500
Received: from mail-qk1-f170.google.com ([209.85.222.170]:44612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Sc-0004He-VO
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:13 -0500
Received: by mail-qk1-f170.google.com with SMTP id q4so7778452qki.11
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=ZoWBDgQKu+/EBBDnvmdQuot6TF7P+L6bwBDBflHyYro=;
 b=A1LIjpSTlAxwbY+PjxST/rnQMCgR5BmnQIt5rs1hiJlCDkr/dBvpp2wp0JLKlQRAe4
 vNSrpTJDVOF806lXE1+M82xM+HbVf9z0XQgaWOZ5sQybfmq3H4s3ajnQ9x8tXAskoZ9b
 aQ0W5x4L3rMeVlrZzBMDBB7W7ejN0EjTPOaoUWDgpmRS2ZYKCeGehYYXVptaSIu39yIr
 cvx2S1hm5TVNEJdhP1DklpkJzYy8cSePufXpPxDQQpfNrerezhY0awjK3EX4UOpMEnqD
 6o/TCUzp8fZQZsAMJaFwitY4XmyZjuORiQ+AmbYU842y6VNegAoNrE2oLwNPi2xdEgyM
 bWGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=ZoWBDgQKu+/EBBDnvmdQuot6TF7P+L6bwBDBflHyYro=;
 b=4U+i/zYgiQS51LLxB5mHjsyY9O+sXFSXKw/cVOCvDXKFJUl3pLg+ErKyjPDxz3AY0U
 2KN5TS47f/JfyT9Y21JepFrbFRaMfaiY9H0yB/r6EEJYbf3StC/XNyMwI5NRki4GNILC
 4kMNqBzgW0z5by9MLaD9dbNIEF6h+xLUTSKBe07oRU3iDM4rnrgNNsWz4Zvx8EieBFzk
 sUu4dH+f2qQv19OldjqjFCxRx4mxKATTRgexAXYX+O/NnvrDZzF76SFjCJUu4q4RTvEq
 B2CAbo++KAphFeUD1K0aPzA17KK3dtj+fze98hbHGJaTEdTRD2kwMFsWSKo1hHUgh3cN
 AJ9Q==
X-Gm-Message-State: AOAM531e8JA/l2zdJcyB1PSy+/WMBizegR7FfZzcvJp+xilWdqVBmEF9
 FJYAT6nxz2fHWsMgXc03mcjhdZ/FyyCnBlj0S20=
X-Google-Smtp-Source: ABdhPJx3NXxmC+7joC+FmFpSpbnsgDkvQ8WaftTuRBLVCKuWC9WHqIbGRB1dJxQsDBwf44VF3XdZiQ==
X-Received: by 2002:a05:620a:35c:b0:648:e0da:8a64 with SMTP id
 t28-20020a05620a035c00b00648e0da8a64mr8275709qkm.73.1645929533361; 
 Sat, 26 Feb 2022 18:38:53 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 f7-20020a05622a104700b002d4b318692esm4376280qte.31.2022.02.26.18.38.52
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:53 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 22/24] gnu: Add chez-scheme-for-racket.
Date: Sat, 26 Feb 2022 21:34:48 -0500
Message-Id: <20220227023450.1877215-23-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 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.sc [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  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.sc
    [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.170 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.170 listed in wl.mailspike.net]
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

The Racket variant of Chez Scheme can be used to support platforms that
are not yet supported by upstream Chez Scheme.

* gnu/packages/chez.scm (chez-scheme-for-racket): New variable.
(chez-scheme-for-racket-bootstrap-bootfiles)[version,
supported-systems]: Derive from 'chez-scheme-for-racket'.
* gnu/packages/racket.scm (%racket-version): Update comment.
---
 gnu/packages/chez.scm   | 97 ++++++++++++++++++++++++++++++++++++++---
 gnu/packages/racket.scm |  3 +-
 2 files changed, 91 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 5d5108a2b1..e7ddab0d1f 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -52,6 +52,21 @@ (define-module (gnu packages chez)
             chez-machine->threaded
             unpack-nanopass+stex))
 
+;; Commentary:
+;;
+;; The bootstrapping paths for Chez Scheme and Racket are closely
+;; entwined. Racket CS (the default Racket implementation) is based on (a fork
+;; of) Chez Scheme. Racket's variant of Chez Scheme shares sources for
+;; nanopass and stex with upstream Chez Scheme.
+;;
+;; Racket's variant of Chez Scheme can be bootstrapped by an older Racket
+;; implementation, Racket BC, which can be bootstrapped from C. Porting that
+;; code to work with upstream Chez Scheme (or finding an old version that
+;; does) is our best hope for some day bootstrapping upstream Chez Scheme from
+;; source.
+;;
+;; Code:
+
 (define (chez-machine->nonthreaded machine)
   "Given a string MACHINE naming a Chez Scheme machine type, returns a string
 naming the nonthreaded machine type for the same architecture and OS as
@@ -327,6 +342,78 @@ (define* (stex-make #:optional (suffix ""))
 and 32-bit PowerPC architectures.")
     (license asl2.0)))
 
+(define-public chez-scheme-for-racket
+  (package
+    (inherit chez-scheme)
+    (name "chez-scheme-for-racket")
+    (version "9.5.7.3")
+    ;; The version should match `(scheme-fork-version-number)`.
+    ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
+    ;; It will always be different than the upstream version!
+    ;; When updating, remember to also update %racket-version in racket.scm.
+    (source #f) ; avoid problematic cycle with racket.scm
+    (inputs
+     (modify-inputs (package-inputs chez-scheme)
+       (delete "libx11" "util-linux:lib")))
+    (native-inputs
+     (modify-inputs (package-native-inputs chez-scheme)
+       (replace "chez-scheme-bootstrap-bootfiles"
+         chez-scheme-for-racket-bootstrap-bootfiles)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments chez-scheme)
+       ((#:configure-flags cfg-flags #~'())
+        #~(cons "--disable-x11" #$cfg-flags))
+       ((#:phases those-phases #~%standard-phases)
+        #~(let* ((those-phases #$those-phases)
+                 (unpack (assoc-ref those-phases 'unpack)))
+            (modify-phases those-phases
+              (replace 'unpack
+                (lambda args
+                  (unpack #:source #$(or (package-source this-package)
+                                         (package-source racket-vm-bc)))))
+              (add-after 'unpack 'chdir
+                (lambda args
+                  (chdir "racket/src/ChezScheme"))))))))
+    (supported-systems (filter nix-system->chez-machine
+                               %supported-systems))
+    (home-page "https://github.com/racket/ChezScheme")
+    ;; ^ This is downstream of https://github.com/racket/racket,
+    ;; but it's designed to be a friendly landing place for people
+    ;; who want a ChezScheme-shaped repositroy.
+    (synopsis "Variant of Chez Scheme extended for Racket")
+    (description "This variant of Chez Scheme is extended to support the
+implementation of Racket.  It may be useful on platforms that are not yet
+supported by upstream Chez Scheme.
+
+Main additions to Chez Scheme in the Racket variant:
+@itemize @bullet
+@item
+AArch64 support
+@item
+Portable bytes (@code{pb}) support, which is mainly useful for bootstrapping
+a build on any supported platform
+@item
+Unboxed floating-point arithmetic and flvectors
+@item
+Type reconstruction during optimization (especially for safe code)
+@item
+Continuation attachments
+@item
+Parallel garbage collection, in-place garbage collection for old-generation
+objects (instead of always copying), and reachability-based memory
+accounting
+@item
+Ordered finalization, immobile (but collectable) objects, weak/ephemeron
+generic hash tables, and reference bytevectors
+@item
+Faster multiplication and division for large exact numbers
+@end itemize")
+    (license asl2.0)))
+
+;;
+;; Bootfiles:
+;;
+
 (define-public chez-scheme-bootstrap-bootfiles
   (package
     (inherit chez-scheme)
@@ -368,11 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
   (package
     (inherit chez-scheme-bootstrap-bootfiles)
     (name "chez-scheme-for-racket-bootstrap-bootfiles")
-    (version "9.5.7.3")
-    ;; The version should match `(scheme-fork-version-number)`.
-    ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
-    ;; It will always be different than the upstream version!
-    ;; When updating, remember to also update %racket-version in racket.scm.
+    (version (package-version chez-scheme-for-racket))
     (source #f) ; avoid problematic cycle with racket.scm
     (native-inputs (list chez-nanopass-bootstrap racket-vm-bc))
     ;; TODO: cross compilation
@@ -398,8 +481,8 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
                   (invoke (search-input-file (or native-inputs inputs)
                                              "/opt/racket-vm/bin/racket")
                           "rktboot/main.rkt"))))))))
-    (supported-systems (filter nix-system->chez-machine
-                               %supported-systems))
+    (supported-systems
+     (package-supported-systems chez-scheme-for-racket))
     (home-page "https://github.com/racket/ChezScheme")
     ;; ^ This is downstream of https://github.com/racket/racket,
     ;; but it's designed to be a friendly landing place for people
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index c96bebe325..98dab6f743 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -195,8 +195,7 @@ (define* (racket-vm-for-system #:optional
       racket-vm-cs
       racket-vm-bc))
 
-(define %racket-version "8.4")
-;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles!
+(define %racket-version "8.4") ; Remember to update chez-scheme-for-racket!
 (define %racket-commit
   (string-append "v" %racket-version))
 (define %racket-origin
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:34 2022
Received: from localhost ([127.0.0.1]:56609 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9TC-0004LD-5Y
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:34 -0500
Received: from mail-qk1-f171.google.com ([209.85.222.171]:43677)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Sl-0004IG-K4
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:08 -0500
Received: by mail-qk1-f171.google.com with SMTP id z66so7796457qke.10
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:39:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=fj1dWJncDJUK1qH5QCJQCmUNDvNHURG6D3Wt3WwOE4k=;
 b=HJfG07H2LXaShfBmfe9QZ8B3b/555PGBGUujIr6cUxH0JPq0m8uwNrV3QPBhvw5RBN
 JkzjkOSV8lzUlOQkTrmnKAQtqwofxztk9Y3afBOgjPuGdhELtSTRr13OYF56Ot8xNday
 1BBuH5NSmT7j+HE2wSWfvW/Q2Qt+Nm1pLGyRR+04hCq6vBzy1zWQSWUiE1ypf7RMvqjY
 DXeoLu6AGwzACh1C8rQzAfZQGzbjEWBBwuHOrtMP+hmKl+8/OQYfbia6qyoHad5px/qg
 lWSDWIL4pc1DSAqsTfguWIWv3/u0VNO0/pNg4uXfL3ph/qSUi+vrwMisveVGILWseseL
 /DxQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=fj1dWJncDJUK1qH5QCJQCmUNDvNHURG6D3Wt3WwOE4k=;
 b=mw9I2g+TeskQN5peXagDk/pc/x2NuwDZF0fDkA4VrXWNrhYMdQpnYAMpel0PfthGW7
 x7V0/Jgdjzv5sBrzYBoWfm6/Lwbcfcx5INCms0suYJ1++u5fHTezs/0LR3QN7Dd+WiDN
 mJepJzK+pUvfKIGDyMUB8Hzjgwpehny4znsdH+pQ6a4crMZhdl455+K6JsCBQRvlu4E9
 lWDDrVZNSR70gcS0AsVVaZZYtDn3tGzap0HJwbIlJG1gWnBaq+FpRN23jxOXQ++otPVH
 8LeXhIL/ZNEhBHEcbCZVEeGl6iJAMMvPXUeIUbpZfE6C4ObrrcIgpCmn2zVCbZQMzD4W
 3s3w==
X-Gm-Message-State: AOAM532OFqx3nbe2V6OSoNiL3IiJH+z+pOpkjtIJBirR9idHcn6Y9Vth
 NqKZuA0p9s3+CXhHRW1OQYL5GSSFfeNpXJVUzhg=
X-Google-Smtp-Source: ABdhPJxqw5GSjxiNC4xjE+NYk0ehDUVaF9tJvDnRezevVvrp5lrIqWl6ar1FfBa5Wpbyg4aENl1emA==
X-Received: by 2002:ae9:e8cc:0:b0:506:c9aa:cd9f with SMTP id
 a195-20020ae9e8cc000000b00506c9aacd9fmr8234757qkg.395.1645929542098; 
 Sat, 26 Feb 2022 18:39:02 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 w13-20020a05622a190d00b002dd2600afc2sm4453384qtc.62.2022.02.26.18.39.01
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:39:01 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 24/24] gnu: racket-vm-cs: Build with "--enable-scheme".
Date: Sat, 26 Feb 2022 21:34:50 -0500
Message-Id: <20220227023450.1877215-25-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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'. <#:configu [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.171 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.171 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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'. <#:configu [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.171 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.171 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (racket-vm-cs)[native-inputs]: Remove
'chez-scheme-for-racket-bootstrap-bootfiles'. Add
'chez-scheme-for-racket'.
[arguments]<#:phases>: Delete 'unpack-bootfiles'.
<#:configure-flags>: Add "--enable-scheme".
---
 gnu/packages/racket.scm | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 98dab6f743..952bec6aa9 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -399,7 +399,7 @@ (define-public racket-vm-cs
     (native-inputs
      (modify-inputs (package-native-inputs racket-vm-cgc)
        (delete "libtool")
-       (prepend chez-scheme-for-racket-bootstrap-bootfiles
+       (prepend chez-scheme-for-racket
                 chez-nanopass-bootstrap
                 racket-vm-bc)))
     (arguments
@@ -409,18 +409,15 @@ (define-public racket-vm-cs
             (add-after 'unpack 'unpack-nanopass+stex
               (lambda args
                 (with-directory-excursion "racket/src/ChezScheme"
-                  #$unpack-nanopass+stex)))
-            (add-after 'unpack-nanopass+stex 'unpack-bootfiles
-              (lambda* (#:key native-inputs inputs #:allow-other-keys)
-                (with-directory-excursion "racket/src/ChezScheme"
-                  (copy-recursively
-                   (search-input-directory (or native-inputs inputs)
-                                           "lib/chez-scheme-bootfiles")
-                   "boot"))))))
+                  #$unpack-nanopass+stex)))))
        ((#:configure-flags _ '())
         #~(cons* "--enable-csonly"
                  "--enable-libz"
                  "--enable-lz4"
+                 (string-append "--enable-scheme="
+                                #$(this-package-native-input
+                                   "chez-scheme-for-racket")
+                                "/bin/scheme")
                  #$(racket-vm-common-configure-flags)))))
     (synopsis "Racket CS implementation")
     (description "The Racket CS implementation, which uses ``Chez Scheme'' as
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:04 2022
Received: from localhost ([127.0.0.1]:56594 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Sh-0004IZ-HI
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:04 -0500
Received: from mail-qv1-f53.google.com ([209.85.219.53]:35402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SY-0004HR-Ht
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:54 -0500
Received: by mail-qv1-f53.google.com with SMTP id 8so9858562qvf.2
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=;
 b=X3nR0Il9hgVL89qU3kmZ+JCchhV/8qYIj3/onBdwYoZS8cuuWr2rO10yPbnQcV2Gbk
 JD/zH6TcEKAZGctjilEo8JqdJMq4vJ19Bzw36zm+b5XSWE5/ADpXLx2bcA3Kc2rkB8iW
 QfjSKHidLrOB5uoyIMt7dKOcLv+Ns89DEvvh6rWxANtho5v1LGBj2RHxIUwetDqg2a8N
 zyjiRegll0kcpKh+O7QOcg4Mf5QiY9GpqRjSpMmExarmSdopor02h/ymRUWaytEdzmVR
 Ss1McolHGmXCHN8EHufhnJGai+2z8wfgdjf/ZNVE3DYtyurRWb1Kudtv7eOgRhw8XqJ0
 U+Dw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=rAwszW55AeDy3TSpuVQTOuAPtbNMETW3iT05z+FwR7k=;
 b=MoAA7caRuCTwv/P4AzraiMskpKmPYAGeOX8H5/4SVOy8GmpzJfKPV9JhYGtImDC8G+
 4GMTGvFwVLsBjLcSWO3pa0an7OLsgfeFBV73wMnUIjN+rp4EAWqhu7g2LudvEF1P2WC2
 ul5CLDUXCADdc6nvq/mA4GKKC6NB0i7EXhMeN3LlJK0iOU1irUhnQhmvL37KenbS+Tko
 xt8s2adXEnO0as8e7xZO/snQ0CLpNNNT6392tqSu5FCiGD1jrxnqR+4pRi9s9WfX+zTs
 t3AEu0Sa1TAKmm+sJ8mdWmf0RrUamiBDmlJvWuzQ7E8XJbT0m00kZ53pOl8kcU91DdXb
 kgkw==
X-Gm-Message-State: AOAM530Q7PHoVecbIKXhBNupO8ht0QNUtEOsUjM+v697tvHHyPuwAlsQ
 mvTgHE9Ss8wmOYiGn9QXLvDugUQ5X8nkK5j5Tng=
X-Google-Smtp-Source: ABdhPJzNmIxH+b7hSe6881XsxFpgjkmfXh0/TE8PTocB58E/vbcMVSft41QMaIOnnMNmIniVdQ9xLQ==
X-Received: by 2002:a05:6214:1548:b0:432:a21a:2759 with SMTP id
 t8-20020a056214154800b00432a21a2759mr9524413qvw.88.1645929529090; 
 Sat, 26 Feb 2022 18:38:49 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 p12-20020a05622a048c00b002de8f67b60dsm4482354qtx.58.2022.02.26.18.38.48
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:48 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 21/24] gnu: chez-mit: Support chez-scheme-for-racket.
Date: Sat, 26 Feb 2022 21:34:47 -0500
Message-Id: <20220227023450.1877215-22-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: Racket's variant of Chez Scheme defines
 'string->uninterned-symbol', 
 which conflicts with the definition from '(chez mit)'. See discussion at
 <https://github.com/racket/racket/issues/4151>. * gnu/packages/chez.scm
 (chez-mit)[origin]<snippet>:
 Add workaround for chez-scheme-for-racket. --- gnu/packages/chez.scm | 24
 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.53 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.53 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Racket's variant of Chez Scheme defines 'string->uninterned-symbol',
    which conflicts with the definition from '(chez mit)'. See discussion at
   <https://github.com/racket/racket/issues/4151>. * gnu/packages/chez.scm (chez-mit)[origin]<snippet>:
    Add workaround for chez-scheme-for-racket. --- gnu/packages/chez.scm | 24
    +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.53 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.53 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Racket's variant of Chez Scheme defines 'string->uninterned-symbol',
which conflicts with the definition from '(chez mit)'. See discussion at
<https://github.com/racket/racket/issues/4151>.

* gnu/packages/chez.scm (chez-mit)[origin]<snippet>: 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:03 2022
Received: from localhost ([127.0.0.1]:56590 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Sg-0004IJ-Nt
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:03 -0500
Received: from mail-qv1-f48.google.com ([209.85.219.48]:43935)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SU-0004HF-3w
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:50 -0500
Received: by mail-qv1-f48.google.com with SMTP id c14so4983571qvk.10
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=;
 b=IvyWGC3/WAamEPbYFZAPqXe3iN8twafURrbbabbFe3RoPHkbMaEvQUpR+maPNsESCL
 UvUXKl4HPYG4yn3dSMrawFRgml/9ofTlAkuQW6TQ3y7kf95x6H3pz8mpl0CSKPeuz2as
 /+QkhxjTL5fIRWGM9j5b/peA2f7DyUFVnvXqvdr70qV6S29e+kLRU+mZym0as/su/ObT
 Zm8aMKKm8KJZlVcmdxCJ5Pix0RRwoUY3yNfpCBtKLhmhFOdRgOkFzNH5Bzy6vHJ8Rdlp
 H3s34iVJKgfUp1dhNxDE/SDOjpgKxgRR5EaWPD3U0twy5YmZ0jbghtX9W8DRlfYjoGzs
 aGCg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=cGi1cMspcQpp49NFenSBqvw+gLuS2M0D9p9ZQpdHAlY=;
 b=MMsweiI4LbZ+qmvp5+moSJ2aDkjDn2RF1U9i7vEqZVyGOX6Y/Q1FTfo0IM1GrPueUK
 SqR0nprZuw+Bo0FI64/Zik+PXf04F71veamdnplMp3X5F1kSM4Ke4EQ/i738z4vo4F+I
 UHCbA/0S1xcYWx13im/1TNM9xfTnO0PekARzosMC5pFQEHEIjOffjrOw3qmpCVSm2k6G
 mlMvbHg4PA0Esy1cGmNqjX4HDAcnEiDSENlz5ugWd4PhT/LizUh+Gs5ZAcbdlcQ2PQnx
 lokdiaFeBfOYYi2tpByNQ5G2h4y3ehyX01xrTkLJIQtlBNCPmOt+4AXJwPCea0j/irMx
 eipQ==
X-Gm-Message-State: AOAM53110i/+nYnYeGQgXsdmvHJfu4rBFOsyMzXH/wJ7rZeujJeqIBpG
 +2la1WFBJaivqmzPsAQWCDOxJODGxkB3uMrRaq0=
X-Google-Smtp-Source: ABdhPJw0nSr/iO642IP31ic3vIRLqIGe+JyPVh4FTtK/c3yb9++5htnvfTjBvXjADYdLOZN5NT5gcA==
X-Received: by 2002:a05:6214:21ee:b0:433:baf:21a3 with SMTP id
 p14-20020a05621421ee00b004330baf21a3mr342992qvj.4.1645929524535; 
 Sat, 26 Feb 2022 18:38:44 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 f19-20020a379c13000000b006490363756fsm3269672qke.21.2022.02.26.18.38.43
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:44 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 20/24] gnu: chez-scheme: Explicitly package bootstrap
 bootfiles.
Date: Sat, 26 Feb 2022 21:34:46 -0500
Message-Id: <20220227023450.1877215-21-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 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 bo [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.48 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.48 listed in list.dnswl.org]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  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 bo [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.48 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.48 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

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:
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:02 2022
Received: from localhost ([127.0.0.1]:56588 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Sf-0004I3-M1
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:02 -0500
Received: from mail-qv1-f47.google.com ([209.85.219.47]:39638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SP-0004H4-M4
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:46 -0500
Received: by mail-qv1-f47.google.com with SMTP id a1so9819837qvl.6
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=37H5h/fHk3NNbAT7Uc9bISFfMqOBQXf0BvVKkBIp2Fs=;
 b=PTHC7osGRGdFdvGB5rkcNarMJgqhYrCuRB+9Qmnms2a8HOKtdFT3FOUVjlSLv/6981
 GvkFFJ0xqsLFqH5bUP+epou5Y9L+SKRyVk4FZFx8f4KI47o15cQbWC2kevGmpWbKs4Lj
 EWZ0SNx3eryCvc2EjB8uQV2IEF4dDUgGo4pKL5RNEsnvNCAb9k2ZeZWntpKjMAB0uXQC
 c+Io/Hc9l0nFcIxET5lYLWzaqsW3RhbUzLnpfVrC8+C8MJdJZahjx87KD/rIl3+0Zron
 yQ/n/mMorTw+0M04033Pgd1PR237BNnw+z+MrNXIq2HXbXJEM3ByuKzwzWikB3H4lCJA
 cCaw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=37H5h/fHk3NNbAT7Uc9bISFfMqOBQXf0BvVKkBIp2Fs=;
 b=NgghkjDJT3mgriSW+ly1UtEnQ7C1+WYgZDJiaFaujB+QjPHwj9kdxEOvf6eCoD/1Gy
 G33qGMHqVwkMdkJ9eAMSsAIYNUNrzH69Ll+B6/UqulDncD659vmMA/w/Fwhtn687nN2l
 Ybld/J6sWJTqH3wqJLfWea8yXuTogG0wk0jMfXPPTMbrmEm0VvhmwKI/rwFQ8PwjxQzk
 2gHRrku1pQnb6lTyPhK888TwZtxzUUOeYTkUS3tqIebpIwUBsXJJU3s0PHLAbNtRbocL
 jUS0CieLYdQ7PabGiKccfEqt11woChuEqy5IR5fm1uSzH1EZgyw/ZLfn98xcGtF8PrLV
 f0Rg==
X-Gm-Message-State: AOAM530lMgkJ2os2ZTi6xaF+sfvAaLb/98+JR7F1269Q7AtP3+l3iFEu
 zY0W4YcXpdw292oGbFO7Pvcpi+2CX/KFFWMc3po=
X-Google-Smtp-Source: ABdhPJyk91sfi2fm5bHg8zQuR6RxVpQDGRGm8IJbESVsKhWDWMTYBZpmTa+fzbfENxWN72yRskdsCw==
X-Received: by 2002:a05:6214:2482:b0:432:4bf6:47b7 with SMTP id
 gi2-20020a056214248200b004324bf647b7mr10640590qvb.38.1645929520031; 
 Sat, 26 Feb 2022 18:38:40 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 n8-20020a05620a222800b004e0e071f382sm3161150qkh.125.2022.02.26.18.38.39
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:39 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 19/24] gnu: Add chez-nanopass.
Date: Sat, 26 Feb 2022 21:34:45 -0500
Message-Id: <20220227023450.1877215-20-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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): N [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.47 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.47 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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): N [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.47 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.47 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/chez.scm (nanopass): Rename to ...
(chez-nanopass-bootstrap): ... this new variable, and promote it from an
origin to a package.
(chez-nanopass): New variable.
(unpack-nanopass+stex): New variable using 'chez-nanopass-bootstrap'.
(chez-scheme-for-racket-bootstrap-bootfiles,
chez-scheme)[native-inputs]: Add 'chez-nanopass-bootstrap'.
[arguments]<#:phases>: Adapt 'unpack-nanopass+stex' phase
to use the eponymous new variable.
* gnu/packages/racket.scm (racket-vm-cs): Likewise.
(make-unpack-nanopass+stex): Remove it.
---
 gnu/packages/chez.scm   | 122 +++++++++++++++++++++++++++++++---------
 gnu/packages/racket.scm |  19 +------
 2 files changed, 98 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 6855195cfe..43d2c764f3 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -48,7 +48,8 @@ (define-module (gnu packages chez)
   #:use-module (srfi srfi-1)
   #:export (nix-system->chez-machine
             chez-machine->nonthreaded
-            chez-machine->threaded))
+            chez-machine->threaded
+            unpack-nanopass+stex))
 
 (define (chez-machine->nonthreaded machine)
   "Given a string MACHINE naming a Chez Scheme machine type, returns a string
@@ -159,6 +160,20 @@ (define* (chez-upstream-features-for-system #:optional
 ;; Chez Scheme:
 ;;
 
+
+(define unpack-nanopass+stex
+  #~(begin
+      (copy-recursively
+       (dirname (search-input-file %build-inputs
+                                   "lib/chez-scheme/nanopass.ss"))
+       "nanopass"
+       #:keep-mtime? #t)
+      (mkdir-p "stex")
+      (with-output-to-file "stex/Mf-stex"
+        (lambda ()
+          ;; otherwise, it will try to download submodules
+          (display "# to placate ../configure")))))
+
 (define-public chez-scheme
   (package
     (name "chez-scheme")
@@ -176,6 +191,9 @@ (define-public chez-scheme
               (file-name (git-file-name name version))
               (snippet #~(begin
                            (use-modules (guix build utils))
+                           ;; TODO: consider putting this in a (guix ...) or
+                           ;; (guix build ...)  module so it can be shared
+                           ;; with the Racket origin without cyclic issues.
                            (for-each (lambda (dir)
                                        (when (directory-exists? dir)
                                          (delete-file-recursively dir)))
@@ -193,9 +211,7 @@ (define-public chez-scheme
       ;; for X11 clipboard support in expeditor:
       ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232
       libx11))
-    (native-inputs
-     (list nanopass ; source only
-           stex-bootstrap))
+    (native-inputs (list chez-nanopass-bootstrap stex-bootstrap))
     (native-search-paths
      (list (search-path-specification
             (variable "CHEZSCHEMELIBDIRS")
@@ -215,14 +231,7 @@ (define-public chez-scheme
       #~(modify-phases %standard-phases
           (add-after 'unpack 'unpack-nanopass+stex
             (lambda args
-              (copy-recursively #$nanopass
-                                "nanopass"
-                                #:keep-mtime? #t)
-              (mkdir-p "stex")
-              (with-output-to-file "stex/Mf-stex"
-                (lambda ()
-                  ;; otherwise, it will try to download submodules
-                  (display "# to placate ../configure")))))
+              #$unpack-nanopass+stex))
           ;; NOTE: the custom Chez 'configure' script doesn't allow
           ;; unrecognized flags, such as those automatically added
           ;; by `gnu-build-system`.
@@ -317,7 +326,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
     ;; When updating, remember to also update %racket-version in racket.scm.
     (source #f) ; avoid problematic cycle with racket.scm
     (inputs `())
-    (native-inputs (list racket-vm-bc))
+    (native-inputs (list chez-nanopass-bootstrap racket-vm-bc))
     (build-system copy-build-system)
     ;; TODO: cross compilation
     (arguments
@@ -336,10 +345,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
                 (chdir "racket/src/ChezScheme")))
             (add-after 'chdir 'unpack-nanopass+stex
               (lambda args
-                (copy-recursively
-                 #$nanopass
-                 "nanopass"
-                 #:keep-mtime? #t)))
+                #$unpack-nanopass+stex))
             (add-before 'install 'build
               (lambda* (#:key native-inputs inputs #:allow-other-keys)
                 (invoke (search-input-file (or native-inputs inputs)
@@ -502,15 +508,79 @@ (define-public stex
     (outputs '("out" "doc"))
     (properties '())))
 
-(define-public nanopass
-  (let ((version "1.9.2"))
-    (origin
-      (method git-fetch)
-      (uri (git-reference
-            (url "https://github.com/nanopass/nanopass-framework-scheme")
-            (commit (string-append "v" version))))
-      (sha256 (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i"))
-      (file-name (git-file-name "nanopass" version)))))
+(define-public chez-nanopass-bootstrap
+  (hidden-package
+   (package
+     (name "chez-nanopass")
+     (version "1.9.2")
+     (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/nanopass/nanopass-framework-scheme")
+              (commit (string-append "v" version))))
+        (sha256
+         (base32 "16vjsik9rrzbabbhbxbaha51ppi3f9n8rk59pc6zdyffs0vziy4i"))
+        (file-name (git-file-name "nanopass-framework-scheme" version))
+        (snippet
+         #~(begin
+             (use-modules (guix build utils))
+             (when (file-exists? "doc/user-guide.pdf")
+               (delete-file "doc/user-guide.pdf"))
+             (substitute* "doc/Makefile"
+               (("include ~/stex/Mf-stex")
+                "include $(STEXLIB)/Mf-stex"))))))
+     (build-system copy-build-system)
+     (arguments
+      (list #:install-plan
+            #~`(("nanopass.ss" "lib/chez-scheme/")
+                ("nanopass" "lib/chez-scheme/"))))
+     (home-page "https://nanopass.org")
+     (synopsis "DSL for compiler development")
+     (description "The Nanopass framework is an embedded domain-specific
+language for writing compilers composed of several simple passes that
+operate over well-defined intermediate languages.  The goal of this
+organization is both to simplify the understanding of each pass, because it
+is responsible for a single task, and to simplify the addition of new passes
+anywhere in the compiler.  Nanopass reduces the boilerplate required to
+create compilers, making them easier to understand and maintain.")
+     (license expat))))
+
+(define-public chez-nanopass
+  (package/inherit chez-nanopass-bootstrap
+    (properties '())
+    ;; TODO: cross-compilation
+    (native-inputs (list chez-scheme stex))
+    (arguments
+     (substitute-keyword-arguments (package-arguments chez-nanopass-bootstrap)
+       ((#:install-plan base-plan)
+        #~`(("nanopass.so" "lib/chez-scheme/")
+            ("doc/user-guide.pdf" #$(string-append
+                                     "share/doc/"
+                                     (package-name this-package)
+                                     "-"
+                                     (package-version this-package)
+                                     "/"))
+            ,@#$base-plan))
+       ((#:phases base-phases #~%standard-phases)
+        #~(modify-phases #$base-phases
+            (add-before 'install 'compile-and-test
+              (lambda args
+                (invoke "scheme"
+                        "--compile-imported-libraries"
+                        "--program" "test-all.ss")))
+            (add-after 'compile-and-test 'build-doc
+              (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                (with-directory-excursion "doc"
+                  (invoke "make"
+                          (string-append "Scheme="
+                                         (search-input-file
+                                          (or native-inputs inputs)
+                                          "/bin/scheme"))
+                          (string-append "STEXLIB="
+                                         (search-input-directory
+                                          (or native-inputs inputs)
+                                          "/lib/stex"))))))))))))
 
 ;;
 ;; Other Chez packages:
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 73de273c64..c96bebe325 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -251,22 +251,6 @@ (define (racket-vm-common-configure-flags)
       "--disable-strip"
       "--enable-origtree"))
 
-(define (make-unpack-nanopass+stex)
-  ;; Adapted from chez-scheme.
-  ;; Thunked to avoid evaluating 'chez-scheme' too early.
-  ;; TODO: Refactor enough to share this directly.
-  #~(begin
-      (copy-recursively
-       #$nanopass
-       "nanopass"
-       #:keep-mtime? #t)
-      (mkdir-p "stex")
-      (with-output-to-file "stex/Mf-stex"
-        (lambda ()
-          ;; otherwise, it will try to download submodules
-          (display "# to placate ../configure")))))
-
-
 (define-public racket-vm-cgc
   ;; Eventually, it may make sense for some vm packages to not be hidden,
   ;; but this one is especially likely to remain hidden.
@@ -417,6 +401,7 @@ (define-public racket-vm-cs
      (modify-inputs (package-native-inputs racket-vm-cgc)
        (delete "libtool")
        (prepend chez-scheme-for-racket-bootstrap-bootfiles
+                chez-nanopass-bootstrap
                 racket-vm-bc)))
     (arguments
      (substitute-keyword-arguments (package-arguments racket-vm-cgc)
@@ -425,7 +410,7 @@ (define-public racket-vm-cs
             (add-after 'unpack 'unpack-nanopass+stex
               (lambda args
                 (with-directory-excursion "racket/src/ChezScheme"
-                  #$(make-unpack-nanopass+stex))))
+                  #$unpack-nanopass+stex)))
             (add-after 'unpack-nanopass+stex 'unpack-bootfiles
               (lambda* (#:key native-inputs inputs #:allow-other-keys)
                 (with-directory-excursion "racket/src/ChezScheme"
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:01 2022
Received: from localhost ([127.0.0.1]:56586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Sf-0004Hv-12
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:01 -0500
Received: from mail-qk1-f175.google.com ([209.85.222.175]:38410)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SL-0004Gu-37
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:41 -0500
Received: by mail-qk1-f175.google.com with SMTP id n185so7820789qke.5
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=;
 b=VZ4BdIiC4E5Wkugz4uVj2kp6uEBsoWdjYrXhppgdvDiAiu1P+aZwr1W05QH/CJucAc
 w6PAWfLH9SRWlSfgiw2uWwBm1apIqw2cshHR9P7Ch8LKJqwbsogzdBgvS+c2CFOlUtlf
 5EWO81YXhUgN6bI1DgRnFZQuZgrV5Odpx2PDdew53WKY76ziSXfTXmbweDro5fnUp5Ac
 GPZtzFUeLIxELu1Rf0S+u7EwM2VZ7/uesMltpWitNnmWji+wNRPOtfwLH2MBdBejga4e
 BYbfl2bDRPqebRCovvduKsiFJYQrivdklsKWdTASbLQJ/XMgnI2z6U34VXswYfLsWKkM
 WrJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=Tect9L988qv0Yb/LOD+TBbvPXO8vBf/+B4PmAkEYvLU=;
 b=owiuAV7eWkWotBqRcXce1zGsYoMBrSTiSD6Hmx398IY23G8U8OiHqvvF7osN4YSj7V
 +EdeaiXpPEaJ1FchzuCp20A8nMy60uaTcp2POOn/864BSjsDm/BxOLXz1VTTvXBKvvvV
 QoYul3TIMR7wbrvcMSc+NTzF8kyD3yz6h8kO11GLTVvcbfUr8zixJAX9NwzGS92QFa3n
 tjamRWrx1HsR1Fr7IcTn8Ct4SDKjwBBQLouaybr2O5kMRsoKryvynUPNEgiuhad7sVuI
 pYZfWhsuZq5VdMQgdFf4G4BgeIfrN5DXqfJqnWz32AAWbSbiG9ZesnkXjlIg+owsMZ7g
 sYMQ==
X-Gm-Message-State: AOAM530/n2oWyvtu+omMk/x8JBrR+19w03Sltk0ArJqG0a8det31j+ZJ
 s+cwVdTNznMHbnyX139APIhhaehSCqrHyXbWEvg=
X-Google-Smtp-Source: ABdhPJy3Vn39YbWy2mBmbTjDXshRUvE8P4DYsR+kf6ILqaTCTnAeAfo7zjW5izojL+oCSI0Ei8NGaQ==
X-Received: by 2002:a05:620a:48d:b0:5f1:872f:1fdb with SMTP id
 13-20020a05620a048d00b005f1872f1fdbmr8266368qkr.675.1645929515338; 
 Sat, 26 Feb 2022 18:38:35 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 a17-20020a05622a02d100b002dd2cab0326sm4371437qtx.23.2022.02.26.18.38.34
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:35 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 18/24] gnu: Add stex.
Date: Sat, 26 Feb 2022 21:34:44 -0500
Message-Id: <20220227023450.1877215-19-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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 dependen [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.175 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.175 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 dependen [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.175 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.175 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:39:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:39:01 2022
Received: from localhost ([127.0.0.1]:56584 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Se-0004Hs-BS
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:39:00 -0500
Received: from mail-qv1-f52.google.com ([209.85.219.52]:34761)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SG-0004GF-NQ
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:37 -0500
Received: by mail-qv1-f52.google.com with SMTP id ba20so9874236qvb.1
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=DEN9JBWT7L5sZ2kWUaZi57vTZgqR1gZML2Ph6nBGkDU=;
 b=cZEAuvPySeFF5nPinVOcAnBFHhnTvqiw1rkcl3BpeZ2PdsQ8qOCgVwCZAbiNbmw3Nv
 +mt1GVCRpFqa7E4nHFfu+882uNl7oIddwVnECrdIBzAeE3AE400NoCra7iVcq88VXzDC
 kRbBLnboqlJmh1HypS1WI5thlaZVS6YaDE/Jqh1GcodB9gxOeW1uxqM/BqgYTjIBD9zC
 n7sMB1MoIv3U5tpHHIwC7qQoQobPtjJAPMNFjlNWS6taa5lGImt69vDYrjKuIsJQSl2F
 YuRxlqIETX+bHsQfl3MWvK57yhpihMHzdWWZq6yH2erYrxdoGRrkHe9cEczRoQNOtCuL
 9aDg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=DEN9JBWT7L5sZ2kWUaZi57vTZgqR1gZML2Ph6nBGkDU=;
 b=EPqJ455kugvJXUHY/SWJkYfQbvZUh908fnL7KrHRlkhk5eq7TnBiMgHK0ay00WJtQg
 eRMrve/ZOw2x2vvDfeUv10qITlHC8NMdLrgnxhY1XjwQD4mt07RvXw3vhqVle/NdbmUJ
 P0fQOIq+xQcpZ7EJt0LlZ/gkCvJxpi8UUKJGaOKA8v1FJv1TG5s6393iNxyHZgKFEFEf
 DnlRblMo98gh3mI7k44MI+zdWmgLnyr+jGOVftXrdP39sQgx3GitCO8W1U9dtx9v7Z+U
 iAlyfvt1eiOXk1tSsDq1dXmUqhy3ieJIU6O5OIhhJUPyC3ZJSbFAdojfl9WORuWkt1pJ
 9B5g==
X-Gm-Message-State: AOAM530RT9K/LSBDTswipJGRzqBdujhTn5mW3ZCwhDo2o/ewtBh5ZdVm
 de+3aY2GICNnQYrNb5DsaLeayGBtleLUwbxF2vk=
X-Google-Smtp-Source: ABdhPJzbdNadi3uFKYoxoThvpAGPjk8TUZLXNKjQ1cHOuxIcdI2VYJ8Rsp5D1SOWhJ8+WsmMV22jgg==
X-Received: by 2002:a0c:eb81:0:b0:42d:a99:b08c with SMTP id
 x1-20020a0ceb81000000b0042d0a99b08cmr10677116qvo.52.1645929510938; 
 Sat, 26 Feb 2022 18:38:30 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 h11-20020a05620a21cb00b005089fdd033bsm3195292qka.39.2022.02.26.18.38.30
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:30 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 17/24] gnu: chez-scheme: Use new package style.
Date: Sat, 26 Feb 2022 21:34:43 -0500
Message-Id: <20220227023450.1877215-18-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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 pu [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.52 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.52 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 pu [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.52 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.52 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/chez.scm (chez-scheme)[inputs]: Remove labels.
[native-inputs]: Likewise.
[arguments]: Use G-expressions.
<#:phases>: Use 'search-input-file' instead of 'assoc-ref'.
(nanopass): Make public as a temporary workaround for Racket.
* gnu/packages/racket.scm (make-unpack-nanopass+stex): Update
accordingly.
---
 gnu/packages/chez.scm   | 286 +++++++++++++++++++---------------------
 gnu/packages/racket.scm |   5 +-
 2 files changed, 135 insertions(+), 156 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index dd40baa719..ad263a8fe3 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -158,7 +158,7 @@ (define* (chez-upstream-features-for-system #:optional
 ;; Chez Scheme:
 ;;
 
-(define nanopass
+(define-public nanopass
   (let ((version "1.9.2"))
     (origin
       (method git-fetch)
@@ -185,86 +185,80 @@ (define stex
 (define-public chez-scheme
   (package
     (name "chez-scheme")
+    ;; The version should match `(scheme-version-number)`.
+    ;; See s/cmacros.ss c. line 360.
     (version "9.5.6")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/cisco/ChezScheme")
-             (commit (string-append "v" version))))
-       (sha256
-        (base32 "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky"))
-       (file-name (git-file-name name version))
-       (snippet
-        ;; Remove bundled libraries.
-        (with-imported-modules '((guix build utils))
-          #~(begin
-              (use-modules (guix build utils))
-              (for-each (lambda (dir)
-                          (when (directory-exists? dir)
-                            (delete-file-recursively dir)))
-                        '("stex"
-                          "nanopass"
-                          "lz4"
-                          "zlib")))))))
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/cisco/ChezScheme")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "07s433hn1z2slfc026sidrpzxv3a8narcd40qqr1xrpb9012xdky"))
+              (file-name (git-file-name name version))
+              (snippet #~(begin
+                           (use-modules (guix build utils))
+                           (for-each (lambda (dir)
+                                       (when (directory-exists? dir)
+                                         (delete-file-recursively dir)))
+                                     '("stex"
+                                       "nanopass"
+                                       "lz4"
+                                       "zlib"))))))
     (build-system gnu-build-system)
     (inputs
-     `(("libuuid" ,util-linux "lib")
-       ("zlib" ,zlib)
-       ("lz4" ,lz4)
-       ;; for expeditor:
-       ("ncurses" ,ncurses)
-       ;; for X11 clipboard support in expeditor:
-       ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232
-       ("libx11" ,libx11)))
+     (list
+      `(,util-linux "lib") ;<-- libuuid
+      zlib
+      lz4
+      ncurses ;<-- for expeditor
+      ;; for X11 clipboard support in expeditor:
+      ;; https://github.com/cisco/ChezScheme/issues/9#issuecomment-222057232
+      libx11))
     (native-inputs
-     `(("nanopass" ,nanopass) ; source only
-       ;; for docs
-       ("stex" ,stex)
-       ("xorg-rgb" ,xorg-rgb)
-       ("texlive" ,(texlive-updmap.cfg (list texlive-dvips-l3backend
-                                             texlive-epsf
-                                             texlive-fonts-ec
-                                             texlive-oberdiek)))
-       ("ghostscript" ,ghostscript)
-       ("netpbm" ,netpbm)))
+     (list nanopass ; source only
+           ;; for docs
+           stex
+           xorg-rgb
+           (texlive-updmap.cfg (list texlive-dvips-l3backend
+                                     texlive-epsf
+                                     texlive-fonts-ec
+                                     texlive-oberdiek))
+           ghostscript
+           netpbm))
     (native-search-paths
      (list (search-path-specification
             (variable "CHEZSCHEMELIBDIRS")
             (files '("lib/chez-scheme")))))
     (outputs '("out" "doc"))
     (arguments
-     `(#:modules
-       ((guix build gnu-build-system)
+     (list
+      #:modules
+      '((guix build gnu-build-system)
         (guix build utils)
         (ice-9 ftw)
         (ice-9 match))
-       #:test-target "test"
-       #:configure-flags
-       '("--threads") ;; TODO when we fix armhf, it doesn't support --threads
-       #:phases
-       (modify-phases %standard-phases
-         ;; put these where configure expects them to be
-         (add-after 'unpack 'unpack-nanopass+stex
-           (lambda* (#:key native-inputs inputs #:allow-other-keys)
-             (for-each (lambda (dep)
-                         (define src
-                           (assoc-ref (or native-inputs inputs) dep))
-                         (copy-recursively src dep
-                                           #:keep-mtime? #t))
-                       '("nanopass" "stex"))))
-         ;; NOTE: the custom Chez 'configure' script doesn't allow
-         ;; unrecognized flags, such as those automatically added
-         ;; by `gnu-build-system`.
-         (replace 'configure
-           (lambda* (#:key inputs outputs
-                           (configure-flags '())
-                           #:allow-other-keys)
-             (let* ((zlib-static (assoc-ref inputs "zlib:static"))
-                    (lz4-static (assoc-ref inputs "lz4:static"))
-                    (out (assoc-ref outputs "out"))
-                    ;; add flags which are always required:
-                    (flags (cons* (string-append "--installprefix=" out)
+      #:test-target "test"
+      ;; TODO when we fix armhf, it may not support --threads
+      #:configure-flags #~'("--threads")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'unpack-nanopass+stex
+            (lambda args
+              (copy-recursively #$nanopass
+                                "nanopass"
+                                #:keep-mtime? #t)
+              (copy-recursively #$stex
+                                "stex"
+                                #:keep-mtime? #t)))
+          ;; NOTE: the custom Chez 'configure' script doesn't allow
+          ;; unrecognized flags, such as those automatically added
+          ;; by `gnu-build-system`.
+          (replace 'configure
+            (lambda* (#:key inputs (configure-flags '()) #:allow-other-keys)
+              ;; add flags which are always required:
+              (let ((flags (cons* (string-append "--installprefix=" #$output)
                                   "ZLIB=-lz"
                                   "LZ4=-llz4"
                                   "--libkernel"
@@ -272,90 +266,78 @@ (define src
                                   ;; and letting Chez try causes an error
                                   "--nogzip-man-pages"
                                   configure-flags)))
-               (format #t "configure flags: ~s~%" flags)
-               ;; Some makefiles (for tests) don't seem to propagate CC
-               ;; properly, so we take it out of their hands:
-               (setenv "CC" ,(cc-for-target))
-               (setenv "HOME" "/tmp")
-               (apply invoke
-                      "./configure"
-                      flags))))
-         ;; The binary file name is called "scheme" as is the one from MIT/GNU
-         ;; Scheme.  We add a symlink to use in case both are installed.
-         (add-after 'install 'install-symlink
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (bin (string-append out "/bin"))
-                    (lib (string-append out "/lib"))
-                    (name "chez-scheme"))
-               (symlink (string-append bin "/scheme")
-                        (string-append bin "/" name))
-               (map (lambda (file)
-                      (symlink file (string-append (dirname file)
-                                                   "/" name ".boot")))
-                    (find-files lib "scheme.boot")))))
-         ;; Building explicitly lets us avoid using substitute*
-         ;; to re-write makefiles.
-         (add-after 'install-symlink 'prepare-stex
-           (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
-             (let* ((stex+version
-                     (strip-store-file-name
-                      (assoc-ref (or native-inputs inputs) "stex")))
-                    ;; Eventually we want to install stex as a real
-                    ;; package so it's reusable. For now:
-                    (stex-output "/tmp")
-                    (doc-dir (string-append stex-output
-                                            "/share/doc/"
-                                            stex+version)))
-               (with-directory-excursion "stex"
-                 (invoke "make"
-                         "install"
-                         (string-append "LIB="
-                                        stex-output
-                                        "/lib/"
-                                        stex+version)
-                         (string-append "Scheme="
-                                        (assoc-ref outputs "out")
-                                        "/bin/scheme"))
-                 (for-each (lambda (pth)
-                             (install-file pth doc-dir))
-                           '("ReadMe" ; includes the license
-                             "doc/stex.html"
-                             "doc/stex.css"
-                             "doc/stex.pdf"))))))
-         ;; Building the documentation requires stex and a running scheme.
-         ;; FIXME: this is probably wrong for cross-compilation
-         (add-after 'prepare-stex 'install-doc
-           (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
-             (let* ((chez+version (strip-store-file-name
-                                   (assoc-ref outputs "out")))
-                    (stex+version
-                     (strip-store-file-name
-                      (assoc-ref (or native-inputs inputs) "stex")))
-                    (scheme (string-append (assoc-ref outputs "out")
-                                           "/bin/scheme"))
-                    ;; see note on stex-output in phase build-stex, above:
-                    (stexlib (string-append "/tmp"
-                                            "/lib/"
-                                            stex+version))
-                    (doc-dir (string-append (assoc-ref outputs "doc")
-                                            "/share/doc/"
-                                            chez+version)))
-               (define* (stex-make #:optional (suffix ""))
-                 (invoke "make"
-                         "install"
-                         (string-append "Scheme=" scheme)
-                         (string-append "STEXLIB=" stexlib)
-                         (string-append "installdir=" doc-dir suffix)))
-               (with-directory-excursion "csug"
-                 (stex-make "/csug"))
-               (with-directory-excursion "release_notes"
-                 (stex-make "/release_notes"))
-               (with-directory-excursion doc-dir
-                 (symlink "release_notes/release_notes.pdf"
-                          "release_notes.pdf")
-                 (symlink "csug/csug9_5.pdf"
-                          "csug.pdf"))))))))
+                (format #t "configure flags: ~s~%" flags)
+                ;; Some makefiles (for tests) don't seem to propagate CC
+                ;; properly, so we take it out of their hands:
+                (setenv "CC" #$(cc-for-target))
+                (setenv "HOME" "/tmp")
+                (apply invoke "./configure" flags))))
+          ;; The binary file name is called "scheme" as is the one from
+          ;; MIT/GNU Scheme.  We add a symlink to use in case both are
+          ;; installed.
+          (add-after 'install 'install-symlink
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((scheme (search-input-file outputs "/bin/scheme"))
+                     (bin-dir (dirname scheme)))
+                (symlink scheme
+                         (string-append bin-dir "/chez-scheme"))
+                (match (find-files (string-append bin-dir "/../lib")
+                                   "scheme.boot")
+                  ((scheme.boot)
+                   (symlink scheme.boot
+                            (string-append (dirname scheme.boot)
+                                           "/chez-scheme.boot")))))))
+          ;; Building explicitly lets us avoid using substitute*
+          ;; to re-write makefiles.
+          (add-after 'install-symlink 'prepare-stex
+            (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
+              ;; Eventually we want to install stex as a real
+              ;; package so it's reusable. For now:
+              (let* ((stex-output "/tmp")
+                     (doc-dir (string-append stex-output "/share/doc/stex")))
+                (with-directory-excursion "stex"
+                  (invoke "make"
+                          "install"
+                          (string-append "LIB="
+                                         stex-output
+                                         "/lib/stex")
+                          (string-append "Scheme="
+                                         (search-input-file outputs
+                                                            "/bin/scheme")))
+                  (for-each (lambda (pth)
+                              (install-file pth doc-dir))
+                            '("ReadMe" ; includes the license
+                              "doc/stex.html"
+                              "doc/stex.css"
+                              "doc/stex.pdf"))))))
+          ;; Building the documentation requires stex and a running scheme.
+          ;; FIXME: this is probably wrong for cross-compilation
+          (add-after 'prepare-stex 'install-doc
+            (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
+              (match (assoc-ref outputs "doc")
+                (#f
+                 (format #t "not installing docs~%"))
+                (doc-prefix
+                 (let* ((chez+version (strip-store-file-name #$output))
+                        (scheme (search-input-file outputs "/bin/scheme"))
+                        (stexlib "/tmp/lib/stex")
+                        (doc-dir (string-append doc-prefix
+                                                "/share/doc/"
+                                                chez+version)))
+                   (define* (stex-make #:optional (suffix ""))
+                     (invoke "make" "install"
+                             (string-append "Scheme=" scheme)
+                             (string-append "STEXLIB=" stexlib)
+                             (string-append "installdir=" doc-dir suffix)))
+                   (with-directory-excursion "csug"
+                     (stex-make "/csug"))
+                   (with-directory-excursion "release_notes"
+                     (stex-make "/release_notes"))
+                   (with-directory-excursion doc-dir
+                     (symlink "release_notes/release_notes.pdf"
+                              "release_notes.pdf")
+                     (symlink "csug/csug9_5.pdf"
+                              "csug.pdf"))))))))))
     ;; Chez Scheme does not have a  MIPS backend.
     ;; FIXME: Debian backports patches to get armhf working.
     ;; We should too. It is the Chez machine type arm32le
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 10ec0591d9..73de273c64 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -257,10 +257,7 @@ (define (make-unpack-nanopass+stex)
   ;; TODO: Refactor enough to share this directly.
   #~(begin
       (copy-recursively
-       #$(match (assoc-ref (package-native-inputs chez-scheme)
-                           "nanopass")
-           ((src)
-            src))
+       #$nanopass
        "nanopass"
        #:keep-mtime? #t)
       (mkdir-p "stex")
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:35 2022
Received: from localhost ([127.0.0.1]:56576 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9SE-0004Gg-S8
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:35 -0500
Received: from mail-qv1-f47.google.com ([209.85.219.47]:38677)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9SC-0004Fy-8x
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:32 -0500
Received: by mail-qv1-f47.google.com with SMTP id d3so9829618qvb.5
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=;
 b=XQCjvPvirqd/oUHhiyA0IWoaCR3fk5J6N66ZziIW4Zfr+NpLVp//RO5VMoAhrOw3lR
 TRw5rb4lp1bYXcv1gOvW7CG1TX2Uu1iAIYcVCuMCCFGs7emibdUxVEfCSHdRMjR1SKZ0
 vgxmC/r/q6vvF1iPLNQ+JFMHuELc1J22nT53fsw9KAvKKNxpLSeGkJFVT3SmX5HNfaXd
 h+jkFpEJGd7w9F8ZtdmlZ51tWa4/zIPk6Hz5qyff94ICyeUQNstFjxHCKhS1gwoJ1as7
 VrWO9Y/qOe4Yt5f8ZUdpQrciYGYebVVV5XEwlEzpEq2E6F/60cxWZ23KHDzILP7vY+td
 mcHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=vYcCJ8OzcVN6l+LnkyuEvkLv2msDMJdHSBe1qqljWPg=;
 b=spXYI4D6dRpLUh1eSOk+fkioYAZ8nE9XiDfLkD2BOzPG+6xAcp5syToxnPlxw1C/lv
 p39jJNAzkzZqgBdQkdKld7EswmJgEx/NdGCQgCXjWyZeWjpm9uEDveli0aJhtakBUDBO
 0GAY4tDT8tgjgromrVveagFCYwT/ESQHS+03CrKlUrYFBxm3ywvdvizl4+Qieb10bbJc
 ta3Iu+3VVN5XLHYq5WJsMnv9m5jQrsBxfCZhgj1//gdt+Q0rrTOpHZDCyGxlrHPF3PLZ
 BAhPzMFWsd51P9kcErasqhOSoC0JAfmkVGgfHnSpgQHro5CfqeQ87r97xKkDGWJSJ1xf
 iOsw==
X-Gm-Message-State: AOAM530ovIlKLkWbSkzr1v4nDHYSiPYrCYsIz9tgCXFXTwTMZu9XxAH6
 wmOiwvEYknSftkr6DRUzWvIaSpiC1UVkrNG8bO8=
X-Google-Smtp-Source: ABdhPJw6/OyAh9w/wDundD32JCd4mEvQqAqBjTXAf0o/9PuH0Mw1rB9rTl6+1gb3oKGVANywsGP7OQ==
X-Received: by 2002:a0c:ab84:0:b0:432:916b:abb9 with SMTP id
 j4-20020a0cab84000000b00432916babb9mr10266671qvb.33.1645929506752; 
 Sat, 26 Feb 2022 18:38:26 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 x26-20020ae9f81a000000b005f1916fc61fsm3181897qkh.106.2022.02.26.18.38.26
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:26 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 16/24] gnu: chez-scheme: Use shared zlib and lz4.
Date: Sat, 26 Feb 2022 21:34:42 -0500
Message-Id: <20220227023450.1877215-17-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: This change also involves building 'libkernel.a' instead of
 'kernel.o'. Support for these build options was merged upstream in 2019:
 see discussion at <https://github.com/cisco/ChezScheme/pull/443>. *
 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, [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.47 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.47 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  This change also involves building 'libkernel.a' instead of
    'kernel.o'. Support for these build options was merged upstream in 2019:
   see discussion at <https://github.com/cisco/ChezScheme/pull/443>. * 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, [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.47 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.47 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

This change also involves building 'libkernel.a' instead of 'kernel.o'.

Support for these build options was merged upstream in 2019: see
discussion at <https://github.com/cisco/ChezScheme/pull/443>.

* 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:
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:34 2022
Received: from localhost ([127.0.0.1]:56574 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9SD-0004GX-Rh
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:34 -0500
Received: from mail-qk1-f181.google.com ([209.85.222.181]:40922)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9S3-0004FT-Ou
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:30 -0500
Received: by mail-qk1-f181.google.com with SMTP id c7so7810351qka.7
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=;
 b=HzV1VqF6vvFzA1fwDri8ZyVgyMXtMi3YpVl+0bHFnkJ/PPAYb+Ix/TBtd5RJpdnb6I
 l1cwJjkFy7i86YMLOBvhquIjVLTuiAjSrESHIwUEAuVlIkRcPg1t+4gDDTd7EOwOrSHP
 gaH0gj3vqCOxvYzp+DRmHRz1n7d5d4baoCMfvW1AcpqBYzUdDo/se4oBf09kru7HR+3j
 pxNchdU/NEMiTeYnweBSanMe2aTvbz7WhIfHlv6Iqw59vEJSzLv8mJgzkYo3Y90yYlfZ
 j9/E7beEX2jgx7r1HTEgv2bvrBCLqzQ1dVRLPqdW7Nng8blivAqNz5v6dcM1YhjFFm0K
 E+Bw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=io5+mYx3paMZskBxOftdGKkiJCIi2sMPPsvDv5pgL1U=;
 b=CIyCDzYSZrMNvk4Ev7hMTM7maMyQXQJ+yIrY7GyL0Y4F+IxxYjAgmGTaWC/jMInevP
 cEVRRZYk/bkxRIUIyc2c8fPXq6fGTTs9CUg+ywVHnmKpfOZTbkYjcSjwIpHPapWZgqNP
 fgnRpdRi+B2b/EsHIjvy/w+w85V80Jli8h6vjkFD6Ac03tn4gQ94076clFntethtEc1j
 ShLYiwtFBY0o/uUucDCGMyfysphIc9IhLue5nGFhXIzEAJLv4ca3xXb7ZukU1OMu+n2S
 ua7syYMWNjI0W+BPWyGc5ofjzcq3WZqnQY9sqqHGGWdxQfo8Qled2eho2OPLl743ejds
 ugpw==
X-Gm-Message-State: AOAM532XQo+JMEyyo8eJISBDp69atPxLkAUg1dhYFbhtoyDI2BaAIv7V
 0DKy1YZEfiq2d/iJ3pXFH87XIixf30ekiSsHXWg=
X-Google-Smtp-Source: ABdhPJxZDdLcw/yJTWLgRsr6y5uTAUFBHklfT41uRiu6MOliakrNv9ON/ao58SuhYP5mG29oNHmjHg==
X-Received: by 2002:a05:620a:142:b0:648:b7e2:104c with SMTP id
 e2-20020a05620a014200b00648b7e2104cmr8434260qkn.728.1645929498020; 
 Sat, 26 Feb 2022 18:38:18 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 15-20020a37070f000000b0062cdc159505sm3235163qkh.89.2022.02.26.18.38.17
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:17 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 14/24] gnu: chez-scheme: Use new style for Chez packages.
Date: Sat, 26 Feb 2022 21:34:40 -0500
Message-Id: <20220227023450.1877215-15-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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 [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.181 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.181 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.181 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.181 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:33 2022
Received: from localhost ([127.0.0.1]:56572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9SD-0004GQ-HK
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:33 -0500
Received: from mail-qt1-f172.google.com ([209.85.160.172]:41478)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9S7-0004Ft-Vy
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:28 -0500
Received: by mail-qt1-f172.google.com with SMTP id n11so6102496qtk.8
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=;
 b=L39zSGW8EhA6rWq2LEN+LXb1A9Cbws9UUTf5FyZqUEaJGdU3Mg66EbCOmNW/gGNVIN
 yWWENPzw47Hqot280+ClIjxZ6DMLHLDZFEhLVT34iMO6ol7ZyGD49iEeMB5u5HsE9EZf
 qeGDGfW0d0z/Y9ta0M993N3v1Sjs35XNuuO3TJxzgQUbCGb21QNEbOI+jfavHDzzRx0y
 ABrbZONlxVODRjbdHHANpla0v5xd32z2uJUXUI7LKTWNP8h8+ianoOEqdcOHQoj+at1R
 6kwtJRrfw6hyKpdgQs+c0QqXkmH+mSvTcPgq4rWw08RnMlnHCR1vMmVdUma/EYwj7rA1
 94mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=c6TzP7tP4BB13MBcjLiq0wzXqF2mXc5qBVWu9Pd9w4o=;
 b=1xGPNXyRXL/jqN/Zw23MDpbDScnYbrGboYwL57cRo/zzSDXLYTLJ6DruKfVWAIDh6m
 f7f+CKqlMAAr/8CJGdGI7xJhTxyjyxk9TF82Epclb3YLHGT3j+5T+xTWNeVLLXoeByGP
 j4bVQsew2aSJ0BmqZMrm1838TwaZT2aEFPVGTrOGPIjg8WwvGQYkMfduFSjOpk4CtbhM
 FLvjwIkqPByBJzI595e4EBTjwSq8Z1XWtWq1E4bPNBNZFR1fQ7X2d+Lq4zrZrB9p2Gil
 QoAPkv+1wSWZkIgT518PvKjopSsrPfk650ZDhoqQJTKI4PMJ+T/GXLNdEo8YKidz1U5K
 KNVw==
X-Gm-Message-State: AOAM530phasT0U2OmV1lp68KJ4hOgLld2ubKlFpGBeFGbBt+BypyLtJE
 +QUZDJwoPM70oZReLtj6/uM1iSWTg715ftVzXVM=
X-Google-Smtp-Source: ABdhPJz9MIOHdq5uUkgxTvyYO3unCN4gRgifv4VaWXXwB73GObKF4MmC/pw9cgm3RzefrIUQSsSv9w==
X-Received: by 2002:a05:622a:590:b0:2de:93aa:4ff1 with SMTP id
 c16-20020a05622a059000b002de93aa4ff1mr12271190qtb.204.1645929502469; 
 Sat, 26 Feb 2022 18:38:22 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 k10-20020a05622a03ca00b002de9f8e660dsm4432519qtx.63.2022.02.26.18.38.21
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:22 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 15/24] gnu: chez-scheme: Use "lib/chez-scheme" for search
 path.
Date: Sat, 26 Feb 2022 21:34:41 -0500
Message-Id: <20220227023450.1877215-16-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 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 [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.172 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.172 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  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 [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.172 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.160.172 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

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/"
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:33 2022
Received: from localhost ([127.0.0.1]:56570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9SD-0004GO-8w
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:33 -0500
Received: from mail-qt1-f176.google.com ([209.85.160.176]:47045)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Ry-0004FH-VT
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:19 -0500
Received: by mail-qt1-f176.google.com with SMTP id a1so1555931qta.13
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=P/53BPk+7O2+InAkhrvNK9cEXw2EYbleDRYOJqJuvjc=;
 b=DQ7D+5LoX87TNIXosLWb6WIkTWGRDK4L/nzcWRaHLxvCfI5vKzCk3mmAl+uH4Z2ADx
 ISO1Uw5xEXgagtQeLq1jrUjdEct58SjqPykAtgWl5QMNztFrLd/vIlB/ldGGXJfryMcR
 nymFtR92P2LekM3v9i0e0Cp4WvaRgny1/rUKnlROxVIkVzbm0ni6R9wwDRapFBMABDy1
 cKWJeQCqDXnHWPgxb6UFNFEqvYb836FggAiDBhQ8jPJCDqrxyqPCoq9wRYIcg/glRIXp
 Mff3yUtWiS53CiLEws/3tMfyizO4kVtL1chIjctMdyCtBPH1UepltogxZsdY5zv861Dd
 VriA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=P/53BPk+7O2+InAkhrvNK9cEXw2EYbleDRYOJqJuvjc=;
 b=f/fv+io61IrCW7gninCQkI8lZgU1foqiv5ZbrGPrLCCZUDaBqXrtTLRDTWwmj2/nGh
 oHYmUVruwEQWUBXa7GyRFGQ5/6B6Igit5XA6ivToaQk+KA8kllm9yhSz2iWQ6s1VYjci
 AVyTRwC1L3CYFPGMegt4ljZZU7KCpWcMy2phPHETTzpZUAZsX78LPHrhdLdkkTFR8MlQ
 AL8r1+0+2JLfohXwOpeW8WIbGS9//rvONGbYpFhDFHkyT6GxCaxX/M4TqoXVrVNV2nR/
 7Ry2XnsP5D2VEHdTSQD/wTPJ9W4lkbhcPOeFKhUaaZwOQNOIoQrZ8JhFk7/Za5b2+kFz
 wvyw==
X-Gm-Message-State: AOAM532HaDindfBqQWVV9whRtfkm4uuM2MmeYV9l1FtKpjn/zMelLvif
 e1J4rclQ2Gn7hFtWuoLZC3CKe/rVQWlFtg+A0rI=
X-Google-Smtp-Source: ABdhPJwOVS0f35Z8/DmyPP5qzvNnM6TNXR3OMZV9+EKMiP41XLMC5CztDM74O1N5b75KzC1XaRAXSw==
X-Received: by 2002:ac8:5ac6:0:b0:2de:4b60:688 with SMTP id
 d6-20020ac85ac6000000b002de4b600688mr12319808qtd.251.1645929493521; 
 Sat, 26 Feb 2022 18:38:13 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 h14-20020ac8584e000000b002ddf8b971b2sm4463669qth.87.2022.02.26.18.38.12
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:13 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 13/24] gnu: racket: Add 'racket-vm-for-system'.
Date: Sat, 26 Feb 2022 21:34:39 -0500
Message-Id: <20220227023450.1877215-14-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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(- [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.176 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.176 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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(- [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.176 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.160.176 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (racket-vm-for-system): New procedure.
(racket-minimal, racket)[inputs]: Use it.
---
 gnu/packages/racket.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 59944031e6..10ec0591d9 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -187,6 +187,14 @@ (define-module (gnu packages racket)
 ;;
 ;; Code:
 
+(define* (racket-vm-for-system #:optional
+                               (system (or (%current-target-system)
+                                           (%current-system))))
+  "Return 'racket-vm-cs' if it supports SYSTEM; 'racket-vm-bc' otherwise."
+  (if (nix-system->chez-machine system)
+      racket-vm-cs
+      racket-vm-bc))
+
 (define %racket-version "8.4")
 ;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles!
 (define %racket-commit
@@ -513,7 +521,7 @@ (define-public racket-minimal
     (inputs
      (list openssl
            sqlite
-           racket-vm-cs ;; TODO (racket-vm-for-system)
+           (racket-vm-for-system)
            (racket-packages-origin
             "base" %racket-origin
             '("base" "pkgs/base")
@@ -630,7 +638,7 @@ (define-public racket
       unixodbc
       libedit ;; TODO reconsider in light of expeditor and readline-gpl
       racket-minimal ;; <-- TODO non-tethered layer
-      racket-vm-cs ;; TODO (racket-vm-for-system)
+      (racket-vm-for-system)
       (simple-racket-origin
        "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
        "2d" "2d-doc" "2d-lib")
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:20 2022
Received: from localhost ([127.0.0.1]:56565 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Rz-0004Ff-KU
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:20 -0500
Received: from mail-qk1-f174.google.com ([209.85.222.174]:39835)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Ru-0004F0-NB
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:15 -0500
Received: by mail-qk1-f174.google.com with SMTP id t21so7815873qkg.6
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=Mlc/qhGedBkcO/u3jAnfRZ74tW1eDlJyXNhnlOfQlJM=;
 b=URF809wdrZf2vY9u951K66zM10YZaJAeRaUa/LYklT+i9+OpIuh+A+/5TvFCLI7f+1
 GyJe+u6KWTPNvYl0xGdjX6knFIPIrFCTc4mT76rAkDQhB4nk5f69w4qZF9+t8IH2HkKi
 OEWmd5ghRumeglKDfAzI6JB3t0tZ7V6IcusoZW2tZoh4frQqpVT/Ka5BwI4zKmUmAziD
 kFqIWtcB+aHDKbI3nUr3TjN4m6pYio5HIAhBrsIZQvWxJ2/0VSpbNwKwc84+pD3yySk3
 Wol69p/9ulH4SM3AqwT78arcDon6lZU9q86MuzQGv2fi5mNJvEjLAa4sznsoqSt5/4Ny
 ydVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=Mlc/qhGedBkcO/u3jAnfRZ74tW1eDlJyXNhnlOfQlJM=;
 b=2D09603MIiTUZVFal2OjoEalXKjoYQ4vJOriRbcnO3Yl0WpcFah0nXm8+FqC6GCCt9
 WkzG5I+CdhHcUdeNpjwNlAkcqE11jNrIt2XmZE+WPu25mzWiwcV7rVw3vW4JegUoSmy7
 45AvoPMbMAUS+9y01f8wlC21jZZ3WzDt/2Pe8sAUXzCtG/uAQJAwXL8vgjCSTpOtdz7w
 RB7Z3v2Hwnavk7KyK5hOZTpNXgZLrXMV4G+Izt7izwwd4woD3OfjhrNyQSyMjYu3dqJ9
 cxtnVn+Lm3nc47wUyXaWymLr8gow212Th+rShR8MYGKvy4YFghOHHpxBvEkGBZhlU96Q
 vS+Q==
X-Gm-Message-State: AOAM532d1nKU8UmOduxGAU+rmXAdpvrOukqhEy4qaULYaV/uHe0Un3u7
 lcTXsrs3uxI6suzXPbHpp+gLke0/qreyTYRmMf0=
X-Google-Smtp-Source: ABdhPJyo5V2yXzvgugfC+GcMlXjgb99mgWAeNj+ui06mCXZco2dQ7VjRGx92ao3JgKrrdNBEUYnoBA==
X-Received: by 2002:a37:a515:0:b0:507:f45e:5357 with SMTP id
 o21-20020a37a515000000b00507f45e5357mr8310290qke.554.1645929489032; 
 Sat, 26 Feb 2022 18:38:09 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 k125-20020a37a183000000b005f170f7e497sm3251616qke.47.2022.02.26.18.38.08
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:08 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 12/24] gnu: chez: Add utilities for Chez machine types.
Date: Sat, 26 Feb 2022 21:34:38 -0500
Message-Id: <20220227023450.1877215-13-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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-al [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.174 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.174 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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-al [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.174 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.174 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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")
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:19 2022
Received: from localhost ([127.0.0.1]:56562 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Ry-0004FU-Rn
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:19 -0500
Received: from mail-qt1-f169.google.com ([209.85.160.169]:42807)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Rq-0004En-EF
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:11 -0500
Received: by mail-qt1-f169.google.com with SMTP id 11so6095797qtt.9
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=70tFTqzO7mBf03FccqMKi2uAgvJznXFOR1Dcwftwo3c=;
 b=NHpBMhNuRXOD1thkKek483DENU1yX1qQAGFVUi6MV1VlwF7oHBrZEOxCYq8d7FKErH
 ZdxauDQxg33NVpWrJDJ82DqUh4ueRGHNxmaEpo1dH3gmMSTrMC0q94aHZnjt3FMfiWyz
 KA2+Yy9Ti/c8FddWSAJFOGHmyhF9AuZcSFreHpfSlUlnnShTXfriNIjKNGBChLo9oLUW
 zWHd2iUMlCKqURJu4JHD8QQa75EfYeWMAyjiWOBTGT67PwjJLR3DD2FKSZi/oxTBXzgy
 irTIZTSBYTr7IjCo+cakgf/1m+Y9ZoVZ2gVljFjA0gr4qqehEhfqPhuQs8ztTaBzGT9M
 Porw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=70tFTqzO7mBf03FccqMKi2uAgvJznXFOR1Dcwftwo3c=;
 b=WTzsyCEAs1pIGnzBKzhugor/oV4BWWG9XNBNi/NKo1ZmbyDpv0gZOR8EzCtXhsmbvX
 rQtIjF64sYzeRms87fvpl+x/hqwb/KzuwO0BUalIUern1hImrzjDZnJwDLYR78FHEZaR
 LF7+nJSaxGm2X3ov2JWRWpDzNE4albdDd5LTYJogn5nXE3mYherKqzcUBRLpF4e5JeVb
 KjoIPkSUWP/PViaNWlGO3gbpdruklZPyLq3L60qcBK7pZbqdEzgSdB++SvAyQLAD2z2T
 z1ksPNfu8jXxjrwDDba36nDZ1AHEEqnf0pLNCrwMTb3sUyv3ohg3csKpnXgKC5tqmxRx
 kUEQ==
X-Gm-Message-State: AOAM5317VUOXm5GnyxIoT4M2x3fwdl/NVCaNhUa5sfmxynjrFneseL+i
 y/npj9WuEC1mAcs5RRfffHN/DGtvO5EeisL2izI=
X-Google-Smtp-Source: ABdhPJxz8ljzwFn4F7pBNfnZvtWtYbDTz0CAqi8IVWts4z2p9ZRDMfWu8kOkkkQW4gJIkm1B9olUpQ==
X-Received: by 2002:a05:622a:289:b0:2de:4b60:a7e with SMTP id
 z9-20020a05622a028900b002de4b600a7emr11951126qtw.477.1645929484810; 
 Sat, 26 Feb 2022 18:38:04 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 194-20020a3706cb000000b005081e1550c8sm3275371qkg.78.2022.02.26.18.38.03
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:38:04 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 11/24] gnu: racket: Move Chez bootfiles to (gnu packages
 chez).
Date: Sat, 26 Feb 2022 21:34:37 -0500
Message-Id: <20220227023450.1877215-12-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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 problem [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.160.169 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.169 listed in list.dnswl.org]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 problem [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.169 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.160.169 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (chez-scheme-for-racket-bootstrap-bootfiles):
Move to ...
* gnu/packages/chez.scm (chez-scheme-for-racket-bootstrap-bootfiles):
... this new variable.
[source]: Avoid problematic cycle with "racket.scm".
[arguments]<#:phases>: Likewise.
---
 gnu/packages/chez.scm   | 62 +++++++++++++++++++++++++++++++++++++++++
 gnu/packages/racket.scm | 52 ----------------------------------
 2 files changed, 62 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index 47904e7b4e..046bb3dcdc 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -31,12 +31,14 @@ (define-module (gnu packages chez)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix gexp)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages netpbm)
+  #:use-module (gnu packages racket)
   #:use-module (gnu packages tex)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages image)
@@ -260,6 +262,66 @@ (define* (stex-make #:optional (suffix ""))
 and 32-bit PowerPC architectures.")
     (license asl2.0)))
 
+(define-public chez-scheme-for-racket-bootstrap-bootfiles
+  (package
+    (name "chez-scheme-for-racket-bootstrap-bootfiles")
+    (version "9.5.7.3")
+    ;; The version should match `(scheme-fork-version-number)`.
+    ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
+    ;; It will always be different than the upstream version!
+    ;; When updating, remember to also update %racket-version in racket.scm.
+    (source #f) ; avoid problematic cycle with racket.scm
+    (inputs `())
+    (native-inputs (list racket-vm-bc))
+    (build-system copy-build-system)
+    ;; TODO: cross compilation
+    (arguments
+     (list
+      #:install-plan
+      #~`(("boot/" "lib/chez-scheme-bootfiles"))
+      #:phases
+      #~(let ((unpack (assoc-ref %standard-phases 'unpack)))
+          (modify-phases %standard-phases
+            (replace 'unpack
+              (lambda args
+                (unpack #:source #$(or (package-source this-package)
+                                       (package-source racket-vm-bc)))))
+            (add-after 'unpack 'chdir
+              (lambda args
+                (chdir "racket/src/ChezScheme")))
+            (add-after 'chdir 'unpack-nanopass+stex
+              (lambda args
+                (copy-recursively
+                 #$nanopass
+                 "nanopass"
+                 #:keep-mtime? #t)))
+            (add-before 'install 'build
+              (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                (invoke (search-input-file (or native-inputs inputs)
+                                           "/opt/racket-vm/bin/racket")
+                        "rktboot/main.rkt")))))))
+    (home-page "https://github.com/racket/ChezScheme")
+    ;; ^ This is downstream of https://github.com/racket/racket,
+    ;; but it's designed to be a friendly landing place for people
+    ;; who want a ChezScheme-shaped repositroy.
+    (synopsis "Chez Scheme bootfiles bootstrapped by Racket")
+    (description "Chez Scheme is a self-hosting compiler: building it
+requires ``bootfiles'' containing the Scheme-implemented portions compiled for
+the current platform.  (Chez can then cross-compile bootfiles for all other
+supported platforms.)
+
+The Racket package @code{cs-bootstrap} (part of the main Racket Git
+repository) implements enough of a Chez Scheme simulation to load the Chez
+Scheme compiler purely from source into Racket and apply the compiler to
+itself, thus bootstrapping Chez Scheme.  Bootstrapping takes about 10 times as
+long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket
+7.1 and later, including the Racket BC variant.
+
+Note that the generated bootfiles are specific to Racket's fork of Chez
+Scheme, and @code{cs-bootstrap} does not currently support building upstream
+Chez Scheme.")
+    (license (list asl2.0))))
+
 (define-public chez-srfi
   (package
     (name "chez-srfi")
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 3271e78d45..59944031e6 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -445,58 +445,6 @@ (define-public racket-vm-cs
     ;; The LGPL components are only used by Racket BC.
     (license (list license:asl2.0 license:expat))))
 
-(define-public chez-scheme-for-racket-bootstrap-bootfiles
-  (package
-    (name "chez-scheme-for-racket-bootstrap-bootfiles")
-    (version "9.5.7.3")
-    ;; The version should match `(scheme-fork-version-number)`.
-    ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
-    ;; It will always be different than the upstream version!
-    ;; When updating, remember to also update %racket-version in racket.scm.
-    (source %racket-origin)
-    (inputs `())
-    (native-inputs (list racket-vm-bc))
-    (build-system copy-build-system)
-    ;; TODO: cross compilation
-    (arguments
-     (list
-      #:install-plan
-      #~`(("boot/" "lib/chez-scheme-bootfiles"))
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'chdir
-            (lambda args
-              (chdir "racket/src/ChezScheme")))
-          (add-after 'chdir 'unpack-nanopass+stex
-            (lambda args
-              #$(make-unpack-nanopass+stex)))
-          (add-before 'install 'build
-            (lambda* (#:key native-inputs inputs #:allow-other-keys)
-              (invoke (search-input-file (or native-inputs inputs)
-                                         "/opt/racket-vm/bin/racket")
-                      "rktboot/main.rkt"))))))
-    (home-page "https://github.com/racket/ChezScheme")
-    ;; ^ This is downstream of https://github.com/racket/racket,
-    ;; but it's designed to be a friendly landing place for people
-    ;; who want a ChezScheme-shaped repositroy.
-    (synopsis "Chez Scheme bootfiles bootstrapped by Racket")
-    (description "Chez Scheme is a self-hosting compiler: building it
-requires ``bootfiles'' containing the Scheme-implemented portions compiled for
-the current platform.  (Chez can then cross-compile bootfiles for all other
-supported platforms.)
-
-The Racket package @code{cs-bootstrap} (part of the main Racket Git
-repository) implements enough of a Chez Scheme simulation to load the Chez
-Scheme compiler purely from source into Racket and apply the compiler to
-itself, thus bootstrapping Chez Scheme.  Bootstrapping takes about 10 times as
-long as using an existing Chez Scheme, but @code{cs-bootstrap} supports Racket
-7.1 and later, including the Racket BC variant.
-
-Note that the generated bootfiles are specific to Racket's fork of Chez
-Scheme, and @code{cs-bootstrap} does not currently support building upstream
-Chez Scheme.")
-    (license (list license:asl2.0))))
-
 (define (racket-packages-origin name origin spec0 . spec*)
   "Extract from ORIGIN the sources for the Racket packages specified by SPEC0
 and any additional arguments SPEC*.  In the resulting file-like object, each
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:12 2022
Received: from localhost ([127.0.0.1]:56559 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Rr-0004F8-AW
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:12 -0500
Received: from mail-qt1-f179.google.com ([209.85.160.179]:36577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Rm-0004Dl-LM
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:08 -0500
Received: by mail-qt1-f179.google.com with SMTP id f18so6101464qtb.3
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=MyqBuKQrh0l2BfKrMcE8f1kV4NNl5lRbW0Psl3d3OiQ=;
 b=FvZGiDbkVstrWdAEyNk4LEuduQ98RCT60uqNcLZYtV1bL9qc9rUxMJyQsxacx492EF
 3YQLJ2HaekqE5ofL17VDfQQ/JFVuCjCIyDNU20LsJeLH0wWFK4VHPmi7A/3Gyu0+9gln
 47rc9ARUoOsAAMhjb0KQWKQoJe+i+QQ223Vms4K8Ie175X1M6xDFDufQbCz/fajXqitF
 fkrZk+bersI9vBZLwgr490IMgOGYa+Ahhi59Kjw3SIgbO7MmGejEm0P8uDOsU8Xs6MbZ
 osPPL0DCZRsx6UsEXF3KjPzZ/jF/xCdyfyYAW4+SCpLxqXIPcVLpcwK0OZrEXC02jJbn
 tP8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=MyqBuKQrh0l2BfKrMcE8f1kV4NNl5lRbW0Psl3d3OiQ=;
 b=S/kbKTU6rAXKNrb6FDVCkY4gkuJAvJ9O2D0sEdbotekROR56fbydiswFZYVrmDLy/f
 lahwXt2KWdV2tU0qvO+QxW6pu1YxYZZOuRT4DI+Ng21qQHPmDG2DOihljVzqDr47dejV
 DZ4lTnBLaLKZ0RYYAPeNx8OL4l7tAf/H+/iBuBYXcZUnjl3OBU2KAVqezsTtPMsjvtcb
 YDVqG9bKQC8IjgzIoKXuQG4Wbaj40pXdCmAdwdzkGWDRs4CKksixGZT3wpHlJIHA0NLr
 DYu8NPNTgzMLtLSKjs+wWMsQIfiaS/3ZIoJ02N7QSrCdaSMUaOT4L2nckKfeiOH3ES1O
 Xs6w==
X-Gm-Message-State: AOAM530rwAmcn9QzBOO7BeYJl3M861RNmrh9bYkbTaJBe4Slk+lAQhy9
 gspvObdAb+KPEaddJZ+/J9AMTati/SL3bEZ/utA=
X-Google-Smtp-Source: ABdhPJwoWF0tZtaa+FUGbyvkM9J1w/kYkOh7gb00OeR+tjbbkH0OjtZLw/uL0kUx0bsiFnMDs329Xg==
X-Received: by 2002:a05:622a:1113:b0:2dd:5385:36c3 with SMTP id
 e19-20020a05622a111300b002dd538536c3mr12209617qty.262.1645929480317; 
 Sat, 26 Feb 2022 18:38:00 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 t2-20020a05622a01c200b002de5098fbaesm4330154qtw.26.2022.02.26.18.37.59
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:59 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 10/24] gnu: racket-minimal: Separate from the Racket VM.
Date: Sat, 26 Feb 2022 21:34:36 -0500
Message-Id: <20220227023450.1877215-11-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  For consistency with other Racket distributions,
 'racket-minimal'
 should have the "racket-lib" Racket package installed: see
 <https://github.com/racket/racket/issues/3851#issuecomment-942368947>.
 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 [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.179 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.160.179 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  For consistency with other Racket distributions, 'racket-minimal'
    should have the "racket-lib" Racket package installed: see <https://github.com/racket/racket/issues/3851#issuecomment-942368947>.
    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 [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.179 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.160.179 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

For consistency with other Racket distributions, 'racket-minimal' should
have the "racket-lib" Racket package installed: see
<https://github.com/racket/racket/issues/3851#issuecomment-942368947>.

Happily, this gives us a clean boundary between the core Racket VM and
compiler, with all of the bootstrapping involved, and building Racket
packages and installation layers, which can be handled in a nice,
uniform way and eventually turned into a 'racket-build-system'.
Building the VM layer as an "in-place" installation should help us use
it with other Racket tools.

* gnu/packages/racket.scm (racket-vm-common-configure-flags): Add
"--enable-origtree". Adapt "--enable-racket=" for "opt/racket-vm/"
prefix.
(racket-minimal-bc-cgc): Rename to ...
(racket-vm-cgc): ... this new variable.
[inputs]: Move 'openssl' and 'sqlite' to new 'racket-minimal'.
[arguments]<#:strip-directories>: Use "opt/racket-vm/" prefix.
<#:phases>: Wrap 'configure', 'patch-shebangs', 'validate-runpath',
'make-dynamic-linker-cache', and 'patch-dot-desktop-files' to use
"opt/racket-vm/" prefix. Adapt 'initialize-config.rktd' for removal of
'openssl' and 'sqlite'.
[description]: Tweak.
(racket-minimal-bc-3m): Rename to ...
(racket-vm-bc): ... this new variable.
[synopsis, description]: Tweak.
(racket-vm-cs): New variable, adapted from the old 'racket-minimal'.
(chez-scheme-for-racket-bootstrap-bootfiles)[arguments]<#:phhases>:
Adapt to the "opt/racket-vm/" prefix.
(racket-minimal): Rewrite like 'racket' using 'racket-vm-cs'.
(racket): Inherit from 'racket-minimal'.
[inputs]: Add 'racket-vm-cs'. Move "racket-lib" and "base" to
'racket-minimal'.
[arguments]<#:make-flags, #:configure-flags>: Override from
'racket-minimal'.
(configure-layer.rkt): Adapt to support in-place VM build with possible
intermediate layer.
---
 gnu/packages/racket.scm | 597 ++++++++++++++++++++++++++--------------
 1 file changed, 385 insertions(+), 212 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 4f5f0c1df2..3271e78d45 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -54,7 +54,91 @@ (define-module (gnu packages racket)
 
 ;; Commentary:
 ;;
-;; Here's how bootstrapping minimal Racket works:
+;; Anatomy of Racket:
+;; ------------------
+;;
+;; The main Racket Git repository (<https://github.com/racket/racket>) 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. <https://github.com/pycket/pycket>.)
+;;
+;; 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 <https://github.com/racket/racket/issues/3851>.
-             ;; As a workaround, remove the directory.
-             (lambda args
-               ;; rmdir because we want an error if it isn't empty
-               (rmdir (string-append #$output "/share/racket/pkgs")))))))
+       #~(let ()
+           (define* ((wrap-racket-vm-outputs phase) . args)
+             (apply
+              phase
+              (let loop ((args args))
+                (match args
+                  ((#:outputs outputs . args)
+                   `(#:outputs
+                     ,(let loop ((outputs outputs))
+                        (match outputs
+                          ((("out" . out) . outputs)
+                           `(("out" . ,(string-append out "/opt/racket-vm/"))
+                             ,@outputs))
+                          ((other . outputs)
+                           (cons other (loop outputs)))))
+                     ,@args))
+                  ((arg . args)
+                   (cons arg (loop args)))))))
+           (modify-phases %standard-phases
+             (add-before 'configure 'initialize-config.rktd
+               (lambda* (#:key inputs #:allow-other-keys)
+                 (define (write-racket-hash alist)
+                   ;; inside must use dotted pair notation
+                   (display "#hash(")
+                   (for-each (match-lambda
+                               ((k . v)
+                                (format #t "(~s . ~s)" k v)))
+                             alist)
+                   (display ")\n"))
+                 (define maybe-release-catalog
+                   (let ((v #$(package-version this-package)))
+                     (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)"
+                                       v)
+                         `(,(string-append
+                             "https://download.racket-lang.org/releases/"
+                             v
+                             "/catalog/"))
+                         '())))
+                 (mkdir-p "racket/etc")
+                 (with-output-to-file "racket/etc/config.rktd"
+                   (lambda ()
+                     (write-racket-hash
+                      `((build-stamp . "")
+                        (catalogs ,@maybe-release-catalog
+                                  #f)))))))
+             (add-before 'configure 'chdir
+               (lambda _
+                 (chdir "racket/src")))
+             (replace 'configure
+               (wrap-racket-vm-outputs
+                (assoc-ref %standard-phases 'configure)))
+             (replace 'patch-shebangs
+               (wrap-racket-vm-outputs
+                (assoc-ref %standard-phases 'patch-shebangs)))
+             (replace 'validate-runpath
+               (wrap-racket-vm-outputs
+                (assoc-ref %standard-phases 'validate-runpath)))
+             (replace 'make-dynamic-linker-cache
+               (wrap-racket-vm-outputs
+                (assoc-ref %standard-phases 'make-dynamic-linker-cache)))
+             (replace 'patch-dot-desktop-files
+               (wrap-racket-vm-outputs
+                (assoc-ref %standard-phases 'patch-dot-desktop-files)))))))
      (home-page "https://racket-lang.org")
      (synopsis "Old Racket implementation used for bootstrapping")
      (description "This variant of the Racket BC (``before Chez'' or
@@ -262,32 +366,33 @@ (define maybe-release-catalog
 scheme) by the 3M variant, which in turn was succeeded in version 8.0 by the
 Racket CS implementation.
 
-Racket BC [CGC] is primarily used for bootstrapping Racket BC [3M].  It may
+Racket CGC is primarily used for bootstrapping Racket BC [3M].  It may
 also be used for embedding applications without the annotations needed in C
 code to use the 3M garbage collector.")
      ;; https://download.racket-lang.org/license.html
      ;; The LGPL components are only used by Racket BC.
      (license (list license:lgpl3+ license:asl2.0 license:expat)))))
 
-(define-public racket-minimal-bc-3m
+(define-public racket-vm-bc
   (package
-    (inherit racket-minimal-bc-cgc)
-    (name "racket-minimal-bc-3m")
+    (inherit racket-vm-cgc)
+    (name "racket-vm-bc")
     (native-inputs
-     (modify-inputs (package-native-inputs racket-minimal-bc-cgc)
-       (prepend racket-minimal-bc-cgc)))
+     (modify-inputs (package-native-inputs racket-vm-cgc)
+       (prepend racket-vm-cgc)))
     (arguments
-     (substitute-keyword-arguments (package-arguments racket-minimal-bc-cgc)
+     (substitute-keyword-arguments (package-arguments racket-vm-cgc)
        ((#:configure-flags _ '())
         #~(cons "--enable-bconly"
                 #$(racket-vm-common-configure-flags)))))
-    (synopsis "Minimal Racket with the BC [3M] runtime system")
+    (synopsis "Racket BC [3M] implementation")
     (description "The Racket BC (``before Chez'' or ``bytecode'')
 implementation was the default before Racket 8.0.  It uses a compiler written
 in C targeting architecture-independent bytecode, plus a JIT compiler on most
 platforms.  Racket BC has a different C API and supports a slightly different
 set of architectures than the current default runtime system, Racket CS (based
-on ``Chez Scheme'').
+on ``Chez Scheme'').  It is the recommended implementation for architectures
+that Racket CS doesn't support.
 
 This package is the normal implementation of Racket BC with a precise garbage
 collector, 3M (``Moving Memory Manager'').")
@@ -295,23 +400,23 @@ (define-public racket-minimal-bc-3m
     ;; The LGPL components are only used by Racket BC.
     (license (list license:lgpl3+ license:asl2.0 license:expat))))
 
-(define-public racket-minimal
+(define-public racket-vm-cs
   (package
-    (inherit racket-minimal-bc-3m)
-    (name "racket-minimal")
+    (inherit racket-vm-bc)
+    (name "racket-vm-cs")
     (inputs
-     (modify-inputs (package-inputs racket-minimal-bc-cgc)
+     (modify-inputs (package-inputs racket-vm-cgc)
        (prepend zlib lz4)
        (delete "libffi")))
     (native-inputs
-     (modify-inputs (package-native-inputs racket-minimal-bc-cgc)
+     (modify-inputs (package-native-inputs racket-vm-cgc)
        (delete "libtool")
        (prepend chez-scheme-for-racket-bootstrap-bootfiles
-                racket-minimal-bc-3m)))
+                racket-vm-bc)))
     (arguments
-     (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m)
-       ((#:phases bc-phases)
-        #~(modify-phases #$bc-phases
+     (substitute-keyword-arguments (package-arguments racket-vm-cgc)
+       ((#:phases those-phases #~%standard-phases)
+        #~(modify-phases #$those-phases
             (add-after 'unpack 'unpack-nanopass+stex
               (lambda args
                 (with-directory-excursion "racket/src/ChezScheme"
@@ -328,17 +433,14 @@ (define-public racket-minimal
                  "--enable-libz"
                  "--enable-lz4"
                  #$(racket-vm-common-configure-flags)))))
-    (synopsis "Racket without bundled packages such as DrRacket")
-    (description
-     "Racket is a general-purpose programming language in the Scheme family,
-with a large set of libraries and a compiler based on Chez Scheme.  Racket is
-also a platform for language-oriented programming, from small domain-specific
-languages to complete language implementations.
+    (synopsis "Racket CS implementation")
+    (description "The Racket CS implementation, which uses ``Chez Scheme'' as
+its core compiler and runtime system, has been the default Racket VM
+implemetation since Racket 8.0.  It performs better than the Racket BC
+implementation for most programs.
 
-The ``minimal Racket'' distribution includes just enough of Racket for you to
-use @command{raco pkg} to install more.  Bundled packages, such as the
-DrRacket IDE, are not included.")
-    (properties `())
+Using the Racket VM packages directly is not recommended: instead, install the
+@code{racket-minimal} or @code{racket} packages.")
     ;; https://download.racket-lang.org/license.html
     ;; The LGPL components are only used by Racket BC.
     (license (list license:asl2.0 license:expat))))
@@ -353,7 +455,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
     ;; When updating, remember to also update %racket-version in racket.scm.
     (source %racket-origin)
     (inputs `())
-    (native-inputs (list racket-minimal-bc-3m))
+    (native-inputs (list racket-vm-bc))
     (build-system copy-build-system)
     ;; TODO: cross compilation
     (arguments
@@ -371,7 +473,7 @@ (define-public chez-scheme-for-racket-bootstrap-bootfiles
           (add-before 'install 'build
             (lambda* (#:key native-inputs inputs #:allow-other-keys)
               (invoke (search-input-file (or native-inputs inputs)
-                                         "/bin/racket")
+                                         "/opt/racket-vm/bin/racket")
                       "rktboot/main.rkt"))))))
     (home-page "https://github.com/racket/ChezScheme")
     ;; ^ This is downstream of https://github.com/racket/racket,
@@ -452,10 +554,116 @@ (define (simple-racket-origin repo hash spec0 . spec*)
          spec0
          spec*))
 
+(define-public racket-minimal
+  (package
+    (name "racket-minimal")
+    (version %racket-version)
+    (source #f)
+    ;; For cross-compilation, Matthew Flatt recommends reusing
+    ;; as much of `raco cross` as possible. So, put that off until
+    ;; we have a build system for Racket packages.
+    (inputs
+     (list openssl
+           sqlite
+           racket-vm-cs ;; TODO (racket-vm-for-system)
+           (racket-packages-origin
+            "base" %racket-origin
+            '("base" "pkgs/base")
+            '("racket-lib" "pkgs/racket-lib"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; Here and for the `racket` package, we're using #:configure-flags
+     ;; to pass flags for `configure-layer.rkt` and #:make-flags
+     ;; to pass arguments for `raco pkg install`.
+     (list
+      #:configure-flags
+      #~`("--tethered"
+          "--extra-foreign-lib-search-dirs"
+          ,(format
+            #f "~s"
+            (list #$(file-append (this-package-input "openssl") "/lib")
+                  #$(file-append (this-package-input "sqlite") "/lib"))))
+      #:make-flags #~`("racket-lib")
+      #:tests? #f ;; packaged separately
+      #:modules '((guix build gnu-build-system)
+                  (guix build utils)
+                  (guix build union)
+                  (ice-9 match))
+      #:imported-modules `((guix build union)
+                           ,@%gnu-build-system-modules)
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'unpack)
+          (replace 'configure
+            (lambda* (#:key inputs configure-flags #:allow-other-keys)
+              (let* ((vm-dir (search-input-directory inputs "opt/racket-vm"))
+                     (racket (string-append vm-dir "/bin/racket")))
+                (apply invoke
+                       racket
+                       #$configure-layer.rkt
+                       `(,@(cond
+                            ((false-if-exception
+                              (search-input-file
+                               inputs "etc/racket/config.rktd"))
+                             => (lambda (file)
+                                  `("--parent"
+                                    ,(dirname (dirname (dirname file))))))
+                            (else
+                             '()))
+                         ,@configure-flags
+                         ,vm-dir
+                         ,#$output))
+                (invoke racket
+                        "--config" (string-append #$output "/etc/racket")
+                        "-l" "raco" "setup"
+                        "--no-user"))))
+          (replace 'build
+            (lambda* (#:key inputs #:allow-other-keys)
+              ;; We use "share/racket/pkgs" for sources to distinguish them
+              ;; from the "lib/racket/pkgs" of a potential parent layer.
+              (union-build (string-append #$output "/lib/racket/pkgs")
+                           (search-path-as-list '("share/racket/pkgs")
+                                                (map cdr inputs))
+                           #:create-all-directories? #t)))
+          (replace 'install
+            (lambda* (#:key inputs make-flags #:allow-other-keys)
+              (let ((racket
+                     (search-input-file inputs "/opt/racket-vm/bin/racket")))
+                (unless (null? make-flags)
+                  (invoke racket
+                          "-l-"
+                          "pkg/dirs-catalog"
+                          "--link"
+                          "local-catalog"
+                          (string-append #$output "/lib/racket/pkgs"))
+                  (apply invoke
+                         racket
+                         "--config" (string-append #$output "/etc/racket")
+                         "-l" "raco"
+                         "pkg" "install"
+                         "--installation"
+                         "--auto"
+                         "--catalog" "local-catalog"
+                         make-flags))))))))
+    (home-page "https://racket-lang.org")
+    (synopsis "Racket without bundled packages such as DrRacket")
+    (description
+     "Racket is a general-purpose programming language in the Scheme family,
+with a large set of libraries and a compiler based on Chez Scheme.  Racket is
+also a platform for language-oriented programming, from small domain-specific
+languages to complete language implementations.
+
+The ``minimal Racket'' distribution includes just enough of Racket for you to
+use @command{raco pkg} to install more.  Bundled packages, such as the
+DrRacket IDE, are not included.")
+    ;; https://download.racket-lang.org/license.html
+    ;; The LGPL components are only used by Racket BC.
+    (license (list license:asl2.0 license:expat))))
+
 (define-public racket
   (package
+    (inherit racket-minimal)
     (name "racket")
-    (version %racket-version)
     (source #f)
     (inputs
      (list
@@ -474,6 +682,7 @@ (define-public racket
       unixodbc
       libedit ;; TODO reconsider in light of expeditor and readline-gpl
       racket-minimal ;; <-- TODO non-tethered layer
+      racket-vm-cs ;; TODO (racket-vm-for-system)
       (simple-racket-origin
        "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
        "2d" "2d-doc" "2d-lib")
@@ -482,8 +691,6 @@ (define-public racket
        '("algol60" "."))
       (racket-packages-origin
        "racket" %racket-origin
-       '("base" "pkgs/base") ;; FIXME belongs in racket-minimal
-       '("racket-lib" "pkgs/racket-lib") ;; FIXME belongs in racket-minimal
        '("at-exp-lib" "pkgs/at-exp-lib")
        '("compiler" "pkgs/compiler")
        '("compiler-lib" "pkgs/compiler-lib")
@@ -808,91 +1015,39 @@ (define-public racket
        "xrepl" "xrepl-doc" "xrepl-lib")))
     (build-system gnu-build-system)
     (arguments
-     ;; We're using #:configure-flags to pass flags for
-     ;; `configure-layer.rkt` and #:make-flags to pass arguments for
-     ;; `raco pkg install`.
-     (list
-      #:configure-flags
-      #~`("--extra-foreign-lib-search-dirs"
-          ,(format #f "~s"
-                   '(#$@(map (lambda (name)
-                               (cond
-                                ((this-package-input name)
-                                 => (cut file-append <> "/lib"))
-                                (else
-                                 (raise-exception
-                                  (make-exception
-                                   (make-assertion-failure)
-                                   (make-exception-with-message
-                                    "missing input to the 'racket' package")
-                                   (make-exception-with-irritants
-                                    (list name)))))))
-                             '("cairo"
-                               "fontconfig-minimal" ;; aka fontconfig
-                               "glib"
-                               "glu"
-                               "gmp"
-                               "gtk+"
-                               "libjpeg-turbo"
-                               "libpng"
-                               "libx11"
-                               "mesa"
-                               "mpfr"
-                               "pango"
-                               "unixodbc"
-                               "libedit")))))
-      #:make-flags #~`("main-distribution")
-      #:tests? #f ;; packaged separately
-      #:modules '((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build union)
-                  (ice-9 match))
-      #:imported-modules `((guix build union)
-                           ,@%gnu-build-system-modules)
-      #:phases
-      #~(modify-phases %standard-phases
-          (delete 'unpack)
-          (replace 'configure
-            (lambda* (#:key inputs configure-flags #:allow-other-keys)
-              (let* ((racket (search-input-file inputs "bin/racket")))
-                (apply invoke
-                       racket
-                       #$configure-layer.rkt
-                       `(,@configure-flags
-                         ,(dirname (dirname racket))
-                         ,#$output))
-                (invoke racket
-                        "--config" (string-append #$output "/etc/racket")
-                        "-l" "raco" "setup"
-                        "--no-user"))))
-          (replace 'build
-            (lambda* (#:key inputs #:allow-other-keys)
-              ;; We use "share/racket/pkgs" for sources to distinguish them
-              ;; from the "lib/racket/pkgs" of a potential parent layer.
-              (union-build (string-append #$output "/lib/racket/pkgs")
-                           (search-path-as-list '("share/racket/pkgs")
-                                                (map cdr inputs))
-                           #:create-all-directories? #t)))
-          (replace 'install
-            (lambda* (#:key inputs make-flags #:allow-other-keys)
-              (let ((racket (search-input-file inputs "/bin/racket")))
-                (unless (null? make-flags)
-                  (invoke racket
-                          "-l-"
-                          "pkg/dirs-catalog"
-                          "--link"
-                          "local-catalog"
-                          (string-append #$output "/lib/racket/pkgs"))
-                  (apply invoke
-                         racket
-                         "--config" (string-append #$output "/etc/racket")
-                         "-l" "raco"
-                         "pkg" "install"
-                         "--installation"
-                         "--auto"
-                         "--catalog" "local-catalog"
-                         make-flags))))))))
-    (home-page "https://racket-lang.org")
+     (substitute-keyword-arguments (package-arguments racket-minimal)
+       ((#:make-flags _ '())
+        #~`("main-distribution"))
+       ((#:configure-flags _ '())
+        #~`("--tethered"
+            "--extra-foreign-lib-search-dirs"
+            ,(format #f "~s"
+                     '(#$@(map (lambda (name)
+                                 (cond
+                                  ((this-package-input name)
+                                   => (cut file-append <> "/lib"))
+                                  (else
+                                   (raise-exception
+                                    (make-exception
+                                     (make-assertion-failure)
+                                     (make-exception-with-message
+                                      "missing input to the 'racket' package")
+                                     (make-exception-with-irritants
+                                      (list name)))))))
+                               '("cairo"
+                                 "fontconfig-minimal" ;; aka fontconfig
+                                 "glib"
+                                 "glu"
+                                 "gmp"
+                                 "gtk+"
+                                 "libjpeg-turbo"
+                                 "libpng"
+                                 "libx11"
+                                 "mesa"
+                                 "mpfr"
+                                 "pango"
+                                 "unixodbc"
+                                 "libedit"))))))))
     (synopsis "Programmable programming language in the Scheme family")
     (description
      "Racket is a general-purpose programming language in the Scheme family,
@@ -902,10 +1057,7 @@ (define-public racket
 
 The main Racket distribution comes with many bundled packages, including the
 DrRacket IDE, libraries for GUI and web programming, and implementations of
-languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.")
-    ;; https://download.racket-lang.org/license.html
-    ;; The LGPL components are only used by Racket BC.
-    (license (list license:asl2.0 license:expat))))
+languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and Datalog.")))
 
 (define configure-layer.rkt
   (scheme-file
@@ -918,41 +1070,53 @@ (define configure-layer.rkt
               racket/port
               racket/list
               racket/pretty)
-     (define config-file-pth
-       "etc/racket/config.rktd")
      (define (build-path-string . args)
        (path->string (apply build-path args)))
      (define rx:racket
        ;; Guile's reader doesn't support #rx"racket"
        (regexp "racket"))
+     (define tethered? #f)
+     (define parent #f)
      (define extra-foreign-lib-search-dirs '())
-     (define-values [parent-layer prefix]
+     (define-values [vm-dir prefix]
        (command-line
         #:once-each
+        [("--tethered") "create a tethered layer"
+         (set! tethered? #t)]
+        [("--parent") dir "path of parent layer, if any"
+         (set! parent dir)]
         [("--extra-foreign-lib-search-dirs") dir-list
          "foreign library directories, as a list of strings in `read` syntax"
          (set! extra-foreign-lib-search-dirs
                (call-with-input-string dir-list read))]
-        #:args (parent-layer prefix)
-        (values parent-layer prefix)))
+        #:args (vm-dir prefix)
+        (values vm-dir prefix)))
      (let* ([config
              (for/fold
-              ([config (file->value (build-path parent-layer
-                                                config-file-pth))])
-              ([spec (in-list
-                      '((lib-dir lib-search-dirs "lib/racket")
-                        (share-dir share-search-dirs "share/racket")
-                        (links-file
-                         links-search-files
-                         "share/racket/links.rktd")
-                        (pkgs-dir pkgs-search-dirs "share/racket/pkgs")
-                        (bin-dir bin-search-dirs "bin")
-                        (man-dir man-search-dirs "share/man")
-                        (doc-dir doc-search-dirs "share/doc/racket")
-                        (include-dir
-                         include-search-dirs
-                         "include/racket")))])
-              (match-define (list main-key search-key pth) spec)
+              ([config (file->value
+                        (if parent
+                            (build-path parent "etc/racket/config.rktd")
+                            (build-path vm-dir "etc/config.rktd")))])
+              ([spec
+                (in-list
+                 '((lib-dir lib-search-dirs "lib/racket" "lib")
+                   (share-dir share-search-dirs "share/racket" "share")
+                   (links-file links-search-files
+                               "lib/racket/links.rktd"
+                               "share/links.rktd")
+                   (pkgs-dir pkgs-search-dirs "lib/racket/pkgs" "share/pkgs")
+                   ;; Partial workaround for:
+                   ;; https://github.com/racket/racket/issues/4133
+                   #;(bin-dir bin-search-dirs "bin" "bin")
+                   (bin-dir bin-search-dirs
+                            "lib/racket/bogus-untethered-bin"
+                            "bin")
+                   (man-dir man-search-dirs "share/man" "share/man")
+                   (doc-dir doc-search-dirs "share/doc/racket" "doc")
+                   (include-dir include-search-dirs
+                                "include/racket"
+                                "include")))])
+              (match-define (list main-key search-key pth vm-pth) spec)
               (hash-set*
                config
                main-key
@@ -961,7 +1125,10 @@ (define-values [parent-layer prefix]
                (list* #f
                       (hash-ref config
                                 main-key
-                                (build-path-string parent-layer pth))
+                                (lambda ()
+                                  (if parent
+                                      (build-path-string parent pth)
+                                      (build-path-string vm-dir vm-pth))))
                       (filter values (hash-ref config search-key null)))))]
             [config
              (hash-update config
@@ -995,15 +1162,21 @@ (define-values [rkt old-foreign-dirs]
                                          ;; workaround Guile reader/printer:
                                          ['|3m| "-bc"]
                                          [_ ""])))]
-            [bin-dir
-             (hash-ref config 'bin-dir)]
             [config
-             (hash-set* config
-                        'config-tethered-apps-dir (hash-ref config 'apps-dir)
-                        'config-tethered-console-bin-dir bin-dir
-                        'config-tethered-gui-bin-dir bin-dir)]
-            [new-config-pth
-             (build-path prefix config-file-pth)])
+             (cond
+              [tethered?
+               ;; Partial workaround for:
+               ;; https://github.com/racket/racket/issues/4133
+               #;(define bin-dir (hash-ref config 'bin-dir))
+               (define bin-dir (build-path-string prefix "bin"))
+               (hash-set* config
+                          'config-tethered-apps-dir (hash-ref config 'apps-dir)
+                          'config-tethered-console-bin-dir bin-dir
+                          'config-tethered-gui-bin-dir bin-dir)]
+              [else
+               config])])
+       (define new-config-pth
+         (build-path prefix "etc/racket/config.rktd"))
        (make-parent-directory* new-config-pth)
        (call-with-output-file*
         new-config-pth
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:38:04 2022
Received: from localhost ([127.0.0.1]:56554 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Rj-0004EL-Jl
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:04 -0500
Received: from mail-qt1-f175.google.com ([209.85.160.175]:36570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Rh-0004DY-DL
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:38:01 -0500
Received: by mail-qt1-f175.google.com with SMTP id f18so6101400qtb.3
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:38:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=O2S2PRHkG8IvVGmB0WnxootYPk4QM0bZwqLu/W8JFKU=;
 b=TzbthcmPb90eB0ZhJn/q3d/08+LiNd2zrMPuMO6gvfWeku66LpUP7u93gAO6zo7/0n
 XFBGFCRp+fVedF27sU0e+/dFrZeAeD2ERbFXfrOZ3b0Flhc/ivX1tdm2eU1U1K36BS8W
 0huQKByDpEJeUkZ2E58LRiOAR92xtXEpY21c+3EBrJYs1foTzpT7r+szlZ9YjuoUvASL
 WZKV2u391ap6T7Xnuoka9IjVhNd6kkpP7TqaFqwKJJPxAX+KMFKz8i6oAZzhI+AuHbnI
 kYZgZqhHmNBfxe0AWICcDzU+2g2GLXEfxiXgmvq9Iqhw454/f2ZGtEG4lTvhOjYBi06j
 3abQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=O2S2PRHkG8IvVGmB0WnxootYPk4QM0bZwqLu/W8JFKU=;
 b=yV44kY2n5ZOpfigIpkQjzLkeRF1d/gHWp3uVvL+6x0hSLrHbXyVZD8Q31H7+tSLXa+
 cHUcDkxEJAk9qXXZuHHZ2PRGs+GETGllsrSVNiE7zDdcKVS8HGrqYyqFWV7ez7u2HVd3
 bBT/ZHM09up7MENcgwscaNV/UmB6MH8oDemyL4/P9wXfA3akqVVEuzZSf3ADFO1U4XXf
 KJCRfd7YVjs2tLcZWPBBnaj1mLbjlA9B3z40FO9rM5fMIeXCwyIg4C7/oP+NdsFZbOjP
 MFfdfEFtyr2BNGw1WBRWyoM3PQehbfQyMqqmLxAV1HyEt3O2kuxdf2aCD+7wHv7s7aPP
 baig==
X-Gm-Message-State: AOAM53000MbeP9NedrHNeL4ICt8vLtcRlgUOwQNu9Nw/4OA17yaLrSHx
 mZpHaJR9TIfB922T9/p1vCyFxowk83kFlOdnqps=
X-Google-Smtp-Source: ABdhPJyGSmvg9wjU/pOR6Kt5I0WdpOxWWAc/Yami+ewkE2PQYN/r+Sv1uxYtKSllsOxpjb5D+gYs7g==
X-Received: by 2002:ac8:4e43:0:b0:2df:f8d1:64b3 with SMTP id
 e3-20020ac84e43000000b002dff8d164b3mr3057230qtw.209.1645929475789; 
 Sat, 26 Feb 2022 18:37:55 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 e8-20020ac85dc8000000b002de409f360fsm4317833qtx.76.2022.02.26.18.37.55
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:55 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 09/24] gnu: configure-layer.rkt: Adjust indentation.
Date: Sat, 26 Feb 2022 21:34:35 -0500
Message-Id: <20220227023450.1877215-10-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * gnu/packages/racket.scm (configure-layer.rkt): Wrap
 'command-line'
 in 'define-values' to reduce rightward drift. --- gnu/packages/racket.scm
 | 164 ++++++++++++++++++++ 1 file cha [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.175 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.175 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * gnu/packages/racket.scm (configure-layer.rkt): Wrap 'command-line'
    in 'define-values' to reduce rightward drift. --- gnu/packages/racket.scm
    | 164 ++++++++++++++++++++ 1 file cha [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.175 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.160.175 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (configure-layer.rkt): Wrap 'command-line' in
'define-values' to reduce rightward drift.
---
 gnu/packages/racket.scm | 164 ++++++++++++++++++++--------------------
 1 file changed, 83 insertions(+), 81 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 69c99f5764..4f5f0c1df2 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -926,84 +926,86 @@ (define rx:racket
        ;; Guile's reader doesn't support #rx"racket"
        (regexp "racket"))
      (define extra-foreign-lib-search-dirs '())
-     (command-line
-      #:once-each
-      [("--extra-foreign-lib-search-dirs") dir-list
-       "foreign library directories, as a list of strings in `read` syntax"
-       (set! extra-foreign-lib-search-dirs
-             (call-with-input-string dir-list read))]
-      #:args (parent-layer prefix)
-      (let* ([config
-              (for/fold
-               ([config (file->value (build-path parent-layer
-                                                 config-file-pth))])
-               ([spec (in-list
-                       '((lib-dir lib-search-dirs "lib/racket")
-                         (share-dir share-search-dirs "share/racket")
-                         (links-file
-                          links-search-files
-                          "share/racket/links.rktd")
-                         (pkgs-dir pkgs-search-dirs "share/racket/pkgs")
-                         (bin-dir bin-search-dirs "bin")
-                         (man-dir man-search-dirs "share/man")
-                         (doc-dir doc-search-dirs "share/doc/racket")
-                         (include-dir
-                          include-search-dirs
-                          "include/racket")))])
-               (match-define (list main-key search-key pth) spec)
-               (hash-set*
-                config
-                main-key
-                (build-path-string prefix pth)
-                search-key
-                (list* #f
-                       (hash-ref config
-                                 main-key
-                                 (build-path-string parent-layer pth))
-                       (filter values (hash-ref config search-key null)))))]
-             [config
-              (hash-update config
-                           'lib-search-dirs
-                           (lambda (dirs)
-                             ;; add after other layers, but before older
-                             ;; foreign lib search directories
-                             (define-values [rkt old-foreign-dirs]
-                               (partition (lambda (pth)
-                                            (or (not pth)
-                                                (regexp-match? rx:racket pth)))
-                                          dirs))
-                             (append rkt
-                                     extra-foreign-lib-search-dirs
-                                     old-foreign-dirs)))]
-             [config
-              (hash-set* config
-                         'apps-dir
-                         (build-path-string prefix "share/applications")
-                         'absolute-installation? #t
-                         ;; Let Guix coexist with other installation
-                         ;; methods without clobbering user-specific packages.
-                         ;; This could be set in various places, but doing
-                         ;; it here is convienient, at least until we support
-                         ;; cross-compilation.
-                         'installation-name
-                         (string-append (version)
-                                        "-guix"
-                                        (match (system-type 'gc)
-                                          ['cgc "-cgc"]
-                                          ;; workaround Guile reader/printer:
-                                          ['|3m| "-bc"]
-                                          [_ ""])))]
-             [bin-dir
-              (hash-ref config 'bin-dir)]
-             [config
-              (hash-set* config
-                         'config-tethered-apps-dir (hash-ref config 'apps-dir)
-                         'config-tethered-console-bin-dir bin-dir
-                         'config-tethered-gui-bin-dir bin-dir)]
-             [new-config-pth
-              (build-path prefix config-file-pth)])
-        (make-parent-directory* new-config-pth)
-        (call-with-output-file*
-         new-config-pth
-         (lambda (out)
-           (pretty-write config out))))))))
+     (define-values [parent-layer prefix]
+       (command-line
+        #:once-each
+        [("--extra-foreign-lib-search-dirs") dir-list
+         "foreign library directories, as a list of strings in `read` syntax"
+         (set! extra-foreign-lib-search-dirs
+               (call-with-input-string dir-list read))]
+        #:args (parent-layer prefix)
+        (values parent-layer prefix)))
+     (let* ([config
+             (for/fold
+              ([config (file->value (build-path parent-layer
+                                                config-file-pth))])
+              ([spec (in-list
+                      '((lib-dir lib-search-dirs "lib/racket")
+                        (share-dir share-search-dirs "share/racket")
+                        (links-file
+                         links-search-files
+                         "share/racket/links.rktd")
+                        (pkgs-dir pkgs-search-dirs "share/racket/pkgs")
+                        (bin-dir bin-search-dirs "bin")
+                        (man-dir man-search-dirs "share/man")
+                        (doc-dir doc-search-dirs "share/doc/racket")
+                        (include-dir
+                         include-search-dirs
+                         "include/racket")))])
+              (match-define (list main-key search-key pth) spec)
+              (hash-set*
+               config
+               main-key
+               (build-path-string prefix pth)
+               search-key
+               (list* #f
+                      (hash-ref config
+                                main-key
+                                (build-path-string parent-layer pth))
+                      (filter values (hash-ref config search-key null)))))]
+            [config
+             (hash-update config
+                          'lib-search-dirs
+                          (lambda (dirs)
+                            ;; add after other layers, but before older
+                            ;; foreign lib search directories
+                            (define-values [rkt old-foreign-dirs]
+                              (partition (lambda (pth)
+                                           (or (not pth)
+                                               (regexp-match? rx:racket pth)))
+                                         dirs))
+                            (append rkt
+                                    extra-foreign-lib-search-dirs
+                                    old-foreign-dirs)))]
+            [config
+             (hash-set* config
+                        'apps-dir
+                        (build-path-string prefix "share/applications")
+                        'absolute-installation? #t
+                        ;; Let Guix coexist with other installation
+                        ;; methods without clobbering user-specific packages.
+                        ;; This could be set in various places, but doing
+                        ;; it here is convienient, at least until we support
+                        ;; cross-compilation.
+                        'installation-name
+                        (string-append (version)
+                                       "-guix"
+                                       (match (system-type 'gc)
+                                         ['cgc "-cgc"]
+                                         ;; workaround Guile reader/printer:
+                                         ['|3m| "-bc"]
+                                         [_ ""])))]
+            [bin-dir
+             (hash-ref config 'bin-dir)]
+            [config
+             (hash-set* config
+                        'config-tethered-apps-dir (hash-ref config 'apps-dir)
+                        'config-tethered-console-bin-dir bin-dir
+                        'config-tethered-gui-bin-dir bin-dir)]
+            [new-config-pth
+             (build-path prefix config-file-pth)])
+       (make-parent-directory* new-config-pth)
+       (call-with-output-file*
+        new-config-pth
+        (lambda (out)
+          (pretty-write config out)))))))
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:37:53 2022
Received: from localhost ([127.0.0.1]:56548 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9RZ-0004DN-CI
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:53 -0500
Received: from mail-qt1-f173.google.com ([209.85.160.173]:38482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9RX-0004D9-9S
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:51 -0500
Received: by mail-qt1-f173.google.com with SMTP id bc10so6094742qtb.5
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:51 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=vj1OeT+wQvOME+8TTCd8YZzCrRZyIzC8PkesAdhbaOQ=;
 b=GjOxzcSFzNUrYBdOyi5gbFjwV6wDGWmiF3pAhjh7s1+TNSG60KAe/FEjSn0zwauC7v
 OhrJVchPX/pG+DUU2yLGjePCVrjlvFTjDeQcaITdZyyqvScNAJXoNoQhbPlRQ/JID1uI
 O2r2+ll0b87tlpJz5dnhZg5RW5G0Vaa9PdN0Fo/fW2CTuzuEnMd+20DBGe9o6VJaglOS
 lE8vEVsp3NyKR9rPysy4DMEg0Y4BtAESCR68jn3+vVLV6XTJJ1kdxhxIChzs+i4DV5SX
 ocYD5rOYkR2VbE+UsbWWqd6G6M7WPi2y0LVy5nHNKHRHYg64a+QYAOfKCruBgfGbz+RZ
 J1+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=vj1OeT+wQvOME+8TTCd8YZzCrRZyIzC8PkesAdhbaOQ=;
 b=3c5f5qNAErOUGge02/ASjVZbfmsDk8R6rWcwQu8vpSuS4gJWai4/UQ6BskyQbYFk3F
 bDHISNZmxN3MGr4Zn53WFfHrCyY9HCnKe/xxmdg+MM2l3fFPg/1YWtbZfb8ixDxplyVE
 4VlVHrh1150uOLMEnUFzxU45jq7FJON1XDlGnaa2zNjZX/lkzVQrdHhBIWeVE7sOuk4p
 04trEW0Wscytw8+TqpbzCIU91Z1s+q4Y3KOGAe2Zlh6DnxIISXmYl76lqU72s9nDenBN
 IqVpV9eRCsopAikvMO/a9JM1OVvxfXlqr0h6QK6crxww8vAc8FR558C87K5Fgd5ctPHz
 +hsg==
X-Gm-Message-State: AOAM533vFYWPR8hW8l9+orQg2AP2IPdosaPk+I+hrZeBR1PuJgkAP6EQ
 wN8PbYrmfrrif64wEwB3DhMMBMaAHJk6zqU6nz0=
X-Google-Smtp-Source: ABdhPJwEaxwHWHsIu1WeP9axCTM7zRjerxzmudj3R+vWGUUt03kwuOH6t/MgHRSulSK9P7OIQ6vLNw==
X-Received: by 2002:ac8:7c54:0:b0:2de:746c:bd99 with SMTP id
 o20-20020ac87c54000000b002de746cbd99mr12153099qtv.150.1645929465754; 
 Sat, 26 Feb 2022 18:37:45 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 y11-20020a05622a004b00b002dea2052d7dsm4373851qtw.12.2022.02.26.18.37.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:45 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 08/24] gnu: racket-minimal: Add "debug" output.
Date: Sat, 26 Feb 2022 21:34:34 -0500
Message-Id: <20220227023450.1877215-9-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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(+) [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.173 listed in list.dnswl.org]
 0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
 [209.85.160.173 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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(+) [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.173 listed in list.dnswl.org]
  0.0 RCVD_IN_MSPIKE_H3      RBL: Good reputation (+3)
                             [209.85.160.173 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
  0.0 RCVD_IN_MSPIKE_WL      Mailspike good senders
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (racket-minimal-bc-cgc)[outputs]: Add "debug".
(racket-vm-common-configure-flags): Add "--disable-strip".
---
 gnu/packages/racket.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index ca0c09be58..69c99f5764 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -151,7 +151,8 @@ (define (racket-vm-common-configure-flags)
          (else
           '()))
       ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
-                      #$(file-append bash-minimal "/bin/sh"))))
+                      #$(file-append bash-minimal "/bin/sh"))
+      "--disable-strip"))
 
 (define (make-unpack-nanopass+stex)
   ;; Adapted from chez-scheme.
@@ -190,6 +191,7 @@ (define-public racket-minimal-bc-cgc
        ;; only for BC variants:
        libffi))
      (native-inputs (list libtool)) ;; <- only for BC variants
+     (outputs '("out" "debug"))
      (build-system gnu-build-system)
      (arguments
       (list
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:37:39 2022
Received: from localhost ([127.0.0.1]:56545 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9RK-0004Cq-Oa
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:39 -0500
Received: from mail-qt1-f176.google.com ([209.85.160.176]:40654)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9RJ-0004CW-3h
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:38 -0500
Received: by mail-qt1-f176.google.com with SMTP id t28so6101421qtc.7
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=URmEbdRV5afr0Wl6KJozuWiNZEFz6so5nG8+6QKZKZU=;
 b=HtDjqqUUUQFbowFAMMBCy99xPS5V1mQ8owkm2AV8qITaRFaiYRYlOaDgwzkqzJKvj5
 C2T6OO11rAKM5q5mYjvEJp+5vEIWL9hL5Vr/IWX9wiAspyYuGAqY1LAGct0gJFxMYCuC
 thqJMgZThJTgHbM58QAgLGXwWJ5lAfPEc85pKlMPY02uBqzNEBSm91oOIufWrvtfl1Tl
 AmLww36XHgjn5hdTMTb8gfHAPsFrRvq5yalQbLZxmGPhu7W8LT4jr8ugB6PQREK3uPF0
 d5mbnVm/MRk1R4MOzaE/0CVmp5iwmvrcgq9n3WU4hlKlIoSrlSeQD9FUnvamtk5r4lGH
 FD3w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=URmEbdRV5afr0Wl6KJozuWiNZEFz6so5nG8+6QKZKZU=;
 b=6pR6U8kOPSdEdeZzuM90Wp93XSZIy1pPyePFQw3oC/Kmautojl8zP6TFXCfTsHJHBg
 sgWap9PkfrPNi4R78t2R85ymKOTH7C5dvRUtB80fP7vHlnNEe4tDcSzaWI8TJj4nkH4N
 V+4a9MPKsE3rf6CajdoXJwREoJd1Fi5uWHg2hjq5RN3YlsEL7r8UQde/ntGuSaQrkcYF
 Lu64zrZ7MHDLbvT8fa8IoX+XcBV6+4aU/X9q74mAcYTmVUwr9yIoiJbhas3nWgSwl6zt
 LMz42EMprB7qYaoVrLA6nWm+P9uPVZwDZC27VkuT9vP/cJOSvgIBER6BdYfG6jymNc8v
 blwA==
X-Gm-Message-State: AOAM532QUL68bXzZMmyk9u/PSFGx/ktQGsEwicuKFNUuWm6gN4gomkZ8
 QMRkcQbGbem1M1Q2LAnXK7psJPbZq+TnFKu/N9s=
X-Google-Smtp-Source: ABdhPJwZ0znjb7ewv421jCZVxJwkZbFkLlAOnhP14jJFv8cQkcliDSrG52s7yYTIDAy8fRldNUBtzg==
X-Received: by 2002:ac8:5b56:0:b0:2dd:b428:d2cc with SMTP id
 n22-20020ac85b56000000b002ddb428d2ccmr12225625qtw.304.1645929451411; 
 Sat, 26 Feb 2022 18:37:31 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 v26-20020a05622a189a00b002ddd1f76c2fsm4274384qtc.17.2022.02.26.18.37.26
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:31 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 07/24] gnu: racket-minimal: Adjust indentation.
Date: Sat, 26 Feb 2022 21:34:33 -0500
Message-Id: <20220227023450.1877215-8-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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 + [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.176 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.176 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 + [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.176 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.160.176 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (racket-minimal-bc-cgc): Use 'hidden-package'
rather than 'properties'.
(racket-minimal-bc-3m): Remove redundant 'hidden-package' wrapper.
---
 gnu/packages/racket.scm | 201 ++++++++++++++++++++--------------------
 1 file changed, 100 insertions(+), 101 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 00f4fef49f..ca0c09be58 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -173,84 +173,87 @@ (define (make-unpack-nanopass+stex)
 
 
 (define-public racket-minimal-bc-cgc
-  (package
-    (name "racket-minimal-bc-cgc")
-    (version %racket-version)
-    (source %racket-origin)
-    (inputs
-     (list
-      ;; common to all racket-minimal variants:
-      openssl
-      sqlite
-      bash-minimal ;; <- for `system`
-      ncurses ;; <- for #%terminal
-      ;; only for BC variants:
-      libffi))
-    (native-inputs (list libtool)) ;; <- only for BC variants
-    (build-system gnu-build-system)
-    (arguments
-     (list
-      #:configure-flags
-      #~(cons* "--enable-cgcdefault"
-               #$(racket-vm-common-configure-flags))
-      ;; Tests are in packages like racket-test-core and
-      ;; main-distribution-test that aren't part of the main
-      ;; distribution.
-      #:tests? #f
-      ;; Upstream recommends #:out-of-source?, and it does
-      ;; help with debugging, but it confuses `install-license-files`.
-      #:modules '((ice-9 match)
-                  (ice-9 regex)
-                  (guix build gnu-build-system)
-                  (guix build utils))
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'configure 'initialize-config.rktd
-            (lambda* (#:key inputs #:allow-other-keys)
-              (define (write-racket-hash alist)
-                ;; inside must use dotted pair notation
-                (display "#hash(")
-                (for-each (match-lambda
-                            ((k . v)
-                             (format #t "(~s . ~s)" k v)))
-                          alist)
-                (display ")\n"))
-              (define maybe-release-catalog
-                (let ((v #$(package-version this-package)))
-                  (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)"
-                                    v)
-                      `(,(string-append
-                          "https://download.racket-lang.org/releases/"
-                          v
-                          "/catalog/"))
-                      '())))
-              (mkdir-p "racket/etc")
-              (with-output-to-file "racket/etc/config.rktd"
-                (lambda ()
-                  (write-racket-hash
-                   `((lib-search-dirs
-                      . (#f #$(file-append (this-package-input "openssl") "/lib")
-                            #$(file-append (this-package-input "sqlite") "/lib")))
-                     (build-stamp . "")
-                     (catalogs ,@maybe-release-catalog
-                               #f)))))))
-          (add-before 'configure 'chdir
-            (lambda _
-              (chdir "racket/src")))
-          (add-after 'install 'remove-pkgs-directory
-            ;; If the configured pkgs-dir exists, "pkgs.rktd" does not
-            ;; exist, and a lock file does not exist, commands like
-            ;; `raco pkg show` will try to create a lock file and fail
-            ;; due to the read-only store.
-            ;; Arguably this may be a bug in `pkg/private/lock`:
-            ;; see <https://github.com/racket/racket/issues/3851>.
-            ;; 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 <https://github.com/racket/racket/issues/3851>.
+             ;; 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:37:32 2022
Received: from localhost ([127.0.0.1]:56542 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9R9-0004CQ-L7
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:32 -0500
Received: from mail-qt1-f171.google.com ([209.85.160.171]:33681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9R7-0004CD-2T
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:26 -0500
Received: by mail-qt1-f171.google.com with SMTP id bt3so6088687qtb.0
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=;
 b=OhNvuqmvJMii+fwQAq6EBmkU/fLNPhc/V796bGt8Vjc6wpWvnbuOZ/3z0HBdbIGeUs
 iPbnxSOJXFzdLDnobKYssJSNB0PeeudiAlSz8nvLreOoKwD3D30085W83idVtAdLYJob
 ifrhlaDsfkRISgyO1oMyKo7LjtcA8pIfMVpb4mIE4Iv0pkhb6RFJed7UxunL4CpX508B
 Mad0TdZ0P1YZT5RyuoWBwEMWzCLlAW0gscaNb1R+9Ezk0b14nb+tjgKDCJzfipDXWkYb
 akpUskV8sFPaVO1mBw4qkI5fiGf86daZTMenF6qp+NtZO0m3GAA/mOhQUv/VSB/SLQv5
 q0UA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=csYxz1KLSKiWhLrQOqhP0OIL5gVjxXKbeWBLNdaC9Rg=;
 b=pnR6BPCTOr5FQncfDz4EyuHeb50KM4XqEE6ryX5By4+QnmMd2Jb2FhfskvWDKLlK+G
 qIlWuF/6ihfB4j9tiwVCoADba250m4+yg7B+O4WwyfCoLMc2UsxiRd4h+H+bzIRsBTmY
 wnhoNcOVGM5ymAcJqOI2WjpRiN73Os9GRnq9XtIZdj9AhJFYNKhwhOJhIhNARcm3U7AS
 Vd+rJlKoYWH5Xi9pm9pk1y/jMzqYq+fyAvmIbFN493jdr8zBtObgsBOjHpO9ITZZ9AK7
 bde9FCYDf8RD5sMFMZDnS9fKsKP42DcjilJcDHp6/EJJ7y9qf9KZWOvr6GvfGkoQtOx4
 AoOA==
X-Gm-Message-State: AOAM533GfkG8DykPBKrnNvPBwvMPdZAJI+v2gwFg60LnAwyjNujX4wct
 rEATdL/A1KfortSlOYyOGPcSrjLmIaYyju8iN44=
X-Google-Smtp-Source: ABdhPJwz3SunO7W2AsW7OhmSpZDzGxjGoD2h3dpLCvcjn+r+bfdVCT9NeD/r/cD/RMcVStqeLZxhhw==
X-Received: by 2002:a05:622a:8d:b0:2dd:d979:bc46 with SMTP id
 o13-20020a05622a008d00b002ddd979bc46mr12374086qtw.342.1645929439440; 
 Sat, 26 Feb 2022 18:37:19 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 o21-20020ac85a55000000b002d7847160c0sm4140270qta.82.2022.02.26.18.37.13
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:19 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 06/24] gnu: racket-minimal: Change inheritance to follow
 bootstrapping.
Date: Sat, 26 Feb 2022 21:34:32 -0500
Message-Id: <20220227023450.1877215-7-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.8 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 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 [...] 
 Content analysis details:   (3.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.171 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.171 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: ambrevar.xyz (xyz)]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.8 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  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 [...] 
 
 Content analysis details:   (2.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.160.171 listed in list.dnswl.org]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: ambrevar.xyz (xyz)]
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Having the package inheritance chain go in the same direction as the
bootstrapping chain, rather than the opposite, is less confusing. In
some cases, it can also help to avoid unnecessary rebuilds.

* gnu/packages/racket.scm (racket-minimal-bc-cgc): Change to be the root
of the package inheritance chain.
[version, source, inputs, native-inputs, build-system, arguments,
home-page, license]: Inline formerly inherited values.
(racket-minimal-bc-3m): Inherit from 'racket-minimal-bc-cgc' rather than
'racket-minimal'.
[inputs, native-inputs, arguments, license]: Adjust accordingly.
(racket-minimal): Inherit from 'racket-minimal-bc-3m'.
[inputs, native-inputs, arguments, license]: Adjust accordingly.
[properties]: Override effect of 'hidden-package'.
---
 gnu/packages/racket.scm | 130 +++++++++++++++++++++-------------------
 1 file changed, 67 insertions(+), 63 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index b828bbbd3d..00f4fef49f 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2020, 2021 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright © 2020 Pierre Neidhardt <mail@HIDDEN>
-;;; Copyright © 2021 Philip McGrath <philip@HIDDEN>
+;;; Copyright © 2021, 2022 Philip McGrath <philip@HIDDEN>
 ;;; Copyright © 2021 jgart <jgart@HIDDEN>
 ;;;
 ;;; 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





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:37:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:37:11 2022
Received: from localhost ([127.0.0.1]:56539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Qt-0004Br-AP
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:11 -0500
Received: from mail-qk1-f180.google.com ([209.85.222.180]:40877)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Qs-0004Bf-0q
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:37:10 -0500
Received: by mail-qk1-f180.google.com with SMTP id c7so7809210qka.7
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:37:09 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=qhdWaxK2B/8GZiVT+44S8xPk0GiXuviwUE1ruX+vVGs=;
 b=KHGrq7Eu/kU2aQQ8bVHHmF3rhUXInngPkhvfu582EwI1w1+kmi4Eyc9WCKzYmXPkuG
 lmJJGezU/MraXcnT2a+ufUz/RMFoatkI9IItaYwJXINgqMgLM/LX5NpkMzmcTapxdYjg
 6PGiHoc9N0nDtss7k4Cjw5UKTOVfoXr+Ump1IDJSwOwyA4M5xzYAoiUFHTIY5++/lwU6
 p3MiHWod9IjP20tk+/uNYJTZsi28WFcOOISHs7aN4VpMBU80ofqBna4gtj5YupBJXRX6
 zX+AwB0A/OkzJDcP182gs9kCDwNvREfJFUgjYTTxnjjKcSD6w9oCQuzmXKLu361Zs5iN
 rSiQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=qhdWaxK2B/8GZiVT+44S8xPk0GiXuviwUE1ruX+vVGs=;
 b=AS+/ZR87jzCFmdD4ptQVgDE1nN9Ibom8OUX0tWfrZGOpOikL6Oqh6wrLeXmll/nEui
 YA8+2udFlavR0fR2EI0hHANq5z98apAqaqw630wVhN6Ul6Vp9mBxRz/Aj4RkJK48dWZs
 djR1B+b9CjM7fKHZaCJQYUL77kzWqVc3CZ/VRH6CTCZsI2H/mIQbTxwfGWh0H59QUylU
 nuI9BMuY4h8ZqC0yrSo6YSbnx9YyS+vbz8c3NyA0jSnyM0D+QYNx6DtjIH6GmTAZ8vN5
 HHYm0Um5bZS4eDMdJUkrdElEA1peonTG2KlyT+MPKP/UFmlq+vVR0/wkNCuqffqGVedO
 /Xig==
X-Gm-Message-State: AOAM530LZD7O6jYpHcI7zek47j9hj6bgJwLRPIjyHF9vC06W/N7tFqYE
 a8sjAfwCmxXJbuoadYLk0oJQ2t/tcFRkKk5n3d8=
X-Google-Smtp-Source: ABdhPJxRUlbeRdqLVC7n7lm6BmFwF+mmJpkMViZPc4lQRrJfW7BqaXJoMb1YBhCSG3TPQSQ5ePN5dQ==
X-Received: by 2002:a05:620a:3713:b0:648:d836:8153 with SMTP id
 de19-20020a05620a371300b00648d8368153mr8408824qkb.674.1645929424495; 
 Sat, 26 Feb 2022 18:37:04 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 185-20020a3706c2000000b0060df89eb3ecsm3403593qkg.60.2022.02.26.18.36.56
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:37:04 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 05/24] gnu: racket-minimal: Don't configure non-existant
 catalogs.
Date: Sat, 26 Feb 2022 21:34:31 -0500
Message-Id: <20220227023450.1877215-6-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: * 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.sc [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.180 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.180 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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.sc [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.222.180 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.222.180 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (racket-minimal)[arguments]<#:phases>: Change
'initialize-config.rktd' to only add a release catalog when the package
version is a release version.
---
 gnu/packages/racket.scm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 55fdb28fdd..b828bbbd3d 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -231,6 +231,15 @@ (define (write-racket-hash alist)
                              (format #t "(~s . ~s)" k v)))
                           alist)
                 (display ")\n"))
+              (define maybe-release-catalog
+                (let ((v #$(package-version this-package)))
+                  (if (string-match "^[0-9]+\\.[0-9]+($|\\.[0-8][0-9]*$)"
+                                    v)
+                      `(,(string-append
+                          "https://download.racket-lang.org/releases/"
+                          v
+                          "/catalog/"))
+                      '())))
               (mkdir-p "racket/etc")
               (with-output-to-file "racket/etc/config.rktd"
                 (lambda ()
@@ -239,12 +248,8 @@ (define (write-racket-hash alist)
                       . (#f #$(file-append (this-package-input "openssl") "/lib")
                             #$(file-append (this-package-input "sqlite") "/lib")))
                      (build-stamp . "")
-                     (catalogs
-                      . (,(string-append
-                           "https://download.racket-lang.org/releases/"
-                           #$(package-version this-package)
-                           "/catalog/")
-                         #f))))))))
+                     (catalogs ,@maybe-release-catalog
+                               #f)))))))
           (add-before 'configure 'chdir
             (lambda _
               (chdir "racket/src")))
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:36:56 2022
Received: from localhost ([127.0.0.1]:56532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Qd-0004AX-Ea
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:56 -0500
Received: from mail-qv1-f51.google.com ([209.85.219.51]:38622)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Qa-0004AH-T3
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:53 -0500
Received: by mail-qv1-f51.google.com with SMTP id d3so9828299qvb.5
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=kh4rfDLnITEVr2rk6e8MVsWsEJkJF3STyUL0fXwg1Mk=;
 b=Jp5HS3c678j2SyVn45bapL0v8cgEg8kwvBZDFbvsiTH4X6lCUCfDr98pn3n6Mi1HUE
 kjHh1d9zX/J4r7FgziqGwLKME1/rR5bRJs+5Gc7yf6yg8bBdN0dCWge40DG+vVYLcDG0
 MIhF+d8M+Sm2bLeImjl+SpjJMfkKkeeP592b7VBxDuajAuEisIBFGykyd2kSyLZ5tqNE
 cT6uteqG+H+z/0+QTv+rxDHzFxd847qMHjtZCwJcEmcyuCnKQKLP4hbcBVwcFM9WdBJA
 wiOlAGgNi9FNi/Lty+LJtXikKlELVDsQ4LcbgXDhGZy+mA6ahNDSHtDDobxJ4NJytwDT
 oIag==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=kh4rfDLnITEVr2rk6e8MVsWsEJkJF3STyUL0fXwg1Mk=;
 b=7qGx1VbjQFi9V5Z5J/uWIFfR7x+vk7w/8Q+ltXjBTz/j8oAzrmU5OiTEn7NCyNB99d
 BW121nQ6wriQFhqY+41FIwEAzt14pmtYKO31TR4jOtiHwKc5l4s0CCu2KIWwSX2bKYFn
 h15CynZjfNJt+jt+bwIqLfSCy3oXFxeT9kSjLwcTu6eOCsKYR1wM8/fGihBdADm4aY5g
 fSfmaVLhmaVzCFjO+Y9AGgFfeOCsVAfrwjMbbSqrWGRYUyxtnuuJ/MIsnxOlBKa+IUXd
 AL6Vdm6RSbBPy2wyBzMF0oKreGV8qxXjIm0q8YifnUeZD3NZ2tzlze9ZfixvGX9Z4Zc7
 fh8Q==
X-Gm-Message-State: AOAM530KOooRgmbS3ByPD9nsbj6RPk7bi47fwAfuAo3NMlkQ+xEusYmo
 jL3fCK3kM2ND8N3kS+3ZWOC5imYuTcqGN0FZBJI=
X-Google-Smtp-Source: ABdhPJyThIa7HoIHhSwqsTMhZxKSGaDM5KwujwvDdnEVWidsHqw+eA5hlgZj78yxQ1uD2auX9UQCKA==
X-Received: by 2002:a05:6214:d4c:b0:432:c2db:ebe3 with SMTP id
 12-20020a0562140d4c00b00432c2dbebe3mr6358549qvr.115.1645929407039; 
 Sat, 26 Feb 2022 18:36:47 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 g2-20020a37e202000000b00607e264a208sm3208672qki.40.2022.02.26.18.36.39
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:36:46 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 04/24] gnu: racket-minimal: Use new package style.
Date: Sat, 26 Feb 2022 21:34:30 -0500
Message-Id: <20220227023450.1877215-5-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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. (unpac [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.51 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.51 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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. (unpac [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.51 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.51 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/racket.scm (cfg-flag:sh-for-rktio, cfg-flag:enable-lt,
cfg-glag:enable-racket): Change to G-expressions and combine in ...
(racket-vm-common-configure-flags): ... this new thunk.
(unpack-nanopass+stex): Change to G-expression and move to ...
(make-unpack-nanopass+stex): ... this new thunk.
(racket-bootstrap-chez-bootfiles): Rename to ...
(chez-scheme-for-racket-bootstrap-bootfiles): ... this new variable, and
stop inheriting from 'racket-minimal'.
[native-inputs]: Remove labels.
[build-system]: Use 'copy-build-system'.
[arguments]: Use G-expressions. Install under "lib".
(racket-minimal)[inputs, native-inputs]: Remove labels.
[arguments]: Use G-expressions. Avoid 'assoc-ref'. Adapt to changes in
'chez-scheme-for-racket-bootstrap-bootfiles'.
(racket-minimal-bc-3m)[native-inputs]: Remove labels.
[arguments]: Use G-expressions.
(racket-minimal-bc-cgc)[native-inputs]: Remove labels.
[arguments]: Use G-expressions.
---
 gnu/packages/racket.scm | 332 ++++++++++++++++++++--------------------
 1 file changed, 163 insertions(+), 169 deletions(-)

diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index c4e5ee1311..55fdb28fdd 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages racket)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix gexp)
+  #:use-module (guix build-system copy)
   #:use-module (guix build-system gnu)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-26)
@@ -99,7 +100,7 @@ (define-module (gnu packages racket)
 ;; Code:
 
 (define %racket-version "8.4")
-;; ^ Remember to update racket-bootstrap-chez-bootfiles!
+;; ^ Remember to update chez-scheme-for-racket-bootstrap-bootfiles!
 (define %racket-commit
   (string-append "v" %racket-version))
 (define %racket-origin
@@ -133,34 +134,42 @@ (define %racket-origin
          ;; Unbundle libffi.
          (delete-file-recursively "racket/src/bc/foreign/libffi")))))
 
-(define cfg-flag:sh-for-rktio
-  `(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
-                  (assoc-ref %build-inputs "sh")
-                  "/bin/sh"))
-(define cfg-flag:enable-lt
-  `(string-append "--enable-lt="
-                  (assoc-ref %build-inputs "libtool")
-                  "/bin/libtool"))
-(define cfg-flag:enable-racket
-  `(let ((racket (assoc-ref %build-inputs "racket")))
-     (string-append "--enable-racket="
-                    racket
-                    "/bin/racket")))
+(define (racket-vm-common-configure-flags)
+  ;; under a lambda abstraction to avoid evaluating bash-minimal too early.
+  #~`(,@(cond
+         ((false-if-exception
+           (search-input-file %build-inputs "/bin/libtool"))
+          => (lambda (libtool)
+               (list (string-append "--enable-lt=" libtool))))
+         (else
+          '()))
+      ,@(cond
+         ((false-if-exception
+           (search-input-file %build-inputs "/bin/racket"))
+          => (lambda (racket)
+               (list (string-append "--enable-racket=" racket))))
+         (else
+          '()))
+      ,(string-append "CPPFLAGS=-DGUIX_RKTIO_PATCH_BIN_SH="
+                      #$(file-append bash-minimal "/bin/sh"))))
 
-(define unpack-nanopass+stex
-  ;; Copied from chez-scheme.
-  ;; TODO: Eventually, we should refactor Chez Scheme
-  ;; enough to share more directly, so that we can make
-  ;; Racket's version of Chez avalable as a Guix package,
-  ;; e.g. for architectures not supported upstream.
-  ;; For now, we let Racket drive the Chez build process
-  ;; other than this step.
-  `(for-each (lambda (dep)
-               (define src
-                 (assoc-ref (or native-inputs inputs) dep))
-               (copy-recursively src dep
-                                 #:keep-mtime? #t))
-             '("nanopass" "stex")))
+(define (make-unpack-nanopass+stex)
+  ;; Adapted from chez-scheme.
+  ;; Thunked to avoid evaluating 'chez-scheme' too early.
+  ;; TODO: Refactor enough to share this directly.
+  #~(begin
+      (copy-recursively
+       #$(match (assoc-ref (package-native-inputs chez-scheme)
+                           "nanopass")
+           ((src)
+            src))
+       "nanopass"
+       #:keep-mtime? #t)
+      (mkdir-p "stex")
+      (with-output-to-file "stex/Mf-stex"
+        (lambda ()
+          ;; otherwise, it will try to download submodules
+          (display "# to placate ../configure")))))
 
 
 (define-public racket-minimal
@@ -169,91 +178,87 @@ (define-public racket-minimal
     (version %racket-version)
     (source %racket-origin)
     (inputs
-     `(;; common to all racket-minimal variants:
-       ("openssl" ,openssl)
-       ("sqlite" ,sqlite)
-       ("sh" ,bash-minimal) ;; <- for `system`
-       ("ncurses" ,ncurses) ;; <- for #%terminal
-       ;; only for CS
-       ("zlib" ,zlib)
-       ("lz4" ,lz4)))
+     (list
+      ;; common to all racket-minimal variants:
+      openssl
+      sqlite
+      bash-minimal ;; <- for `system`
+      ncurses ;; <- for #%terminal
+      ;; only for CS
+      zlib
+      lz4))
     (native-inputs
-     `(("bootfiles" ,racket-bootstrap-chez-bootfiles)
-       ,@(package-native-inputs racket-bootstrap-chez-bootfiles)))
+     (list chez-scheme-for-racket-bootstrap-bootfiles
+           racket-minimal-bc-3m))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags
-       (list "--enable-csonly"
-             "--enable-libz"
-             "--enable-liblz4"
-             ,cfg-flag:enable-racket
-             ,cfg-flag:sh-for-rktio)
-       #:out-of-source? #true
-       ;; Tests are in packages like racket-test-core and
-       ;; main-distribution-test that aren't part of the main distribution.
-       #:tests? #f
-       #:modules ((ice-9 match)
+     (list
+      #:configure-flags
+      #~(cons* "--enable-csonly"
+               "--enable-libz"
+               "--enable-lz4"
+               #$(racket-vm-common-configure-flags))
+      ;; Tests are in packages like racket-test-core and
+      ;; main-distribution-test that aren't part of the main
+      ;; distribution.
+      #:tests? #f
+      ;; Upstream recommends #:out-of-source?, and it does
+      ;; help with debugging, but it confuses `install-license-files`.
+      #:modules '((ice-9 match)
+                  (ice-9 regex)
                   (guix build gnu-build-system)
                   (guix build utils))
-       #:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'unpack-nanopass+stex
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             (with-directory-excursion "racket/src/ChezScheme"
-               ,unpack-nanopass+stex)
-             #t))
-         (add-after 'unpack-nanopass+stex 'unpack-bootfiles
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion "racket/src/ChezScheme"
-               (copy-recursively
-                (string-append (assoc-ref inputs "bootfiles") "/boot")
-                "boot"))
-             #t))
-         (add-before 'configure 'initialize-config.rktd
-           (lambda* (#:key inputs #:allow-other-keys)
-             (define (write-racket-hash alist)
-               ;; inside must use dotted pair notation
-               (display "#hash(")
-               (for-each (match-lambda
-                           ((k . v)
-                            (format #t "(~s . ~s)" k v)))
-                         alist)
-               (display ")\n"))
-             (mkdir-p "racket/etc")
-             (with-output-to-file "racket/etc/config.rktd"
-               (lambda ()
-                 (write-racket-hash
-                  `((lib-search-dirs
-                     . (#f ,@(map (lambda (lib)
-                                    (string-append (assoc-ref inputs lib)
-                                                   "/lib"))
-                                  '("openssl"
-                                    "sqlite"))))
-                    (build-stamp . "")
-                    (catalogs
-                     . (,(string-append
-                          "https://download.racket-lang.org/releases/"
-                          ,version
-                          "/catalog/")
-                        #f))))))
-             #t))
-         (add-before 'configure 'change-directory
-           (lambda _
-             (chdir "racket/src")
-             #t))
-         (add-after 'install 'remove-pkgs-directory
-           ;; If the configured pkgs-dir exists, "pkgs.rktd" does not
-           ;; exist, and a lock file does not exist, commands like
-           ;; `raco pkg show` will try to create a lock file and fail
-           ;; due to the read-only store.
-           ;; Arguably this may be a bug in `pkg/private/lock`:
-           ;; see <https://github.com/racket/racket/issues/3851>.
-           ;; 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 <https://github.com/racket/racket/issues/3851>.
+            ;; As a workaround, remove the directory.
+            (lambda args
+              ;; rmdir because we want an error if it isn't empty
+              (rmdir (string-append #$output "/share/racket/pkgs")))))))
     (home-page "https://racket-lang.org")
     (synopsis "Racket without bundled packages such as DrRacket")
     (description
@@ -269,7 +274,6 @@ (define (write-racket-hash alist)
     ;; The LGPL components are only used by Racket BC.
     (license (list license:asl2.0 license:expat))))
 
-
 (define-public racket-minimal-bc-3m
   (hidden-package
    (package
@@ -280,21 +284,19 @@ (define-public racket-minimal-bc-3m
         (prepend libffi) ;; <- only for BC variants
         (delete "zlib" "lz4")))
      (native-inputs
-      `(("libtool" ,libtool)
-        ("racket" ,(if (%current-target-system)
-                       racket-minimal
-                       racket-minimal-bc-cgc))))
+      (list libtool
+            (if (%current-target-system)
+                racket-minimal
+                racket-minimal-bc-cgc)))
      (arguments
       (substitute-keyword-arguments (package-arguments racket-minimal)
         ((#:configure-flags _ '())
-         `(list "--enable-bconly"
-                ,cfg-flag:enable-racket
-                ,cfg-flag:enable-lt
-                ,cfg-flag:sh-for-rktio))
-        ((#:phases usual-phases)
-         `(modify-phases ,usual-phases
-            (delete 'unpack-nanopass+stex)
-            (delete 'unpack-bootfiles)))))
+         #~(cons "--enable-bconly"
+                 #$(racket-vm-common-configure-flags)))
+        ((#:phases cs-phases)
+         #~(modify-phases #$cs-phases
+             (delete 'unpack-nanopass+stex)
+             (delete 'unpack-bootfiles)))))
      (synopsis "Minimal Racket with the BC [3M] runtime system")
      (description "The Racket BC (``before Chez'' or ``bytecode'')
 implementation was the default before Racket 8.0.  It uses a compiler written
@@ -309,19 +311,16 @@ (define-public racket-minimal-bc-3m
      ;; The LGPL components are only used by Racket BC.
      (license (list license:lgpl3+ license:asl2.0 license:expat)))))
 
-
 (define-public racket-minimal-bc-cgc
   (package
     (inherit racket-minimal-bc-3m)
     (name "racket-minimal-bc-cgc")
-    (native-inputs
-     (alist-delete "racket" (package-native-inputs racket-minimal-bc-3m)))
+    (native-inputs (list libtool))
     (arguments
      (substitute-keyword-arguments (package-arguments racket-minimal-bc-3m)
        ((#:configure-flags _ '())
-        `(list "--enable-cgcdefault"
-               ,cfg-flag:enable-lt
-               ,cfg-flag:sh-for-rktio))))
+        #~(cons "--enable-cgcdefault"
+                #$(racket-vm-common-configure-flags)))))
     (synopsis "Old Racket implementation used for bootstrapping")
     (description "This variant of the Racket BC (``before Chez'' or
 ``bytecode'') implementation is not recommended for general use.  It uses
@@ -334,47 +333,42 @@ (define-public racket-minimal-bc-cgc
 also be used for embedding applications without the annotations needed in C
 code to use the 3M garbage collector.")))
 
-
-(define-public racket-bootstrap-chez-bootfiles
-  (hidden-package
-   (package
-     (inherit racket-minimal)
-     (name "racket-bootstrap-chez-bootfiles")
-     (version "9.5.7.3")
-     ;; The version should match `(scheme-fork-version-number)`.
-     ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
-     ;; It will always be different than the upstream version!
-     ;; When updating, remember to also update %racket-version in racket.scm.
-     (inputs `())
-     (native-inputs
-      `(("racket" ,(if (%current-target-system)
-                       racket-minimal
-                       racket-minimal-bc-3m))
-        ("stex" ,@(assoc-ref (package-native-inputs chez-scheme) "stex"))
-        ("nanopass" ,@(assoc-ref (package-native-inputs chez-scheme)
-                                 "nanopass"))))
-     (arguments
-      `(#:phases
-        (modify-phases %standard-phases
-          (add-after 'unpack 'unpack-nanopass+stex
-            (lambda* (#:key inputs native-inputs #:allow-other-keys)
-              (with-directory-excursion "racket/src/ChezScheme"
-                ,unpack-nanopass+stex)
-              #t))
-          (delete 'configure)
-          (delete 'patch-generated-file-shebangs)
-          (replace 'build
-            (lambda* (#:key inputs outputs #:allow-other-keys)
-              (with-directory-excursion "racket/src/ChezScheme"
-                (invoke (string-append (assoc-ref inputs "racket")
-                                       "/bin/racket")
-                        "rktboot/main.rkt"
-                        "--dest" (assoc-ref outputs "out")))
-              #t))
-          (delete 'check)
-          (delete 'install))))
-     (synopsis "Chez Scheme bootfiles bootstrapped by Racket")
-     (description "Chez Scheme is a self-hosting compiler: building it
+(define-public chez-scheme-for-racket-bootstrap-bootfiles
+  (package
+    (name "chez-scheme-for-racket-bootstrap-bootfiles")
+    (version "9.5.7.3")
+    ;; The version should match `(scheme-fork-version-number)`.
+    ;; See racket/src/ChezScheme/s/cmacros.ss c. line 360.
+    ;; It will always be different than the upstream version!
+    ;; When updating, remember to also update %racket-version in racket.scm.
+    (source %racket-origin)
+    (inputs `())
+    (native-inputs (list racket-minimal-bc-3m))
+    (build-system copy-build-system)
+    ;; TODO: cross compilation
+    (arguments
+     (list
+      #:install-plan
+      #~`(("boot/" "lib/chez-scheme-bootfiles"))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'chdir
+            (lambda args
+              (chdir "racket/src/ChezScheme")))
+          (add-after 'chdir 'unpack-nanopass+stex
+            (lambda args
+              #$(make-unpack-nanopass+stex)))
+          (add-before 'install 'build
+            (lambda* (#:key native-inputs inputs #:allow-other-keys)
+              (invoke (search-input-file (or native-inputs inputs)
+                                         "/bin/racket")
+                      "rktboot/main.rkt"))))))
+    (home-page "https://github.com/racket/ChezScheme")
+    ;; ^ This is downstream of https://github.com/racket/racket,
+    ;; but it's designed to be a friendly landing place for people
+    ;; who want a ChezScheme-shaped repositroy.
+    (synopsis "Chez Scheme bootfiles bootstrapped by Racket")
+    (description "Chez Scheme is a self-hosting compiler: building it
 requires ``bootfiles'' containing the Scheme-implemented portions compiled for
 the current platform.  (Chez can then cross-compile bootfiles for all other
 supported platforms.)
@@ -389,7 +383,7 @@ (define-public racket-bootstrap-chez-bootfiles
 Note that the generated bootfiles are specific to Racket's fork of Chez
 Scheme, and @code{cs-bootstrap} does not currently support building upstream
 Chez Scheme.")
-     (license (list license:asl2.0)))))
+    (license (list license:asl2.0))))
 
 (define (racket-packages-origin name origin spec0 . spec*)
   "Extract from ORIGIN the sources for the Racket packages specified by SPEC0
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:36:45 2022
Received: from localhost ([127.0.0.1]:56529 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9QN-00049z-0U
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:45 -0500
Received: from mail-qt1-f171.google.com ([209.85.160.171]:33651)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9QK-00049f-KJ
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:38 -0500
Received: by mail-qt1-f171.google.com with SMTP id bt3so6087878qtb.0
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=P8SOnIgvEN/0r3Bf4tS0jhH2DUB199lAJxBXeywbOYA=;
 b=QNzIQ6xrG0BCSr6/2YJFKMaibAV54UNhUzHaeih3zScK3qLjjjwLK/N9KQfu9AIU3t
 X+HvOJrQJTlhE0Bg+zUPbyP8kO9J6v8sDYHlqiRYlBe6Ld0UfkFsPHu60Ow9g1/bQOfu
 +JY0pX9ssksbZ2DAtT8nBAHvMb09iZ68FmPc2BmV+wH4k/Vq3l4KDfuhb5NNm64tQEC2
 8xP0BLorbcBmemGzsJC5Xjbzn8B0n5A0u2Kq0ABknH6Iv9U4QTohZWAvzxL0vIxYwrgU
 JaMFwSsdpx6baK0LYxCSOGaWVA1yusTjqPGgn0vkbExmyXK2ld34Y+1nIB5hLXWUQfIX
 Hx1A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=P8SOnIgvEN/0r3Bf4tS0jhH2DUB199lAJxBXeywbOYA=;
 b=PDCKKi4qfVpmqbwmj2s8mr6K19GfMXM38neJETcZwuQJCe25vFCoF7zWVxTm5tcBg4
 Do3eulkSx1a8IANcZQKtw6nj/cy0XeivqbIGkAswgpc1toz3Z85zY/g7sNFRUmhK13Z+
 EIMyiqt6k40tmSwRCvKYwgzdwUu0fQ6XfK1hVbotOKZqCWuwKip/lRcMrXhMIKahzsea
 zwCI6H1tqQ43Ur3nHjBx18IUZkJE1wrh2ufb4S61c6T33XGk3By5ywr8HK/c2gXRoxMw
 NBPeBo5VNw+MHB+bqa9hWkjXfPt9sSXq8iXfmsOe5eaPqBy2zXro29mOWENMCHNlHgSK
 9IOA==
X-Gm-Message-State: AOAM530s45ZTg/C32scISSND8Q4aw+BUJV8WVXSXEQYGcdUT43+1PM24
 XFV9KcH+/d4P5x15YbmdmvJYw3UC7wYHwqn/fz4=
X-Google-Smtp-Source: ABdhPJykVMOsCAmUVcMcO+Sd0rWRBW3Bvrtrz0W6hq0lW2MxNYFFgPwkcRU70VnhApfxuCheLs3KgQ==
X-Received: by 2002:a05:622a:314:b0:2de:766:edf4 with SMTP id
 q20-20020a05622a031400b002de0766edf4mr12197949qtw.651.1645929390584; 
 Sat, 26 Feb 2022 18:36:30 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 20-20020ac84e94000000b002de8f564305sm4561744qtp.1.2022.02.26.18.36.25
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:36:30 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 03/24] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 21:34:29 -0500
Message-Id: <20220227023450.1877215-4-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details. Content preview: *
 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 ... [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.160.171 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.160.171 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 ... [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* gnu/packages/patches/racket-gui-tethered-launcher-backport.patch:
Adjust path.
* gnu/packages/racket.scm (racket-packages-origin,
simple-racket-origin): New procedures.
(extend-layer): Rename to ...
(configure-layer.rkt): ... this variable. Tweak command-line
arguments. Adapt to 'config-tethered-apps-dir'.
(racket): Stop inheriting from 'racket-minimal'.
[version]: Use '%racket-version'.
[source]: Stop using bundled tarball.
[inputs]: Remove labels. Add 'racket-minimal' and package sources.
[native-inputs]: Remove, since cross-compilation doesn't work yet.
[arguments]: Rewrite to use G-expressions, package sources from
'inputs', an explicit 'install' phase, and the revised
'configure-layer.rkt'.
---
 ...acket-gui-tethered-launcher-backport.patch |   6 +-
 gnu/packages/racket.scm                       | 714 +++++++++++++-----
 2 files changed, 539 insertions(+), 181 deletions(-)

diff --git a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch
index abf253486f..1e018eaa79 100644
--- a/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch
+++ b/gnu/packages/patches/racket-gui-tethered-launcher-backport.patch
@@ -7,13 +7,13 @@ Related to racket/racket#4133
 
 (cherry picked from commit 563c68432f127729592f234ef30c31e92618b517)
 ---
- share/pkgs/gui-lib/mred/installer.rkt | 3 ++-
+ gui-lib/mred/installer.rkt | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/gui-lib/mred/installer.rkt b/gui-lib/mred/installer.rkt
 index b1691472..9ef06c53 100644
---- a/share/pkgs/gui-lib/mred/installer.rkt
-+++ b/share/pkgs/gui-lib/mred/installer.rkt
+--- a/gui-lib/mred/installer.rkt
++++ b/gui-lib/mred/installer.rkt
 @@ -72,4 +72,5 @@
     (list "-A" (path->string (find-system-path 'addon-dir)))))
  
diff --git a/gnu/packages/racket.scm b/gnu/packages/racket.scm
index 00ec587eeb..c4e5ee1311 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -28,7 +28,9 @@ (define-module (gnu packages racket)
   #:use-module (guix gexp)
   #:use-module (guix build-system gnu)
   #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 exceptions)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages bash)
@@ -389,172 +391,504 @@ (define-public racket-bootstrap-chez-bootfiles
 Chez Scheme.")
      (license (list license:asl2.0)))))
 
+(define (racket-packages-origin name origin spec0 . spec*)
+  "Extract from ORIGIN the sources for the Racket packages specified by SPEC0
+and any additional arguments SPEC*.  In the resulting file-like object, each
+package's source will be in the directory \"/share/racket/pkgs/PKG/\", where
+PKG is the Racket name for the package.  The NAME will be used in the store
+file name for the resulting file-like object.
 
-(define %installer-mirrors
-  ;; Source:
-  ;; https://github.com/racket/racket-lang-org/blob/master/download/data.rkt#L58
-  ;; Matthew Flatt says: "note that many are commented out"
-  ;; INVARIANT: End with a trailing "/"!
-  '("https://mirror.racket-lang.org/installers/"
-    "https://www.cs.utah.edu/plt/installers/"
-    "https://plt.cs.northwestern.edu/racket-mirror/"
-    "https://mirror.csclub.uwaterloo.ca/racket/racket-installers/"
-    ;; Universität Tübingen is using a self-signed HTTPS certificate:
-    "http://mirror.informatik.uni-tuebingen.de/mirror/racket/"
-    "https://racket.infogroep.be/"
-    ))
+A package specification is a list of the form:
 
-(define %main-repo-main-distribution-pkgs
-  ;; These are the packages developed in the main Racket Git repository
-  ;; that are part of the main distribution.
-  '("at-exp-lib"
-    "base"
-    "compiler-lib"
-    ;; NOT "compiler-test"
-    "compiler"
-    "net-doc"
-    "net-lib"
-    ;; NOT "net-test"
-    "net"
-    ;; NOT "plt-services"
-    ;; NOT "racket-benchmarks"
-    ;; NOT "racket-build-guide"
-    "racket-doc"
-    "racket-index"
-    "racket-lib"
-    ;; NOT "racket-test-core"
-    ;; NOT "racket-test-extra"
-    ;; NOT "racket-test"
-    "zo-lib"))
+  (PKG PATH)
 
+where PATH is the path to the package source relative to ORIGIN---possibly
+\".\".  As a special case, a package specification may also be a string, which
+is equivalent to:
+
+  (PKG PKG)
+
+Examples:
+
+- \"expeditor\"
+- (\"main-distribution\" \".\")
+- (\"racket-lib\" \"pkgs/racket-lib\")"
+  (computed-file
+   (string-append "racket-pkg-" name "-sources")
+   (with-imported-modules `((guix build utils))
+     #~(begin
+         (use-modules (guix build utils))
+         (mkdir-p (string-append #$output "/share/racket/pkgs"))
+         (chdir (string-append #$output "/share/racket/pkgs"))
+         #$@(map (match-lambda
+                   ((? string? name)
+                    #~(copy-recursively #$(file-append origin (string-append "/" name))
+                                        #$name))
+                   ((name ".")
+                    #~(copy-recursively #$origin #$name))
+                   ((name path)
+                    #~(copy-recursively #$(file-append origin (string-append "/" path))
+                                        #$name)))
+                 (cons spec0 spec*))))))
+
+(define (simple-racket-origin repo hash spec0 . spec*)
+  "Like 'racket-packages-origin', but specialized for packages hosted at
+\"https://github.com/racket/REPO\" with sha256 checksum HASH.  REPO is also
+used to build the name of the resulting store item."
+  (apply racket-packages-origin
+         repo
+         (origin
+           (method git-fetch)
+           (uri (git-reference
+                 (url (format #f "https://github.com/racket/~a" repo))
+                 (commit %racket-commit)))
+           (sha256 hash)
+           (file-name (git-file-name (string-append "racket-" repo)
+                                     %racket-version)))
+         spec0
+         spec*))
 
 (define-public racket
   (package
-    (inherit racket-minimal)
     (name "racket")
     (version %racket-version)
-    (source
-     (origin
-       (method url-fetch)
-       (uri (map (lambda (base)
-                   (string-append base version "/racket-src.tgz"))
-                 %installer-mirrors))
-       (sha256
-        (base32
-         "0dsv7br85nvh5gjfihznq9jb1dzas0f6gnv5qwc9zmb7yn75nrp5"))
-       (patches
-        ;; remove in Racket 8.5
-        ;; see https://github.com/racket/racket/issues/4133
-        (search-patches "racket-gui-tethered-launcher-backport.patch"))
-       (snippet
-        #~(begin
-            (use-modules (guix build utils)
-                         (ice-9 match)
-                         (ice-9 regex))
-            ;; unbundle minimal Racket
-            (for-each delete-file-recursively
-                      '("collects"
-                        "doc"
-                        "etc"
-                        "README"
-                        "src"))
-            ;; unbundle package sources included elsewhere
-            (with-directory-excursion "share/pkgs"
-              (for-each delete-file-recursively
-                        '#+%main-repo-main-distribution-pkgs))
-            ;; Minimal workaround for FSDG issue:
-            ;; see <https://github.com/racket/srfi/pull/15>.
-            ;; 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 <https://github.com/racket/srfi/pull/15>.
+                      (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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:36:37 2022
Received: from localhost ([127.0.0.1]:56526 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9QA-00049Y-E9
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:36 -0500
Received: from mail-qk1-f177.google.com ([209.85.222.177]:39765)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Q5-00049F-Kq
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:25 -0500
Received: by mail-qk1-f177.google.com with SMTP id t21so7814228qkg.6
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=z0pcZSlzKw/cUO7uj/U8mdQ+2/FnmZU2cO/RKK1LnLk=;
 b=Wa35XZjEZem08focqe0Ut7w/dEkavHRD/sRPtIo3CeKYX90fJXNlVjeiehdDVaaGyv
 4CxgwfaK4T8Ndsfwb1WiDOF9C1DyUz7gZ2EpbthTVQ9LAKvn02WdPQerauWK+6NDwsaw
 GKAhjHuM0J+X9Xyfz7qCWiBGJkY9os2QeiDG9k2LEdXEfTOypo4J5Rwzxdl+GQ9bsZRp
 nKi9pFJ9czk4qNA1nLnK4+544r6f4SgUEvFKW8BpCsxJst0k16WgRF+Lzk/3hjuUchRt
 ljE51ZaZNmqbE3mJWOCcXXqbu5qRbIF+6/qgSpB7QNdFD7ihYASU8cp6+OJDXU5kBChZ
 vLYw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=z0pcZSlzKw/cUO7uj/U8mdQ+2/FnmZU2cO/RKK1LnLk=;
 b=Eln86fAz7m+YtwfZXsGo3IjkVWwEL2nZep9EgQHabnO9Kn8m3V6Ar0K7rgeEt30LR4
 oM7s5b0owdeiXfzZ8lpjPUWupTvilNq3pSrm6W36PoiHp1ACdURzwYbCvYpi9gA6F9xT
 ipYpDKWMyST2fTfWOWazYu97Ac4amjthN4DQ54hQSWqgFrittIZzsRRh/cUc09RsBUzI
 rJDJmcSdd8xN9cW4i/sn2oOziu7twNHw3Okh4StoPYdfh1zhjr9Aiaf5k015zLUeJtqz
 079yiEb6/8CQadsmVCHqmTPHkpjPUgSCQTbPI2S5f18imdWupCrk+WmV/oEN3BflBKZk
 si9A==
X-Gm-Message-State: AOAM530HMWAhQaRZzzNlxHk/2Vk6Z2szhXDmRjJ0WsouMvJzNdz1MbXf
 teVpJUN218cTqgc3Z5hBCkDflyCw31dXbZD7oms=
X-Google-Smtp-Source: ABdhPJz8sqXUcvQiDISwbnTVOQlVfP+JMnvgzWygB25fVHy9t7OPdnK9EtzL2k5JzE8zY3WcR590YA==
X-Received: by 2002:a05:620a:2981:b0:649:68a4:e4ea with SMTP id
 r1-20020a05620a298100b0064968a4e4eamr7672506qkp.462.1645929375445; 
 Sat, 26 Feb 2022 18:36:15 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 v26-20020a05620a0a9a00b00605c6dbe40asm3167325qkg.87.2022.02.26.18.36.10
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:36:15 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 02/24] gnu: racket: Update to 8.4.
Date: Sat, 26 Feb 2022 21:34:28 -0500
Message-Id: <20220227023450.1877215-3-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 3.8 (+++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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/ra [...] 
 Content analysis details:   (3.8 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.222.177 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.222.177 listed in wl.mailspike.net]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
 [URI: liltechdude.xyz (xyz)]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 2.8 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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/ra [...] 
 
 Content analysis details:   (2.8 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.6 PDS_OTHER_BAD_TLD      Untrustworthy TLDs
                             [URI: liltechdude.xyz (xyz)]
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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.
<patches>: Use "racket-gui-tethered-launcher-backport.patch".
<snippet>: 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 <monego@HIDDEN>
 # Copyright © 2021 Björn Höfling <bjoern.hoefling@HIDDEN>
 # Copyright © 2021 Greg Hogan <code@HIDDEN>
-# Copyright © 2021 Philip McGrath <philip@HIDDEN>
+# Copyright © 2021, 2022 Philip McGrath <philip@HIDDEN>
 # Copyright © 2021 Arun Isaac <arunisaac@HIDDEN>
 # Copyright © 2021 Sharlatan Hellseher <sharlatanus@HIDDEN>
 # Copyright © 2021 Dmitry Polyakov <polyakov@HIDDEN>
@@ -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 <mflatt@HIDDEN>
+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>             prefix tool (compiler, linker, ...) names"
+   echo "  --[no]gzip-man-pages              compress manual pages ($gzipmanpages)"
+   echo "  --workarea=<pathname>             build directory ($w)"
++  echo "  --force                           configure even without boot files"
+   echo "  CC=<C compiler>                   C compiler"
+   echo "  CPPFLAGS=<C preprocessor flags>   C preprocessor flags"
+   echo "  CFLAGS=<C compiler flags>         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="<machine type>"
+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 <mflatt@HIDDEN>
+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)
++
+ # <machine>.bootquick to build boot files for <machine>
+ # 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-<host "scheme.boot" or when "make-boot.rkt" touchs dummy boot files
++XPATCH_DEPS_built = $(SCHEME_HOST_WORKAREA)/$(MACH)/boot/$(MACH)/scheme.boot \
++                    $(SCHEME_WORKAREA)/boot/$(TARGET_MACH)/scheme.boot
++XPATCH_DEPS_existing = 
++XPATCH_DEPS = $(XPATCH_DEPS@USE_SCHEME_MODE@)
+ 
+-$(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch: $(XPATCH_DEPS)
++$(XPATCH_FILE): $(XPATCH_DEPS)
+ 	$(MAKE) bounce TARGET=build-xpatch-using-host
+ 
+ build-xpatch-using-host:
+ 	cd $(SCHEME_WORKAREA)/$(TARGET_MACH)/s && $(MAKE) -f Mf-cross m=$(MACH) xm=$(TARGET_MACH) Scheme="$(SCHEME_BIN)" SCHEMEHEAPDIRS="$(SCHEME_INC)"
+ 
+ XPATCH =
+-XPATCHcross = --xpatch $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++XPATCHcross = --xpatch $(XPATCH_FILE)
+ 
+ racket.boot: racket.so
+ 	$(SCHEME) --script $(srcdir)/convert-to-boot.ss @BOOT_COMPRESS_COMP@ $(XPATCH@CROSS_MODE@) racket.so racket.boot $(TARGET_MACH)
+@@ -410,7 +434,7 @@ install-cross:
+ 	$(MAKE) compile-xpatch.$(TARGET_MACH)
+ 	$(MAKE) library-xpatch.$(TARGET_MACH)
+ 
+-SCHEME_XPATCH = $(SCHEME_WORKAREA)/$(TARGET_MACH)/s/xpatch
++SCHEME_XPATCH = $(XPATCH_FILE)
+ 
+ CROSS_SERVE_DEPS = $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss \
+                    $(srcdir)/../expander/env.ss $(srcdir)/../linklet/config.ss
+diff --git a/racket/src/cs/c/configure b/racket/src/cs/c/configure
+index 21695a431a..1eeef57753 100755
+--- a/racket/src/cs/c/configure
++++ b/racket/src/cs/c/configure
+@@ -654,6 +654,9 @@ MINGW
+ NOT_OSX
+ OSX
+ SETUP_BOOT_MODE
++USE_SCHEME_MODE
++MAKE_SCHEME_SCHEME
++MAKE_SCHEME_MODE
+ TT_CROSS_MODE
+ T_CROSS_MODE
+ CROSS_MODE
+@@ -1448,7 +1451,7 @@ Optional Features:
+   --enable-docs           build docs on install (enabled by default)
+   --enable-usersetup      setup user-specific files on install
+   --enable-racket=<path>  use <path> as Racket for build; or "auto" to create
+-  --enable-scheme=<path>  use <path> as host's build directory for cross
++  --enable-scheme=<path>  use <path> as host build for cross
+   --enable-mach=<mach>    use Chez Scheme machine type <mach>
+   --enable-target=<mach>  cross-build for Chez Scheme machine type <mach>
+   --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=<path>  use <path> as Racket for build; or "auto" to create])
+-AC_ARG_ENABLE(scheme,     [  --enable-scheme=<path>  use <path> as host's build directory for cross])
++AC_ARG_ENABLE(scheme,     [  --enable-scheme=<path>  use <path> as host build for cross])
+ AC_ARG_ENABLE(mach,       [  --enable-mach=<mach>    use Chez Scheme machine type <mach>])
+ AC_ARG_ENABLE(target,     [  --enable-target=<mach>  cross-build for Chez Scheme machine type <mach>])
+ 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 <mflatt@HIDDEN>
+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 <https://github.com/racket/srfi/pull/15>.
+            ;; 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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:36:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:36:10 2022
Received: from localhost ([127.0.0.1]:56522 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9Pu-000490-1r
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:10 -0500
Received: from mail-qv1-f49.google.com ([209.85.219.49]:43844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9Ps-00048l-JJ
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:36:09 -0500
Received: by mail-qv1-f49.google.com with SMTP id c14so4981308qvk.10
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:36:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=im2eB4m2cw9htGdEwc+CW/YqzVpAKz+5GUbS5TUWUbs=;
 b=FxcuJwzjOPe9i0MYOx77iiv0/7P5cm+amd/JRO6g0v21tXidN2JdbpE5KMbqrkZB93
 zyfdoFspyoVu0UcnzxtyjFaMhob1OAU4VGQFnbDw9xHU38AN46b7Xu7x/YZfgY8SiLcr
 7VtpPwmCroIPkSGqRoQIGm/RJutkVFJ57CaUE3EdO5m40xAYDSp0A8mONDvP9fVKFcDM
 deFeGU6Mc4U3Ta1TmWxfzcF6kUoZqPqZmf4E5rtwHMSnln1iUId+Kc1jJrr9m6TUmbwa
 ySyu8vAevpgJiEakWH2i4+oEM9FdrEzn3yJRbfGeZsmn01XNGWYDjAhQuJBQi0/WgAkH
 xJOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=im2eB4m2cw9htGdEwc+CW/YqzVpAKz+5GUbS5TUWUbs=;
 b=2tAmZjooQyOW6C+Og3/wt0J5cABuyK3deLcHCWKEAPKYJUvEySeH+PpqhaTRQ2dcRZ
 BepLAWG0N5PRr3tuznyOj1XNE5AtXcdZXGyK6g/mOY2roqK5QSA+Qp8d1m95i0JxzQ4+
 Dux+ASmLlenMFJjT1pE4+tKTj4zkLgxW5gvPHSL8wVLAe3Wrdg7BoVFW+cCF5KPiNe8Z
 XEV2aSgT4ipvrN4yY+4pNGOZgYkpyAnUUgolfGgOQ1P+sBpSMPjGeOskfHqpbe86ZFK8
 Cp7yhcstQG00toM7LLmMQ9B0d6An8/1JdHYr9GgX81klN0JtlBAPvig26ViJbkv3tBZL
 KT8A==
X-Gm-Message-State: AOAM532fWBRIheYn1nN9NS+HreVaI9KP4GEarVUZAEzUP/VUGEtbLuoV
 KvTaz/65gvhpGk2w6yii36kAkfnHRdouibkxSSg=
X-Google-Smtp-Source: ABdhPJy4dreQVWSX4vqmFvrdkiSHEddY4OtklRVwJd0QU/AtQq+FAEZiXcMM3jC9FXx/8QxPTtHqUg==
X-Received: by 2002:ad4:4ea7:0:b0:42c:b235:aa7 with SMTP id
 ed7-20020ad44ea7000000b0042cb2350aa7mr10610157qvb.19.1645929362908; 
 Sat, 26 Feb 2022 18:36:02 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 o1-20020a37be01000000b00648eadafd9bsm3269463qkf.24.2022.02.26.18.35.50
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:36:02 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 01/24] gnu: Use license prefix in (gnu packages racket).
Date: Sat, 26 Feb 2022 21:34:27 -0500
Message-Id: <20220227023450.1877215-2-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220227023450.1877215-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <20220227023450.1877215-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * 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 d [...] 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.49 listed in list.dnswl.org]
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.49 listed in wl.mailspike.net]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  * 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 d [...] 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.49 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.49 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

* 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 <http://www.gnu.org/licenses/>.
 
 (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
-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:35:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 21:35:42 2022
Received: from localhost ([127.0.0.1]:56518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO9PR-00047j-N1
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:35:41 -0500
Received: from mail-qv1-f53.google.com ([209.85.219.53]:39538)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO9PP-00047U-Pw
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 21:35:40 -0500
Received: by mail-qv1-f53.google.com with SMTP id a1so9817159qvl.6
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 18:35:39 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=philipmcgrath.com; s=google;
 h=from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=jd3v/tVuIc7hYmsVoxmEs4oIVaOgDaXFYoxTxRSvXrs=;
 b=LSFmDOrCY68CATT5JSk/0iQ4/y0l4EDUcT4F8ES77I9w8DUUgSRsytc5KrUqGLfisG
 gb2t6RMZoDvQ9VOM2YAZEAeenZlcPOhOOvQVoxxCPC0FFVjtwaCZ6ipi31Kp+8MT92g1
 +HPfS9qvJrlFmgyYWsCNusU4A7AY+oQNBU35WUu6SIEkWE7uIKVqwl/1rfKaXXTutumI
 9TNQIANI79D41oMtxKQUlCPKseHL0vxn1avKNtFXsVehmM8I9ViKscYbfZHW3J9/FyzN
 mbbagcxT+9RhvAoSx3ByXvFKm/9ViDHWvT/By/CT7ZaO8ZoNyo8iKJNsDtnUbREFZlEC
 bu8A==
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=jd3v/tVuIc7hYmsVoxmEs4oIVaOgDaXFYoxTxRSvXrs=;
 b=AbMcpXrVEaCGxBFJ90GodYgwVoh8ID1AXniAzVWa6IIakRtZmtUi3Lm1wrzpmsGtzE
 YwN+fHVuRr7CWzFZMGyUQEa11vNo08aQ3GOUcj4DCzqP4vy/DhNvSW06rrmBdLlTVd4E
 bOVE8uGvxiADbR3ioeMCSESa4lQSMJ3RR+iiC8F//wdQzX/zAMxH/9I9eYeBrmtaeBbX
 q/KfxxgrkacEJUSFjxldbGIleV2iuP7bWRBnlCHZuwY4+swJVekcEni9JuTN0AwljDSs
 3G1VN5EFNjtrWfu7Gpqa6b1yWpJQ/tEfHPDuzyY9DuNRzLhn7U1k680nChpNZ1wq+SMd
 leCg==
X-Gm-Message-State: AOAM530GFg7Usy1/suPa1N4YkWr/BMm1MEsJjwTzAcvDEeQhEOIK+p+8
 4xNxxmJHH2avqRjtqRc/u/p+Pyun9K9hMT+Qcik=
X-Google-Smtp-Source: ABdhPJybWQIyIaA3p6j7U+sYgr45BBY0Y2gTE7SMEwj6uX87CCeEy2i/CAgoBnkcXSwmB+btM5WJ4A==
X-Received: by 2002:a0c:ebcf:0:b0:432:deca:eae8 with SMTP id
 k15-20020a0cebcf000000b00432decaeae8mr5222709qvq.43.1645929333923; 
 Sat, 26 Feb 2022 18:35:33 -0800 (PST)
Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51])
 by smtp.gmail.com with UTF8SMTPSA id
 de18-20020a05620a371200b00662cf4b5631sm1270827qkb.23.2022.02.26.18.35.26
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 26 Feb 2022 18:35:33 -0800 (PST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 zimoun <zimon.toutoune@HIDDEN>
Subject: [PATCH v6 00/24] Update Racket to 8.4. Adjust Chez Scheme packages.
Date: Sat, 26 Feb 2022 21:34:26 -0500
Message-Id: <20220227023450.1877215-1-philip@HIDDEN>
X-Mailer: git-send-email 2.32.0
In-Reply-To: <20220220060610.178131-1-philip@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 2.1 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  Hi, Here is v6, reflecting (I hope) Liliana's suggestions.
 Compared to v5: 
 Content analysis details:   (2.1 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.219.53 listed in wl.mailspike.net]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [209.85.219.53 listed in list.dnswl.org]
 1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 53878
Cc: Philip McGrath <philip@HIDDEN>,
 =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, raingloom <raingloom@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  Hi, Here is v6, reflecting (I hope) Liliana's suggestions.
    Compared to v5: 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [209.85.219.53 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [209.85.219.53 listed in wl.mailspike.net]
  0.7 SPF_NEUTRAL            SPF: sender does not match SPF record (neutral)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.5 FROM_FMBLA_NEWDOM      From domain was registered in last 7 days
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

Hi,

Here is v6, reflecting (I hope) Liliana's suggestions.

Compared to v5:

  - The first two patches are the same.

  - Patch 03 uses "configure-layer.rkt" rather than
    "make-installation-layer.rkt", fixes a typo, and uses
    'racket-packages-origin' and 'simple-racket-origin' rather than
    'extract-package-source{,*}'.

  - Patch 04 has a typo fix.

  - Patch 05 is the same.

  - Patch v6 06/24 is like v5 06/22, but with a smaller diff, because it
    avoids changing indentation.

  - Patch v6 07/24 makes the indentation changes that were part of v5 06/22.

  - Patches 08/24 through 13/24 are like v5 07/22 through 12/22.

  - Patch v6 14/24 includes only the style changes from v5 13/22.

  - Patch v6 15/24 is the substantive part of v5 13/22.

  - Patches 16/24 through 24/24 correspond to v5 14/22 through 22/22.

Thanks!

 -Philip

Philip McGrath (24):
  gnu: Use license prefix in (gnu packages racket).
  gnu: racket: Update to 8.4.
  gnu: racket: Use Git origins for Racket packages.
  gnu: racket-minimal: Use new package style.
  gnu: racket-minimal: Don't configure non-existant catalogs.
  gnu: racket-minimal: Change inheritance to follow bootstrapping.
  gnu: racket-minimal: Adjust indentation.
  gnu: racket-minimal: Add "debug" output.
  gnu: configure-layer.rkt: Adjust indentation.
  gnu: racket-minimal: Separate from the Racket VM.
  gnu: racket: Move Chez bootfiles to (gnu packages chez).
  gnu: chez: Add utilities for Chez machine types.
  gnu: racket: Add 'racket-vm-for-system'.
  gnu: chez-scheme: Use new style for Chez packages.
  gnu: chez-scheme: Use "lib/chez-scheme" for search path.
  gnu: chez-scheme: Use shared zlib and lz4.
  gnu: chez-scheme: Use new package style.
  gnu: Add stex.
  gnu: Add chez-nanopass.
  gnu: chez-scheme: Explicitly package bootstrap bootfiles.
  gnu: chez-mit: Support chez-scheme-for-racket.
  gnu: Add chez-scheme-for-racket.
  gnu: chez: Add 'chez-scheme-for-system'.
  gnu: racket-vm-cs: Build with "--enable-scheme".

 gnu/local.mk                                  |    4 +-
 gnu/packages/chez.scm                         | 1264 ++++++++++-----
 gnu/packages/emacs-xyz.scm                    |    2 +-
 gnu/packages/loko.scm                         |    2 +-
 .../racket-enable-scheme-backport.patch       |  465 ++++++
 ...acket-gui-tethered-launcher-backport.patch |   26 +
 gnu/packages/racket.scm                       | 1433 +++++++++++------
 7 files changed, 2342 insertions(+), 854 deletions(-)
 create mode 100644 gnu/packages/patches/racket-enable-scheme-backport.patch
 create mode 100644 gnu/packages/patches/racket-gui-tethered-launcher-backport.patch

-- 
2.32.0





Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 21:09:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 16:09:35 2022
Received: from localhost ([127.0.0.1]:56385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO4Jr-0000i8-BJ
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 16:09:35 -0500
Received: from mail-wm1-f68.google.com ([209.85.128.68]:46804)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nO4Jq-0000hv-4A
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 16:09:34 -0500
Received: by mail-wm1-f68.google.com with SMTP id
 p184-20020a1c29c1000000b0037f76d8b484so3744266wmp.5
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 13:09:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=dCYwVsvV/DKujusD3t2sGsUGjcNPE+s9I8fWLUG1cGk=;
 b=WL3YMghQreemp212XbQVagQ071eDXzT+0bMfb559mPzJfhwg1ASDAHc01lvqrj0y1u
 NSE2d9usX7J1Ioj/17cXXFBwhjFmf/xP2hT1aaDZubpOEfrEp3k5BxIsr9gSW8NwRiOp
 oknwb3ghZnaxE4K/FGrnRd/bAF3xUU4TkICz2kJ0ShCoS1Q68+4s56I0KCtRULoxQY48
 Qvld2RpSrvZWOHy/I5febpHJHJEaGrFsfBqenSWZt3L9fy1zgouvB86KLcV4hN9eIFjc
 M5IhWmTfMcd14ia8tiecxH1l5aFc5O2DxSPDNZQNS3OAT2QyAz5aghlyDoOAu2we1NrJ
 yFQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=dCYwVsvV/DKujusD3t2sGsUGjcNPE+s9I8fWLUG1cGk=;
 b=mEFq3s1exp2kzqDFTDwimvcnYV+2KZ/k/Ch4NNqD2RBFXiUbm0NAcIqw3HBfbnsTgm
 3w6VwKUqrEj0gGXbHQ/iayCVOPJ8sHEdCzJjcInRfZMBmPkj982yZYyx21L0zCQR8Hf4
 eSqPSsxMfpxkuIVBY3R3kNZilYCa2vjjkrnw2QftWAXUdKwFZl5M2+CBz0u4MV5/5Is8
 x7BG56Kj1jQGAZxZTR6JpEdwUjpkb64nA1H6b6FDKjzlASiITIlJ2TmqWQxv2P0T7Hje
 W/PIZ906gNbE2qgz281pFyqBe5S9kFRo7ZsLplKOWstCxirERa4puLBOb3QlX57G870r
 9n1w==
X-Gm-Message-State: AOAM533qhVziN2nDdl16iVBo+54iOTB83dY9xm6hQfSCv1Gg8D2mUcpX
 siDuQiTzuUWDMlw3M9aQEbo=
X-Google-Smtp-Source: ABdhPJzotSwRLaJuHopAtkguhtdDnb7KYfos65BPPyI/UrP59J8L+XVLXzHOpELsXrqecM5XUvqi4w==
X-Received: by 2002:a1c:4604:0:b0:381:139:e54e with SMTP id
 t4-20020a1c4604000000b003810139e54emr7812719wma.151.1645909768173; 
 Sat, 26 Feb 2022 13:09:28 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 m18-20020a5d56d2000000b001edc00dbeeasm5709253wrw.69.2022.02.26.13.09.27
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 26 Feb 2022 13:09:27 -0800 (PST)
Message-ID: <2dc808eb7328149b3974d4dac50d3da1b8e4d416.camel@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878 <at> debbugs.gnu.org, zimoun
 <zimon.toutoune@HIDDEN>, Liliana Marie Prikler
 <liliana.prikler@HIDDEN>
Date: Sat, 26 Feb 2022 22:09:26 +0100
In-Reply-To: <3566149.rYT2d9vS2d@bastet>
References: <20220220060610.178131-1-philip@HIDDEN>
 <19823080.dSP1spjjOr@bastet>
 <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
 <3566149.rYT2d9vS2d@bastet>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Am Samstag, dem 26.02.2022 um 14:55 -0500 schrieb Philip McGrath:
> "configure-layer.rkt" seems fine. I do see the potential for confusion
> about whether this was "making" an "installation-layer.rkt".
configure-layer.rkt it is then :)


> > > > > > I think some way to shorten those origins would do wonders in
> > > > > > terms of the number of lines this patch adds.
> > > > > 
> > > > > At one point, I had abbreviated the origins as something like:
> > > > > 
> > > > >   (REPO-SPEC SHA256 [COMMIT])
> > > > > 
> > > > > [...]
> > > > 
> > > > I wouldn't do this inside of extract-package-source, but define a
> > > > one or two liner for adding specifically packages hosted on
> > > > racket's github.  WDYT?
> > > > 
> > > > > I wasn't sure about the trade-off between being slightly more
> > > > > cryptic
> > > > > than explicit origins, but a lot shorter.
> > > > 
> > > > Note that the goal is not to code golf, but to be understandable.
> > > > When adding a bunch of origins as inputs, understandability
> > > > suffers
> > > > by induced scrolling.
> > > 
> > > I've done this, and it was a very good idea. In particular, it
> > > helped
> > > find some places where I hadn't switched to using `%racket-commit`
> > > once the release was tagged.
> > 
> > That is better, but can still be improved.  As hinted at in my
> > comment
> > to your tree, origin snippets might be a better solution here unless
> > I'm missing something in the heat of the moment.
> 
> Could you give an example of what you imagine the result might look
> like in use? E.g. (but I'm not sure this would really be an
> improvement):
> 
> > (cons*
> >  ...
> >  libedit
> >  racket-minimal
> >  (append
> >   (racket-package-sources
> >    "2d" (base32
> > "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
> >    "2d" "2d-doc" "2d-lib")
> >   (racket-package-sources
> >    "algol60" (base32
> > "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx")
> >    '("algol60" "."))
> >   ...))
I'd write this as 
--8<---------------cut here---------------start------------->8---
(list
 ... 
 libedit
 racket-minimal
 (simple-racket-origin
  "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
  '("2d" "2d-doc" "2d-lib")
 (simple-racket-origin
  "algol60" (base32
"09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx")
  '("algol60" ".")
 ...)
--8<---------------cut here---------------end--------------->8---
I do wonder whether these packages can further be modularized (i.e. so
that they build as packages) with configure-layer.rkt acting as a
profile hook and some racket meta package simply adding racket-minimal
and all the base stuff into the profile, but for now let's just have an
easy way of formulating origins.

Cheers




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 19:56:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 14:56:15 2022
Received: from localhost ([127.0.0.1]:56361 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO3At-0007CV-6S
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 14:56:15 -0500
Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:50283)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO3Ar-0007CH-BU
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 14:56:13 -0500
Received: from compute2.internal (compute2.nyi.internal [10.202.2.46])
 by mailnew.west.internal (Postfix) with ESMTP id E2A262B001FF;
 Sat, 26 Feb 2022 14:56:06 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sat, 26 Feb 2022 14:56:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=/WrC8PomR8thek
 FJA8o1pM0qQZihzP2DUNTsgNTTV0A=; b=FuvLFzAxBcxROt0P0/hyEEoW+1ItG8
 NbEglo3KrCPB1JlIftMtVhUlhQJB3fQ/hHf3omxXm2xlXglUAXlHGMHvj73nCJB+
 5oEOF27F9S8QyiQskswgb2oVuw+9uDxIZUBdqo/Cf2pqbb4WgSuxq2q3WiQcMOQj
 gEC9tY4Bf5GmRqkTZ34l688VmSEL6Fs7kEiTikmW/RMwBch0yIUZHnjc1fh/gGIc
 +LTrLk5FTizjJ3TZt2LlRT9b8RXVYVZKkOty4PiGekz9CNFcFa34r1y/dJ+7A6iC
 cMQplMPZPgIjlFtKeTY9vZOlN9faRr9Nk2HG7wrTA9bwdFARXH7w78uw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/WrC8PomR8thekFJA
 8o1pM0qQZihzP2DUNTsgNTTV0A=; b=gKDe/hHJGQEcb5MChNZWLmaLuX+wxvvcE
 KTR7Md/YxEJq/1S36AOmTro4baKFRXWNdqyCtEIkj3C07ZQsABdlLRgMgArJbqzY
 M4NJJXOl6lztv2qvIW2VQsF7WqUmeS1Njs8TkD0PZDG5HiEi8gSHPfU7EQKJLCCo
 ewOk7HKqtPF8XdJ2VeOJ7JDme11ns6+fYxUnFgfRBXcqNMr6IBrbGhYMs3A+jCWt
 9X3kHo++QxljbwbWTfDbNnrMY/bGD84Mzx84VvN7GVkVl+PThLMy3Um/I09XaPaz
 PJl8/dQnORVw3CgbcmC/SPUhgLfokPnFYNFZpZgxKW8HKyb2b350w==
X-ME-Sender: <xms:1YUaYgjYH0VLRYH6MZBccOPtvvc-B79Ik-sgsFxpMxfDdBllontT2w>
 <xme:1YUaYpBH_Gn-qWcDEykjpD9-Z2rdkcqR86k5C3aYe7xJTeWx-8-NoKbIlFoY_-VDt
 eJQA_gnxVkKCEanwWs>
X-ME-Received: <xmr:1YUaYoEw1piM_CbkhtXZB7hYU1P7doS_e2JdPm7M1nwu4UA9SuBAquHVsmmN19ei1vGBnlpKtTU0piySS2PEEj2TsvWJ_ARG-NfEWQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeigdduvdekucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne
 cujfgurhephffvufffkfgjfhggtgesghdtreertddtvdenucfhrhhomheprfhhihhlihhp
 ucfotgfirhgrthhhuceophhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhmqe
 enucggtffrrghtthgvrhhnpeeiieefheeutedutdfgffdtheehtedtudevtedtgfeludel
 leekgfduteejkefggfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih
 hlfhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh
X-ME-Proxy: <xmx:1YUaYhT5lVy5SOpZpHuMwn2tkddqMKPCfgsVq5CvB-6kW4s_-xB9Hg>
 <xmx:1YUaYtzJVlybcNqQdA1QAtnUspUODwUdZH4yW48hvYoC1hdzjiAzGQ>
 <xmx:1YUaYv42BqoXuh2FcYJb7GyN5mvLfsUBpmN2McgLMBkFmjVvqZSSDw>
 <xmx:1oUaYj4FsKHLcvrt89OcztKNEO3TjzTYcBa_Mi9CfTt2P-ERQlvT7fqjsAk>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 26 Feb 2022 14:56:04 -0500 (EST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 14:55:59 -0500
Message-ID: <3566149.rYT2d9vS2d@bastet>
In-Reply-To: <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <19823080.dSP1spjjOr@bastet>
 <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart3472970.ViWdsapti3";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--nextPart3472970.ViWdsapti3
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>, Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 14:55:59 -0500
Message-ID: <3566149.rYT2d9vS2d@bastet>
In-Reply-To: <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN> <19823080.dSP1spjjOr@bastet> <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>

On Saturday, February 26, 2022 1:30:08 PM EST Liliana Marie Prikler wrote:
> Hi,
> 
> Am Samstag, dem 26.02.2022 um 12:23 -0500 schrieb Philip McGrath:
> > Hi,
> > 
> > On Saturday, February 26, 2022 9:26:29 AM EST Liliana Marie Prikler
> > 
> > wrote:
> > > I'm not talking about the generated file, but the procedure that
> > > generates it.  Special characters like dots and slash are still
> > > pretty special in Scheme, even if they're allowed as identifiers.
> > 
> > Do you mean A, B, C, and/or D of these:
> > a
> > 
> > >           (replace 'configure
> > >             (lambda* (#:key inputs configure-flags #:allow-other-
> > > keys)
> > >               (let* ((racket (search-input-file inputs
> > > "bin/racket")))
> > >                 (apply invoke
> > >                        racket
> > >                        #$make-installation-layer.rkt ;; <--- A
> > >                        `(,@configure-flags
> > >                          ,(dirname (dirname racket))
> > >                          ,#$output))
> > >                 (invoke racket
> > >                         "--config" (string-append #$output
> > > "/etc/racket")
> > >                         "-l" "raco" "setup"
> > >                         "--no-user"))))
> > > 
> > > [...]
> > > 
> > > (define make-installation-layer.rkt ;; <--- B
> > >   (scheme-file
> > >    "make-installation-layer.rkt" ;; <--- C
> > >    `(module
> > >      make-installation-layer racket/base ;; <--- D
> > >      (require racket/cmdline
> > 
> > or something else?
> 
> The name in B is confusing imo, because it implies a procedure when it
> is in fact a file.  Of course, that'd affect A as well.  The file name
> in C does not matter too much, but should probably be matched with B to
> some extent (but importantly keeping the .rkt extension even if we drop
> it from B).  I'm not sure if D is a function call or not, but if it's a
> module name perhaps we should make it match B.
> 
> Given that we pass configure-flags to this thing, how about "configure-
> racket-layer", "configure-layer.rkt" or something along those lines?
> 

"configure-layer.rkt" seems fine. I do see the potential for confusion about 
whether this was "making" an "installation-layer.rkt".

(D is a module name and should for clarity match C without the suffix. 
Ultimately, for a module that is not a submodule, it is ignored and the name 
comes from context. This is an older way of writing modules that predates 
"#lang" (which would be inconvenient with `scheme-file`). Calling `read` with 
the appropriate parameters on the input "#lang racket/base 42" would produce 
the datum `(module anonymous-module racket/base (#%module-begin 42))`.)

> > In particular, not to be dense, but B is not a function.
> 
> Yeah, that's my bad for only skimming these and not paying too close
> attention to brackets.  The name itself implies a function, hence my
> confusion.  Looking at things closely would make me see more typos like
> ";; workaroung Guile reader/printer:"
> workaround.
> 

Thanks.

> > > > > I think some way to shorten those origins would do wonders in
> > > > > terms
> > > > > of the number of lines this patch adds.
> > > > 
> > > > At one point, I had abbreviated the origins as something like:
> > > > 
> > > >   (REPO-SPEC SHA256 [COMMIT])
> > > > 
> > > > [...]
> > > 
> > > I wouldn't do this inside of extract-package-source, but define a
> > > one or two liner for adding specifically packages hosted on
> > > racket's github.  WDYT?
> > > 
> > > > I wasn't sure about the trade-off between being slightly more
> > > > cryptic
> > > > than explicit origins, but a lot shorter.
> > > 
> > > Note that the goal is not to code golf, but to be understandable. 
> > > When adding a bunch of origins as inputs, understandability suffers
> > > by induced scrolling.
> > 
> > I've done this, and it was a very good idea. In particular, it helped
> > find some places where I hadn't switched to using `%racket-commit`
> > once the release was tagged.
> 
> That is better, but can still be improved.  As hinted at in my comment
> to your tree, origin snippets might be a better solution here unless
> I'm missing something in the heat of the moment.

Could you give an example of what you imagine the result might look like in 
use? E.g. (but I'm not sure this would really be an improvement):

> (cons*
>  ...
>  libedit
>  racket-minimal
>  (append
>   (racket-package-sources
>    "2d" (base32 "1zzcz5qyjv7syi41vb8jkxjp1rqgj61zbsdrg0nlc4qy9qsafzgr")
>    "2d" "2d-doc" "2d-lib")
>   (racket-package-sources
>    "algol60" (base32 "09kj6asypmc24n29w0izc9p0q8hpga2hpkchsypfwn5c8zpvihlx")
>    '("algol60" "."))
>   ...))

-Philip

--nextPart3472970.ViWdsapti3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmIahc8ACgkQygNjjfo/
HHrIfxAApQt8KeuiaXltoyLKUkwtufzJgzRmu0EYtKjKglt+g8RQfl7FoRWwmQq8
Ib2p+c4mCwiiwwfEmuSi+UfMf2ZjR76u+uAQbvPXEyCLOkMrD/JuUZd9LMuDuBbD
7aTGJbLKWgGaZQ1+ly22cvJ1vTR0uDKCiJlgGZBS2GjrXmRdoHjoeeCJCeT4Qb47
5dw8hjaNEKcPZuqP2A0/6ETqoIuUg4BdhUn4tYnFTfX8SLx2jLiXYTmDUrbpVh2k
h0yeypVA0dU53RmZQ54ATGCHSyCpiZvm7kgvOffB2zVB4N+IB7TYlxIvjUdGeCIk
7C+U1RbdRvWAG4kUuOQ0hWCHhPOzPwfd3yNEubszMV6YZ2Vbrx7LdfMEfHXWfJ9S
IaMJ8jCjZ3X0Ym98JsV9hLriZUvz/2OblyqaZZR0bpBXtaSANg8Plcme+hIz87Fd
umnuoAC6oL9G+ZMXCkfh5r1CG8q2fWvHBUyRmw4BYVJpls7BWruf2GJQ87JtwIL2
ajsGuGcc/hwAZdT9iwTioFt5T9dslLGIhRsTt2fwxxXccz3Y+6DsFy58jJfbxUw5
J+BxJ+MkP3UFedIEnDk9BODApHpoE//OaXsyiddToe77o19cJHLwfSGMySCUk7sW
+BoXmDzqcVPDLoBidR8b1B+DZGV+AAhw1zRWBwk0c5f1UHxLq/Q=
=BixL
-----END PGP SIGNATURE-----

--nextPart3472970.ViWdsapti3--







Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 18:30:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 13:30:18 2022
Received: from localhost ([127.0.0.1]:56334 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO1pi-0004sL-3c
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 13:30:18 -0500
Received: from mail-ej1-f65.google.com ([209.85.218.65]:37547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1nO1pg-0004rw-2F
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 13:30:16 -0500
Received: by mail-ej1-f65.google.com with SMTP id bg10so17068047ejb.4
 for <53878 <at> debbugs.gnu.org>; Sat, 26 Feb 2022 10:30:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=OMLZYrJOolGABSw+BgPM+Eu54MQvy5S1iysDJhNy6t4=;
 b=XHT/odSHZgWW3ZFhTiT3MJ5PS9ykn1JHxQtAAorCmnE8CsC5UCjSpJsex3EdvtRMb2
 MO96KZr98gEMfmH9Qs75j/xJMfGsE7gSp4DxXQ2VsqboM60PWOp4r4CWzBNAvostKGX5
 ty98sy4FlO44VA+pxAGvqRIP8UZENHNasGCvQpfvqMjv5OLCUQbXivJP/CHYFjyd8uz2
 KTAQfEiv3sgc0/wfIxo+lX0Uh80nQXtngfMkNv7hagti+QdPxGqHQIvj6/VN2g0z/xVg
 G1UiLKJE0A8Oc9QkFc64U3m3cdGiCTxivbaO/zUIngEUyNQA0hjz3BS4LTXUBuVPRh0E
 9DaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=OMLZYrJOolGABSw+BgPM+Eu54MQvy5S1iysDJhNy6t4=;
 b=o3dvAQJwYOcFemUxTqKpkHeXD7KB4BDBXFdiR3LIFXw2Lzb+9P4+d+LShDP9tfzy+m
 7O9pvp3uIjtsnnjowGdq2BWfWgWZvk55JVlOyFttGl9Iexk/pf7dH7E6j2gwHLv8MS2B
 RwYC1a/HWp2smlwWNJOUj07yCTm2b3Z/FHezYUVpg1dbyo9qylnkymkiZ2hKuXuy00Un
 yPfDK3dcIzZUN+MeGD9BDSq2jXSLu8by8Chn7YMWlq3vzJvTU9An8bWEWowf5zxX+oA8
 qrvZJxstK1tLLzf5qcZoPHKKAytHBSSh5Ru3FUUDqSggwlTn/HyU4Yv2pEyblHyvn3bW
 KBfg==
X-Gm-Message-State: AOAM530lgqHfKAkZ6XC4mYRQg6x82Oct3y9Q+YboJuS8oCp/46OasVrb
 kJFk1ve+72To7V0LBeMsgFM=
X-Google-Smtp-Source: ABdhPJz5NqOsmOoO0r6siH7ItgKBglAtxvjD/HmKsuI7SwtrKGIsdbXeqiJIOAehgD56o7ppxSHY7w==
X-Received: by 2002:a17:906:3ac6:b0:6cb:6808:95f9 with SMTP id
 z6-20020a1709063ac600b006cb680895f9mr10494985ejd.375.1645900210220; 
 Sat, 26 Feb 2022 10:30:10 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93]) by smtp.gmail.com with ESMTPSA id
 d25-20020aa7d699000000b004128cfcc228sm3258052edr.5.2022.02.26.10.30.09
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 26 Feb 2022 10:30:09 -0800 (PST)
Message-ID: <6a35fdea04cdf461a662830efc5bfd84fee60ec1.camel@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Philip McGrath <philip@HIDDEN>, 53878 <at> debbugs.gnu.org, zimoun
 <zimon.toutoune@HIDDEN>, Liliana Marie Prikler
 <liliana.prikler@HIDDEN>
Date: Sat, 26 Feb 2022 19:30:08 +0100
In-Reply-To: <19823080.dSP1spjjOr@bastet>
References: <20220220060610.178131-1-philip@HIDDEN>
 <3354324.gHnXMxdNb5@bastet>
 <0c9963cedab248085b106effdd68649647a41ca2.camel@HIDDEN>
 <19823080.dSP1spjjOr@bastet>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.42.1 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi,

Am Samstag, dem 26.02.2022 um 12:23 -0500 schrieb Philip McGrath:
> Hi,
> 
> On Saturday, February 26, 2022 9:26:29 AM EST Liliana Marie Prikler
> wrote:
> > I'm not talking about the generated file, but the procedure that
> > generates it.  Special characters like dots and slash are still
> > pretty special in Scheme, even if they're allowed as identifiers.
> 
> Do you mean A, B, C, and/or D of these:
> a
> >           (replace 'configure
> >             (lambda* (#:key inputs configure-flags #:allow-other-
> > keys)
> >               (let* ((racket (search-input-file inputs
> > "bin/racket")))
> >                 (apply invoke
> >                        racket
> >                        #$make-installation-layer.rkt ;; <--- A
> >                        `(,@configure-flags
> >                          ,(dirname (dirname racket))
> >                          ,#$output))
> >                 (invoke racket
> >                         "--config" (string-append #$output
> > "/etc/racket")
> >                         "-l" "raco" "setup"
> >                         "--no-user"))))
> > 
> > [...]
> > 
> > (define make-installation-layer.rkt ;; <--- B
> >   (scheme-file
> >    "make-installation-layer.rkt" ;; <--- C
> >    `(module
> >      make-installation-layer racket/base ;; <--- D
> >      (require racket/cmdline
> 
> or something else?
The name in B is confusing imo, because it implies a procedure when it
is in fact a file.  Of course, that'd affect A as well.  The file name
in C does not matter too much, but should probably be matched with B to
some extent (but importantly keeping the .rkt extension even if we drop
it from B).  I'm not sure if D is a function call or not, but if it's a
module name perhaps we should make it match B.

Given that we pass configure-flags to this thing, how about "configure-
racket-layer", "configure-layer.rkt" or something along those lines?

> In particular, not to be dense, but B is not a function. 
Yeah, that's my bad for only skimming these and not paying too close
attention to brackets.  The name itself implies a function, hence my
confusion.  Looking at things closely would make me see more typos like
";; workaroung Guile reader/printer:"
workaround.

> One of the reasons I particularly like being able to use `.` in
> identifiers is to refer to files by name, without some ad-hoc
> encoding.
I do admit that is helpful, but in this context, metaphors were mixed
in a way that conveyed the wrong message.

> > > > I think some way to shorten those origins would do wonders in
> > > > terms
> > > > of the number of lines this patch adds.
> > > 
> > > At one point, I had abbreviated the origins as something like:
> > > 
> > >   (REPO-SPEC SHA256 [COMMIT])
> > > 
> > > [...]
> > 
> > I wouldn't do this inside of extract-package-source, but define a
> > one or two liner for adding specifically packages hosted on
> > racket's github.  WDYT?
> > 
> > > I wasn't sure about the trade-off between being slightly more
> > > cryptic
> > > than explicit origins, but a lot shorter.
> > 
> > Note that the goal is not to code golf, but to be understandable. 
> > When adding a bunch of origins as inputs, understandability suffers
> > by induced scrolling.
> > 
> 
> I've done this, and it was a very good idea. In particular, it helped
> find some places where I hadn't switched to using `%racket-commit`
> once the release was tagged.
That is better, but can still be improved.  As hinted at in my comment
to your tree, origin snippets might be a better solution here unless
I'm missing something in the heat of the moment.

> Other than potentially doing something about "make-installation-
> layer.rkt", 
> I'd plan to squash the WIP/FIXUP commits in
> <
> https://gitlab.com/philip1/guix-patches/-/tree/racket-chez-refactor-hist-28
> >
> and send it as v6.
I did have a short look at it and apart from the above comment it
appears fine, but I'll have to reevaluate it when it's a full v6
anyway.

Cheers




Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 17:31:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 12:31:10 2022
Received: from localhost ([127.0.0.1]:56286 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO0uU-0003DI-Gt
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 12:31:10 -0500
Received: from new3-smtp.messagingengine.com ([66.111.4.229]:50759)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO0uS-0003D0-H7
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 12:31:08 -0500
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45])
 by mailnew.nyi.internal (Postfix) with ESMTP id 665E35800CD;
 Sat, 26 Feb 2022 12:31:03 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute5.internal (MEProxy); Sat, 26 Feb 2022 12:31:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=53YWM251H9VWzP
 wZLGa/y3E7M8h1O10R0/jh3YgaxAo=; b=ba5RmVjlHC9WsH/H3pjzKtCmI0uY1c
 WS7tWwo+3nB7D6Mon+OlGylhSxhqJU24BrBagtoLN5HDuMq3jIO4OJqGuOf0Fo1N
 pNXVoko/QIKqbb5/jGnkqK6ctRoZ+86ruyIOCisB7arh1osHQ9NHYiVPg1dvWPHg
 AmiPVufZpFtzM5A4HNVr2xExw6bNvbYG6LPL6D+ENZcxk02M5zKd8CQx7zAIR/jG
 Cp1+9mQ4Z0Ma1SIWy44PIW0Odn3sdKp78jadl9xiLi11xlo2RSQygYPKxemdCO2q
 ObrIcyyZdNuA5kE52DI/3pU4Ynid168qu+7t3AtuVBvqWbWa/F+z4fKw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=53YWM251H9VWzPwZL
 Ga/y3E7M8h1O10R0/jh3YgaxAo=; b=NI+zKEIlD0SKdM08AWUHyBpTGkQ805WAr
 5a/LCwY27WlnEgDBvHwMBRg2vXt+39oOiGqgPwEjZvkfh4h06RddmiqNyf+GKwOY
 a3SpbN2Bk8LLD5PuMQhNR8Pt2iiTB31x8dpI6LCnhI2AJGebaarTF0X8RL4ZNuTo
 xHmciKo3zEB2OfBG7+X6c5PxGuxHNIRPWVSQrJvSN74vpeFpEUcCkyUk+10jtUKz
 6JfahP0/GuJrb+Vv/2jB/5UVo7w9ZsjNeqq/NW8ks9uVGzlViwA1GK8KBxJY2bXy
 NnG1TZw2EAM2yLBY0rIJ3aRvjbKvuu0D/BTMVBGjAG7H1fAVZ88pQ==
X-ME-Sender: <xms:12MaYr2Vabe9gwiMFAJvID86h--udGhS4RaZebRiWpIyMq7_-W8W3A>
 <xme:12MaYqGrrizgvgvvIbQCXhoak4mr9OCD0LXTTs-SmP7TLYYHREK270ugnzWUsyqSH
 8YJv6sEmIRnn9WJD5M>
X-ME-Received: <xmr:12MaYr4RXsLTyqiXm2bVBjtfNDUf3AWIlxUNs5NVNY7ZBFFarFABb3gSYixLEHh6VphjVzLNKyhri95I7qKtj_-JnevtNgYvAhKr9Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeigdelkecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfgggtsehgtderredttdejnecuhfhrohhmpefrhhhilhhiphcu
 ofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomheqne
 cuggftrfgrthhtvghrnheptdeuudeuhfekudefgfdvtefgkeduveetvdelgfduhffhheff
 ieeivdeigffhgfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepphhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhm
X-ME-Proxy: <xmx:12MaYg2uCaq2yi7foFUWmELIlJVHvhqDgGPTt8Xe8aXiBN2OKltOkQ>
 <xmx:12MaYuGNvg6Yxf4mGjSaZ1qVYD2I9bcsdNI59A1CYKHWpJpNI-0DgA>
 <xmx:12MaYh8r7eSCb7H6C5RFJ6RhaJobjJBDxplrYwupZowHTvNUmnsuTw>
 <xmx:12MaYp9DMGMAppj561J52RZgTeFHD0yDiPqU65qtYd-F6XZSio20QBt09IE>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 26 Feb 2022 12:31:02 -0500 (EST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [PATCH v5 00/22] Update Racket to 8.4. Adjust Chez Scheme
 packages.
Date: Sat, 26 Feb 2022 12:31:01 -0500
Message-ID: <3062387.UNBJiXZ2us@bastet>
In-Reply-To: <f96a572e79582a3d5d1d3b56583ea17369fd0a5e.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <4187312.lXvkglyHfx@bastet>
 <f96a572e79582a3d5d1d3b56583ea17369fd0a5e.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart4621658.hZGDtEnxQe";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--nextPart4621658.hZGDtEnxQe
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"; protected-headers="v1"
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>, Maxime Devos <maximedevos@HIDDEN>
Subject: Re: [PATCH v5 00/22] Update Racket to 8.4. Adjust Chez Scheme packages.
Date: Sat, 26 Feb 2022 12:31:01 -0500
Message-ID: <3062387.UNBJiXZ2us@bastet>
In-Reply-To: <f96a572e79582a3d5d1d3b56583ea17369fd0a5e.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN> <4187312.lXvkglyHfx@bastet> <f96a572e79582a3d5d1d3b56583ea17369fd0a5e.camel@HIDDEN>

Hi,

On Saturday, February 26, 2022 11:14:38 AM EST Liliana Marie Prikler wrote:
> Hi,
>=20
> Am Samstag, dem 26.02.2022 um 10:36 -0500 schrieb Philip McGrath:
> > Hi,
> >=20
> > On Saturday, February 26, 2022 10:08:30 AM EST Liliana Marie Prikler
> >=20
> > wrote:
> > > Am Samstag, dem 26.02.2022 um 08:02 -0500 schrieb Philip McGrath:
> > > > I realized that, if we just pass the origin some other way than
> > > > as the 'source' field, we can avoid adding the
> > > > "chez-and-racket-bootstrap.scm" file
> > > > altogether: patch v5 10/22 does the core of that.
> > >=20
> > > I did miss that nugget when I skimmed it first; is there a reason
> > > to prefer overloading unpack and redirecting it to (package-source
> > > racket-vm-bc) over doing the same, but using simply #$%racket-
> > > origin?
> >=20
> > I like this:
> > > > +            (replace 'unpack
> > > > +              (lambda args
> > > > +                (unpack #:source #$(or (package-source this-
> > > > package)
> > > > +                                       (package-source racket-
> > > > vm-bc)))))
> >=20
> > rather than:
> >=20
> >     (unpack #:source #$(package-source racket-vm-bc))
> >=20
> > to make it easier for a user to provide an alternate source.
>=20
> Hmm, to be fair this would probably respect --with-source, which I was
> missing, but I'm not sure how deep into the bootstrap we could inject
> this.  Sadly, we can't make chez-scheme-for-racket itself a
> transformation.
>=20
> > My concern with:
> >=20
> >     (unpack #:source #$(or (package-source this-package) %racket-
> > origin))
> >=20
> > is less strong, but if `(gnu packages racket)` exports `%racket-
> > origin`, it
> > seems like it would be very tempting to put it in a `source` field,
> > but of course that would cause problems. My hope was that having to
> > write `(package-source racket-vm-bc)` might prompt a little more
> > thought.
>=20
> Hmm.  And what if we go my earlier route of defining this as a
> procedure in chez and instantiating it inside racket.scm?  We should
> not get a cycle triggered by chez-scheme-for-system if we do, but we
> might get one if we attempt to bind it to a variable in racket.scm.
>=20
> That aside, there is also the possibility of using a gexp promise as
> source, as is done for example in the case of linux-libre.  If we wrap
> the chez side in a promise, that ought to resolve the cycle as well.
>=20

Interesting ... I'll have to take a look at that.

In the medium term, for Racket packages, I think the 'racket-build-system'=
=20
ought to provide some support for using a different Racket. For Chez Scheme=
=20
packages it's probably less complicated. (At least, I've had no problems wi=
th=20
the things I've tried.)

=46or now, mostly I thought it would be very surprising if `unpack` silentl=
y=20
ignored the package's `source` and unpacked something else, instead.

> > > BTW for the record, if you're dropping one of my mails from the
> > > CCs, please make sure to include the gmail account rather than my
> > > institute mail.  This one is technically supposed to be for work
> > > and I'm using a rather loose interpretation of "ensuring that
> > > software is up-to-date" as part of my work when I do comment on
> > > Guix issues from it.
> >=20
> > Will do, sorry! (I've been experimenting with MUAs recently and not
> > getting everything right=E2=80=94you may have noticed I sent mail earli=
er
> > from an address I wasn't intending to use.)
>=20
> I haven't noticed, but thanks for pointing this out.  If a commit from
> the wrong address does make it into our git history, please do point
> that out; I'll be happy to adjust the mailmap for you.
>=20

Thankfully git and git-send-email have been fine; only a couple prose messa=
ges=20
came from the wrong address.

=2DPhilip
--nextPart4621658.hZGDtEnxQe
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmIaY9UACgkQygNjjfo/
HHqVAA//akUhtXsqPUe0RXHqVd0wrH9lAZJuycrALXlFWE86kcB2SsPFRWa0TVfa
XHEBqS565DJrZqpBm7t4Vry3Sqc1YgW8wRrCzXbJfQX0qi2ooXQNg+pz7TExxeJB
CKbbrIyFxsBLL1Ci6U6GbRuqh6DziAWIXz6N9MHYJuQ2IEkJMKZRibeg9HDMUy3o
GVuasqaYfo04Bavh3vEFFrtiRnrAjFSHsW/bbRD+0Soi8bBxYchdTRL/Co/3KcrX
acxdjYlw2z9d+yBrzAtq2z0gwsfTZVEu2n8+/TTuPlKXB+BSL+fokNw2lliEvwmZ
5eGCPDX9BnCVz/OqCnk8uFTyr+Br0tIEfzhMrgD8RMu+juauIDOVb7VaMLlL099u
3i1pmkLz8y2Yr7nKImLYrIzmJYa+hKKDGtE2ifUVLQQQ66KEQzu74YQiKoWoGhnx
edmU/FQbY9TY8WPzmRF+WUpws0Ki058Sg16yX+lNb/A4iBPWmg/PVzcm2Ztpb5W0
EoAptMR12KMN/+NxCjuh/Wwbu8tRwezNp2wPoUAhZbHJU731scoHKIAJIk841XIV
ImJA8gr4nL7gbxAGsHP4o32kBLXOIDh4VftNoZt/Fm29NImS1TYFvPenT+cloLGP
Sq7o2vopFteLAQ4nXNbKodzr0Hl7D3yJ/IlIUUySwelJS4D3g8g=
=Zzo6
-----END PGP SIGNATURE-----

--nextPart4621658.hZGDtEnxQe--







Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 17:23:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 12:23:29 2022
Received: from localhost ([127.0.0.1]:56274 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nO0n3-0002y3-6t
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022 12:23:29 -0500
Received: from new4-smtp.messagingengine.com ([66.111.4.230]:34745)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <philip@HIDDEN>) id 1nO0n0-0002xn-2c
 for 53878 <at> debbugs.gnu.org; Sat, 26 Feb 2022 12:23:27 -0500
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43])
 by mailnew.nyi.internal (Postfix) with ESMTP id 0170958017F;
 Sat, 26 Feb 2022 12:23:21 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163])
 by compute3.internal (MEProxy); Sat, 26 Feb 2022 12:23:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 philipmcgrath.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to; s=fm1; bh=HiP9HMgZIgAVA3
 N1rfhkULGbKBNkVNWUAUOQAvlE4Gs=; b=U18bFD6X5HNsXc49NCOi6RAsAhUwtY
 y41WyGNU17gBIoZK5kTJ6b57gWKy2D9jY1D78Vm538MQlYTtdk/3FAxKwamHMlJD
 2pExoHe9BJzQpVsnliq/WOGyegWjVvuHJHoji53pZiLCeDDtk5KvEPgh6V9BSrrk
 89rZnHsbW1XebhdW/m1UqMD1VSc0llOJ3/gEFebRMHMC5Btb/5Hss43lffP7NBV5
 o/wVThb1xcEzTlPXv9hWTp8qYV7R7b1T9hsMZBLHBKchJMD2nG2cW4djeGDnkD6M
 wcIStl3wBLK2AFjSAcTUCCray7lonVUDvfjgsvGLa2maVktGjTebwQ/g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=HiP9HMgZIgAVA3N1r
 fhkULGbKBNkVNWUAUOQAvlE4Gs=; b=F0YpMgQeAzyhcgG8lNTOd4CnjjrPH9hNN
 QH8UmaH9YElBDHwdRLGKxWYj2T4R2T3V6FBjf5+NR2boorJfAQmaj7SpO2zXtK4p
 +r+UfMVqCafKUM9RHHMP4H+Cf43lIvc9F+TCimkYCJ/vXE+/PYC9Z5KPIxSzCBsr
 2Travl4LkrMNrfF/9/7U3WLY+oVxW8/c/UzEuL8YwrP0DAJPeUa+9JKxYu9t+ZjD
 AH3gB5gfhTLHpQPvCWR9ksDHjWikmmEDrobklPfHtpmsltQwupV3tMd0jXkR5spZ
 FXbMPCC4HqIBSrqzF0+lZ61ga+1xItN8usKOYzETYDyxBQUk9inRg==
X-ME-Sender: <xms:B2IaYv8Xh7reKgWvkyxGtBK3_iK5qJhCw9JLc6I9hOip2jtialGzMA>
 <xme:B2IaYrttHlSXhbhxwxcvYF87Y7Z8Ku3HXXgEmy4hWPLiQRG8wOEVC3On1AOyG7buv
 tBD8l8dfptuAn_AbRc>
X-ME-Received: <xmr:B2IaYtAST3F_NwVco_JMM_7DmniY93Yp-V3YtYXJoagrvfc0oJwOSFzyyK-NKmgXyz7j-hprqeEvr93BmlVbYs0dUzCGF4dTfflFTA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleeigdeljecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfgggtsehgtderredttddvnecuhfhrohhmpefrhhhilhhiphcu
 ofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomheqne
 cuggftrfgrthhtvghrnhepkeegtedtveffueejleejueelvdevfeeivdeihfduveehueev
 hfffuefhieefhedtnecuffhomhgrihhnpehgihhtlhgrsgdrtghomhenucevlhhushhtvg
 hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesphhhihhl
 ihhpmhgtghhrrghthhdrtghomh
X-ME-Proxy: <xmx:B2IaYrdONUZ8BSsJczcAb_Reld2CeHx1HS486trthHY0_yB3J3y4BQ>
 <xmx:B2IaYkOyYkjpiMkzDmKKwdbZ6thz75jCjsEz4KcRIPez5tOu0lNeqA>
 <xmx:B2IaYtm02G6q9BnqydikkUD5ZD-K6AtM6C9xiIfZ5V8JGWIQTDvvYg>
 <xmx:CGIaYtmvWWdvwsmXHHspfwfH_NncASmEvvQuF_pGCoCWtQu1h8fU6Q>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 26 Feb 2022 12:23:18 -0500 (EST)
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 12:23:17 -0500
Message-ID: <19823080.dSP1spjjOr@bastet>
In-Reply-To: <0c9963cedab248085b106effdd68649647a41ca2.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN>
 <3354324.gHnXMxdNb5@bastet>
 <0c9963cedab248085b106effdd68649647a41ca2.camel@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart26267686.q7ltLs4Q0i";
 micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 53878
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>,
 Maxime Devos <maximedevos@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 raingloom <raingloom@HIDDEN>, Attila Lendvai <attila@HIDDEN>,
 Malte Gerdes <malte.f.gerdes@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--nextPart26267686.q7ltLs4Q0i
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"; protected-headers="v1"
From: Philip McGrath <philip@HIDDEN>
To: 53878 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>, Attila Lendvai <attila@HIDDEN>, Malte Gerdes <malte.f.gerdes@HIDDEN>, raingloom <raingloom@HIDDEN>, Maxime Devos <maximedevos@HIDDEN>, Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: [PATCH v5 03/22] gnu: racket: Use Git origins for Racket packages.
Date: Sat, 26 Feb 2022 12:23:17 -0500
Message-ID: <19823080.dSP1spjjOr@bastet>
In-Reply-To: <0c9963cedab248085b106effdd68649647a41ca2.camel@HIDDEN>
References: <20220220060610.178131-1-philip@HIDDEN> <3354324.gHnXMxdNb5@bastet> <0c9963cedab248085b106effdd68649647a41ca2.camel@HIDDEN>

Hi,

On Saturday, February 26, 2022 9:26:29 AM EST Liliana Marie Prikler wrote:
> Am Samstag, dem 26.02.2022 um 09:20 -0500 schrieb Philip McGrath:
> > On Saturday, February 26, 2022 8:47:45 AM EST Liliana Marie Prikler
> > 
> > wrote:
> > > First, can we simplify "make-installation-layer.rkt" to "make-
> > > installation-layer"?  I don't think the file extension conveys much
> > > meaning here, or does it?
> > 
> > To me (I don't know about anyone else), the ".rtk" extension tells me
> > that I  have to pass the file as an argument to `racket`, i.e. that
> > the file is not a launcher from `raco exe` or a script with a shebang
> > that I could `invoke` directly.
> 
> I'm not talking about the generated file, but the procedure that
> generates it.  Special characters like dots and slash are still pretty
> special in Scheme, even if they're allowed as identifiers.
> 

Do you mean A, B, C, and/or D of these:
a
>           (replace 'configure
>             (lambda* (#:key inputs configure-flags #:allow-other-keys)
>               (let* ((racket (search-input-file inputs "bin/racket")))
>                 (apply invoke
>                        racket
>                        #$make-installation-layer.rkt ;; <--- A
>                        `(,@configure-flags
>                          ,(dirname (dirname racket))
>                          ,#$output))
>                 (invoke racket
>                         "--config" (string-append #$output "/etc/racket")
>                         "-l" "raco" "setup"
>                         "--no-user"))))
>
> [...]
> 
> (define make-installation-layer.rkt ;; <--- B
>   (scheme-file
>    "make-installation-layer.rkt" ;; <--- C
>    `(module
>      make-installation-layer racket/base ;; <--- D
>      (require racket/cmdline

or something else?

In particular, not to be dense, but B is not a function. 

One of the reasons I particularly like being able to use `.` in identifiers is 
to refer to files by name, without some ad-hoc encoding.

> > > I think some way to shorten those origins would do wonders in terms
> > > of the number of lines this patch adds.
> > 
> > At one point, I had abbreviated the origins as something like:
> > 
> >   (REPO-SPEC SHA256 [COMMIT])
> > 
> > [...]
> 
> I wouldn't do this inside of extract-package-source, but define a one
> or two liner for adding specifically packages hosted on racket's
> github.  WDYT?
> 
> > I wasn't sure about the trade-off between being slightly more cryptic
> > than explicit origins, but a lot shorter.
> 
> Note that the goal is not to code golf, but to be understandable.  When
> adding a bunch of origins as inputs, understandability suffers by
> induced scrolling.
> 

I've done this, and it was a very good idea. In particular, it helped find 
some places where I hadn't switched to using `%racket-commit` once the release 
was tagged.

Other than potentially doing something about "make-installation-layer.rkt", 
I'd plan to squash the WIP/FIXUP commits in
<https://gitlab.com/philip1/guix-patches/-/tree/racket-chez-refactor-hist-28>
and send it as v6.

-Philip
--nextPart26267686.q7ltLs4Q0i
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmIaYgUACgkQygNjjfo/
HHpiYBAAhgNqtXQh02QvMmLy9w9ratJOeVlrOJrw2lHS69FenYboVB1VMcxE2sy2
A2RN0UgA2F5tkaslTwy9HTVd4a7zv54rW71Xxw5n8mN458vV5ev+GcsraDYqBOrA
ATwi3Dri7hL6FDH9GOmA1A9cQTIFehzAh+8JfjN0ye0uEFZYj2m0xQMZjNgDfzKl
18dYbwiDVTRfHzer1E5PmlrgnBoow4ZSxC/QA10aFDQNw1ecsYdeqx45v4UUCTwQ
NgJkfWWMA4BRhPxz4y+2pUUzNHIjFfV0bL/ewpDz0Woj2VSzK+PzWOR6owKB2g8s
Q1bX6vo7y3mzH8I1p9485H9aCUeXFmbnReglqyRW/+Axw855GZ94aNT6RgnesyZW
dpSpm3OnLNF0yuLfb5ujlr2OUWyQWEA82VKhGVBjiB2EZQsPt7JYMmOMmxi5hNRC
v++00gLG5V+HQnccm4Bk5+gqH63BipFvu32JE45I/CqEvSBFMlx5cWrbUvw7KR1z
ST9BBfKSoqIhWQof6ya9RVvhlRQCfZU3XivQLk3hgJr0NO0x5DrlEJaOtFuFOjZP
z35C4FQTPt6IfqMxwFRr+tRyJIQd/ZQBcH4R/J19FOW5mTUMJT8VhL23t6aXisYX
LJaqLHgdKSM23/mNDIWKu80m41UCTMY7MwxFEPuPH0C6qRX62mQ=
=HkXh
-----END PGP SIGNATURE-----

--nextPart26267686.q7ltLs4Q0i--







Information forwarded to guix-patches@HIDDEN:
bug#53878; Package guix-patches. Full text available.

Message received at 53878 <at> debbugs.gnu.org:


Received: (at 53878) by debbugs.gnu.org; 26 Feb 2022 16:14:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 26 11:14:48 2022
Received: from localhost ([127.0.0.1]:56205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nNzia-00012C-HM
	for submit <at> debbugs.gnu.org; Sat, 26 Feb 2022