From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KF0CBUhREGIMVQAAgWs5BA (envelope-from ) for ; Sat, 19 Feb 2022 03:09:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sMJdOUdREGJBSwAAG6o9tA (envelope-from ) for ; Sat, 19 Feb 2022 03:09:11 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E4E7F3FD9F for ; Sat, 19 Feb 2022 03:09:10 +0100 (CET) Received: from localhost ([::1]:58674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLFBN-0003fi-9V for larch@yhetil.org; Fri, 18 Feb 2022 21:09:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLFBG-0003fZ-B5 for guix-patches@gnu.org; Fri, 18 Feb 2022 21:09:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLFBF-0006mf-VU for guix-patches@gnu.org; Fri, 18 Feb 2022 21:09:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nLFBF-0005bK-Oa for guix-patches@gnu.org; Fri, 18 Feb 2022 21:09:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v2 15/15] gnu: racket: Update to 8.4. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Feb 2022 02:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Attila Lendvai , Malte Gerdes , zimoun Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164523648321459 (code B ref 53878); Sat, 19 Feb 2022 02:09:01 +0000 Received: (at 53878) by debbugs.gnu.org; 19 Feb 2022 02:08:03 +0000 Received: from localhost ([127.0.0.1]:56635 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLFAI-0005a3-IC for submit@debbugs.gnu.org; Fri, 18 Feb 2022 21:08:03 -0500 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:53749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nLFAF-0005ZS-VH for 53878@debbugs.gnu.org; Fri, 18 Feb 2022 21:08:00 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id D813D5801E4; Fri, 18 Feb 2022 21:07:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 18 Feb 2022 21:07:53 -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=gg7rWAbnEipuTw UmqCD/9HNJcOh7lVe1WqeSbKc2EA0=; b=drY16DJxlMk52PdqqpuNdacLQNcRTZ pnFJJLVhGFn2ZaRRjnLUd8orIPgOIwzp8xeihKq7Tao6oKFzvwVxWfo/lgQnK8jd UGkrFu3Vqgs2YSDMDkIva3Gjgas1XYKh2r1+HmkEJ38QQOCGaCL+a9RJOm55vxxZ f8pYiKZ3JrGNlkp9jJjH6G8mEGgjI1k0ctNaPFvLvKLL+Dh6lvs6O7pfwGpl0kXy NqDNM/c39UK6rkU1NGheQGpQ6bwHx1aG9cWo0wNFFyqcLhb/FpCqosqEaeRI/pWZ de1RhEA9eVST7qzp563jq3n2zNb0IafcDGicP4NE1QEDFTvbSRE8u9yw== 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=gg7rWAbnEipuTwUmq CD/9HNJcOh7lVe1WqeSbKc2EA0=; b=lvkIN58UxVntXPmyKIifOouP7H7TvK+f3 L5UEQS1rtrMI7eH/CERk7hBe/0laNl/sSy8C2Q8k43zA6WcqJIgcVu4C747K7XYq 8+ojiUu57PTm8pHG8LwVx+2OMfoQyV0knOZWV2BbkIhnx2GnfW7+dxOO56Q1LV/X mp+ckFdFDZhZGuEFLoOKf44n5mTpPoDESKw1t8RiZ+Rrhnj++nkJbPrvjldSF8eR CzZz/QVckFLKgs2raHrtygheGZzBEATEmzYeJjT2jn5yLe0PT7cbUuQWM4Q70yYz KXuo/+rutmeAAIPQ8nx+Y93lskhWVZL2pgx17pvyg2pwWiNwsQ21w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkedugdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfgggtsehgtderredttdejnecuhfhrohhmpefrhhhilhhiphcu ofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomheqne cuggftrfgrthhtvghrnhepfedtkedtudelhedvjeeluefhffeiteevffevjefghfefffet keevjeeuleefleevnecuffhomhgrihhnpehgihhthhhusgdrtghomhdprhgrtghkvghtqd hlrghnghdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Feb 2022 21:07:52 -0500 (EST) From: Philip McGrath Date: Fri, 18 Feb 2022 21:07:45 -0500 Message-ID: <4115207.GWgNnq4OGx@bastet> In-Reply-To: References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-16-philip@philipmcgrath.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2939840.usEhuI6WJi"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645236551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=gg7rWAbnEipuTwUmqCD/9HNJcOh7lVe1WqeSbKc2EA0=; b=jXVEHomhsGrFUu6hfzHDp5Eh7AN/VnQNnUd+nlNNs1neqCWv7c5CZKfwM354DUXN4E5Hlb 1LCOoHZMHTSZ6Qwr3eI3G0nUzdBqHNL55Ei6dhhefNJ9hCfTHn12G2yW3FBb9sPRoLOPqx 61I5I/A6BpSv4vkO+5ZTfOvT5r6qqO0gI3AlKbHUJtgea/EFZbCirnj8sMGJQhh6veoKrA qn2c/JTAfKRTah1vx5nQxDtB3a4QmuULjPHhfR1rpd1DYDUIxyj/9yfnwIFbARNFM0Ou39 yC/6/sjKaFp+rtefZWXjIP/hjK08P3DYcRNuE/nRKXMt/YmQ5tInI2RSm077CA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645236551; a=rsa-sha256; cv=none; b=QlFeJKdO6KN67nqJ4FHWVb4AaHoDYPE4A/SdZgmv5mozNixlXB0gOalZYuCnn30nydK2J+ QwkoxibHMxgdCLfsykf64DVaHYcY8PY5tPRGvNFthhcadcx1vcnz+PmAwMxXjzBj3Is7f8 kz4riwHjRWYz9OF/vedOmWvgCidPV7G/wW8zcVRxHp93b8k1bAi675J1IOFjBOgWFTGdGa fdE9t6UG/vIMucJVeJ0421AQU50LKTqDt0JPnEi74tihsP9yMt6K7URiHru2DePGiihkZ3 s++KMo160HYDKQFzLCH9CUSRBuFAnPBns3iOhw75LYUL9K+Ussafkl8TqY1O2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=drY16DJx; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=lvkIN58U; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b=drY16DJx; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=lvkIN58U; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E4E7F3FD9F X-Spam-Score: -3.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: cS+puh6EwuEO --nextPart2939840.usEhuI6WJi Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Philip McGrath To: 53878@debbugs.gnu.org, Liliana Marie Prikler Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= , Attila Lendvai , zimoun , Malte Gerdes Subject: Re: [PATCH v2 15/15] gnu: racket: Update to 8.4. Date: Fri, 18 Feb 2022 21:07:45 -0500 Message-ID: <4115207.GWgNnq4OGx@bastet> In-Reply-To: References: <97f8916ae5bd8d8459bdfd507864f2f55cc217a1.camel@ist.tugraz.at> <20220217205048.967383-16-philip@philipmcgrath.com> Hi, On Friday, February 18, 2022 2:38:52 AM EST Liliana Marie Prikler wrote: > Hi, >=20 > Am Donnerstag, dem 17.02.2022 um 15:50 -0500 schrieb Philip McGrath: > > -;; Commentary: > > -;; > > -;; Here's how bootstrapping minimal Racket works: > > -;; > > -;; - Racket BC [CGC] can be built with only a C compiler (except > > for > > -;; one caveat discussed below). > > -;; - Racket BC [3M] needs an existing Racket to run "xform", > > -;; which transforms its own C source code to add additional > > annotations > > -;; for the precise garbage collector. > > -;; - Racket CS needs (bootfiles for) Racket's fork of Chez Scheme. > > -;; It also needs an existing Racket to compile Racket- > > implemented > > -;; parts of the runtime system to R6RS libraries. > > -;; - Chez Scheme also needs bootfiles for itself, but Racket can > > simulate > > -;; enough of Chez Scheme to load Racket's fork of the Chez > > Scheme compiler > > -;; purely from source into Racket and apply the compiler to > > itself, > > -;; producing the needed bootfiles (albeit very slowly). > > -;; Any variant of Racket since version 7.1 can run the > > simulation. > > -;; > > -;; So, we build CGC to build 3M to build bootfiles and CS. > > -;; > > -;; 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 > > -;; README file applies to all such subsystems: > > -;; > > -;; The Racket version must be practically the same as the > > current Racket > > -;; verson, although it can be the Racket BC implementation > > (instead of > > -;; the Racket CS implementation). > > -;; > > -;; 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. > > -;; > > -;; However, other Racket subsystems implemented in Racket for Racket > > CS > > -;; use older C implementations for Racket BC, whereas the reader, > > expander, > > -;; and module system were completely replaced with the Racket > > implementation > > -;; as of Racket 7.0. > > -;; > > -;; For Racket BC, the compiled "linklet" s-expressions (primitive > > modules) > > -;; are embeded in C as a static string constant. Eventually, they > > are further > > -;; compiled by the C-implemented Racket BC bytecode and JIT > > compilers. > > -;; (On platforms where Racket BC's JIT is not supported, yet another > > compiler > > -;; instead compiles the linklets to C code, but this is not a > > bootstrapping > > -;; issue.) >=20 > I think it'd be clearer if this commentary was moved along with the > bootstrapping code. I did add it to "chez-and-racket-bootstrap.scm" at the same time as I added= =20 the Racket bootstrapping code there. But I didn't delete the bootstrapping= =20 code from this file until this commit, so I deleted the associated comment = at=20 the same time. > Is there a reason why we can't use (racket-vm-for- > system) before updating Racket to 8.4? This looks like another of > those "two things at once" patches. > =20 The whole series based on `racket-vm-*` would not work with Racket 8.3 with= out=20 backporting at least some things: off the top of my head, at a minimum, we= =20 would need b53090140596cc8522037f4c812325c71648df7a and=20 2b282d9c48df811cd4678cdbaed8258cdef23946 to be able to build "chez-scheme-f= or- racket:doc". Maybe it will seem less like "two things at once" if I explain more explici= tly=20 that "racket-minimal@8.3" is actually the same content that is now in "rack= et- vm-cs@8.4" (just installed into different directories), and does *not* cont= ain=20 anything that is now in "racket-minimal@8.4".=20 Shortly before the release of Racket 8.3, it came to light from the=20 intersection of a few conversations (scattered across several places, but=20 summarised in and the following two comments) that the conte= nts=20 of a "minimal Racket" were inconsistent. On Windows, Mac OS, and "x86_64- linux-natipkg" (a special configuration that avoids relying on a system pac= kage=20 manager, e.g. for CI), minimal Racket had "racket-lib", "base", and package= s=20 providing native libraries (e.g. OpenSSL and SQLite). On other systems,=20 whether using pre-built binaries or building from source using the released= =20 tarballs, "minimal Racket" would end up with only the "racket-lib" package,= =20 because "base" was pulled in only as a dependency of the native library=20 packages. However, when building minimal Racket from the Git sources in the= =20 way Guix was, "minimal Racket" ended up with no packages installed at all. Matthew Flatt's conclusion was that, starting after the 8.3 release (to all= ow=20 more time for testing), "racket-lib" should directly depend on "base", and= =20 "minimal Racket" should always explicitly install "racket-lib". (That fits = the=20 semantic roles of those packages, which represent the current always-availa= ble=20 native libraries and the current "built in" collections in the Racket packa= ge=20 system's model of dependencies and compatibility.) That works out especially nicely for Guix, as it gives us a clean boundary= =20 between the core Racket VM and compiler, with all of the bootstrapping=20 involved, and building Racket packages and installation layers, which can b= e=20 handled in a nice, uniform way and eventually turned into a `racket-build- system`. > > (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")))))) > > - (inputs > > - `(;; common to all racket-minimal variants: > > - ("openssl" ,openssl) > > - ("sqlite" ,sqlite) > > - ("sh" ,bash-minimal) > > - ;; only for CS > > - ("zlib" ,zlib) > > - ("zlib:static" ,zlib "static") > > - ("lz4" ,lz4) > > - ("lz4:static" ,lz4 "static"))) > > - (native-inputs > > - `(("bootfiles" ,racket-bootstrap-chez-bootfiles) > > - ,@(package-native-inputs racket-bootstrap-chez-bootfiles))) > > + (version (package-version (racket-vm-for-system))) > > + (source (package-source (racket-vm-for-system))) > > + ;; 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-for-system))) >=20 > As outlined earlier, I believe Racket should define its version, not > racket-vm-for-system. >=20 As I said, I'll send a v3 with %racket-version. But the reason I think the `racket` packages would be a particularly bad pl= ace=20 to define this for reasons related to what I was just describing. Once we h= ave=20 a `racket-build-system`=E2=80=94and we are getting ever closer=E2=80=94`rac= ket-minimal` will=20 simply be a tethered installation layer with two packages (ignoring=20 "natipkg"), assembled with something somewhat like the `texlive-udpmap.cfg`= =20 function. The `racket` package will likewise be a tethered installation lay= er=20 with 203 packages, two of which will be shared by `racket-minimal`. We will= =20 want to have others, both larger (e.g. "main-distribution-test" and all of = its=20 dependencies) and smaller (e.g. some people like just "drracket" without so= me=20 of the more niche dependencies of "main-distribution", like the support=20 libraries for the textbook, "Schreibe Dein Programm!"). A major motivation = for=20 the whole design of the Racket package system (actually, its second package= =20 system) is that the "main-distribution" package and the Racket distribution= =20 based on it should not be in any way special or built in: it happens to be= =20 released at download.racket-lang.org, but there can be many Racket=20 distributions. Some might go so far as to argue that any special status of= =20 "main-distribution" falls under the category of weaknesses and restrictions= =20 that should be removed. > > (define-public racket > >=20 > > (package > > (inherit racket-minimal) > > (name "racket") > > - (version (package-version racket-minimal)) ; needed for origin > > uri to work > > - (source > > - (origin > > - (method url-fetch) > > - (uri (map (lambda (base) > > - (string-append base version "/racket-src.tgz")) > > - %installer-mirrors)) > > - (sha256 > > - (base32 > > - "0jdr0y7scvv2a3sq456ifrgq0yfsbiwavdf2m86zmrapp481mby4")) > > - (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)) > > - #t)))) > > + (source #f) >=20 > Why? >=20 The vast majority of package in `racket` are not developed in the repository. For that matter, the source of the "m= ain=20 distribution" package itself is =20 (and, under the Racket package system's notion of versions, it is at versio= n=20 "0.0"). > > (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" ,(package-source racket-minimal)))) > > + (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 > > + (racket-vm-for-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)) > > + (substitute-keyword-arguments (package-arguments racket- > > minimal) > > + ((#:configure-flags _ '()) > > + #~`("--tethered" > > + "--extra-foreign-lib-search-dirs" > > + ,(format #f "~s" > > + '(#$@(map (lambda (name) > > + (cond > > + ((this-package-input name) > > + =3D> (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")) > > + ((#:phases parent-phases #~%standard-phases) > > + #~(modify-phases #$parent-phases > > + (delete 'unpack) > > + (replace 'build > > + (lambda args > > + (mkdir-p (string-append #$output > > "/lib/racket/pkgs")) > > + (for-each > > + (match-lambda > > + ((name src) > > + (copy-recursively > > + src > > + (string-append #$output "/lib/racket/pkgs/" > > name)))) > > + '(#$@main-distribution-packages)))))))) > > (synopsis "Programmable programming language in the Scheme > > family") > > (description > > "Racket is a general-purpose programming language in the Scheme > > family, > > @@ -539,82 +224,899 @@ (define dest (string-append pkgs-dir "/" pkg)) > > DrRacket IDE, libraries for GUI and web programming, and > > implementations of > > languages such as Typed Racket, R5RS and R6RS Scheme, Algol 60, and > > Datalog."))) >=20 > This looks like a very weird way of phrasing union-build. Is there a > reason to do this rather than union-build? >=20 IIUC, packages aren't supposed to install symbolic links into their sources= ,=20 as `union-build` would do=E2=80=94wouldn't that prevent all of the extraneo= us files in=20 those origins from being GCed? There's also the fact that `name` may be=20 different from the name of the last element of `src`: in particular, in a=20 significant number of cases, `src` will be something like "/gnu/store/ x22awqf0rbcyyk88kj82zihmdgkfhgza-racket-main-distribution-8.4-checkout" whe= n=20 `name` is "main-distribution". =2DPhilip --nextPart2939840.usEhuI6WJi 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/HHoFAmIQUPEACgkQygNjjfo/ HHrP1RAAs6nEAIOFtlcE17af4Fdr+qf0nEn60f4UbZd8bpHMU2BwecLk/JWyN28P bP8i9PkJ0xhW/OdSFRz5My+EopD36x/J5P+uMgmg2X7wss+SCIvl/YlXuWM4EILD gU40n3Hxs5cj0070niM9bzMTSgs8OAKuqxJsYFxaf+RK+dBZ9WBW3MADKMcnEt9M 6n2YugHJwMlN7+DHusjtHHpEFURT/RPnhgXwaLS4GWpYEX+gKe3x7Zc2Rrerlvrf ReZay5iPkItuUn7bfXkcz+Ryw87wTt/oJSnyy8ChN6WdIhHohgKr89haVNNurOeE iqFqe/AYaHAt8A+E39r8JJKDHVpdLweNJ5sT11bY/gPNrTStSrn0YvX89hqPqJE/ bOBRH4xb35wvVZoFoXB/gOXtJ9IFfdmzDo41uinGrhFw7VwlROG7bBAGI9u9cA5g YrbKCh4mQx0AF2P1FMGg/5KHmnYCzRmjJqb7+NaPy1FdzoRUU4Uwoac10qeySfxR KPRzBu7Xl1cG+Ec1XyDnCYtThCHmUtRefdgst0f+KZ+4zMMoFPKCEL4XePrfUocl DpfqDlT9xHVrpTA9vSRKvIhfN3eHAGAcgY5IWiwgGv9AXhpMz98oCkTeYeHxe5/Q YFDFkkFrczA86Lrgy8iOAMkrrYvCvzB9K2cEkmD41bBiT7YFTe8= =h3wd -----END PGP SIGNATURE----- --nextPart2939840.usEhuI6WJi--