From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QCE7BLs5G2ImGQAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 09:43:39 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YKObOLo5G2KEQgAAG6o9tA (envelope-from ) for ; Sun, 27 Feb 2022 09:43:38 +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 7A4043219C for ; Sun, 27 Feb 2022 09:43:38 +0100 (CET) Received: from localhost ([::1]:40152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOF9U-0001QH-8m for larch@yhetil.org; Sun, 27 Feb 2022 03:43:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOF8y-0001Pu-DW for guix-patches@gnu.org; Sun, 27 Feb 2022 03:43:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOF8w-0008Hy-H4 for guix-patches@gnu.org; Sun, 27 Feb 2022 03:43:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOF8w-0006x3-Bm for guix-patches@gnu.org; Sun, 27 Feb 2022 03:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 03/24] gnu: racket: Use Git origins for Racket packages. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 08:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath , 53878@debbugs.gnu.org, zimoun Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164595138126714 (code B ref 53878); Sun, 27 Feb 2022 08:43:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 08:43:01 +0000 Received: from localhost ([127.0.0.1]:56824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOF8q-0006wk-4P for submit@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 ) id 1nOF8o-0006wW-0z for 53878@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@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@gmail.com> From: Liliana Marie Prikler Date: Sun, 27 Feb 2022 09:42:46 +0100 In-Reply-To: <20220227023450.1877215-4-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> <20220227023450.1877215-4-philip@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1645951418; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=vGFOHGGSXYAmTmBpNW4tlRDglUmF/CfPSvu/LylXWGA=; b=MINvL8gpvcZMrmW6hGByOzYJhk63dM9k8p8F5MrNt2p33o8RLsxiI4PS+emsUXhy8sHTk7 dv12pL6m4Dwg/hW3BUZMyPMSXA+dSG4RnkFdeba6eZBjULSxNnNYXcBn18Bm/uZ3F4SLit 2CY+Y4v9t7yUcw2bwi+kUWmXvXeMMx/7Gy+VJIAwIajxgle4fI8w3Loam/un95pvFPMH+l N8wSc9tvavOTv3QzJ4gbj9Q4K3qIrn5vNBHU/v2Cj4aaehzfA98/zNttDnnmhBs0Zwbqi5 YU3+ow080SI1AM60f4y+UE+2YOLU8YeUQQsqaw9EdU0voya36o2/crLR9UfONg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645951418; a=rsa-sha256; cv=none; b=YUVRojvMyhL7e+8EJBum5/E83IeTKgNf1AlMep4LJcySoq4G7BOp99H3LZt1u5WEmQk/GW Xj3FVzO5Ge59WrE8bg63abJ81EdVhudAHXoLZeEt4s2KTnrIhoGMFhIJ2wF1wCpnuC7hfx v+m+vxB95b4axitB3dXi7qs+6fQm3OFGiU1vuzSphjDIVRlYv/k5GfHMOr4B5f3+W/g2oX bON7t6wSplbGZKL1qrzDuxYvBqqiPUjCK2ezhdeuRbtpeyCKmXrFrEsuB9ZwDSHrLuLdnE bK5oKdJzKEb61iFUmUGdwAwkbLeUQotManDOEFSq0721Fp/Iwi/+u1wl+HyXYQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gAjG7enj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 6.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=gAjG7enj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: 7A4043219C X-Spam-Score: 6.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: sZ5I1m/IzbDQ 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