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 6KwCNlPkGmLLUgEAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 03:39:15 +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 0G+lLlPkGmITJwEAG6o9tA (envelope-from ) for ; Sun, 27 Feb 2022 03:39:15 +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 60AF72A60F for ; Sun, 27 Feb 2022 03:39:15 +0100 (CET) Received: from localhost ([::1]:39312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nO9Ss-0006pP-1P for larch@yhetil.org; Sat, 26 Feb 2022 21:39:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nO9Sh-0006oe-6C for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34460) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nO9Sg-0006Tx-U5 for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nO9Sg-0004IK-Pk for guix-patches@gnu.org; Sat, 26 Feb 2022 21:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v6 09/24] gnu: configure-layer.rkt: Adjust indentation. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 27 Feb 2022 02:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53878 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53878@debbugs.gnu.org, Liliana Marie Prikler , zimoun Cc: Philip McGrath , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , raingloom , Liliana Marie Prikler , Attila Lendvai , Malte Gerdes Received: via spool by 53878-submit@debbugs.gnu.org id=B53878.164592948416280 (code B ref 53878); Sun, 27 Feb 2022 02:39:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 02:38:04 +0000 Received: from localhost ([127.0.0.1]:56554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nO9Rj-0004EL-Jl for submit@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 ) id 1nO9Rh-0004DY-DL for 53878@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@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 Date: Sat, 26 Feb 2022 21:34:35 -0500 Message-Id: <20220227023450.1877215-10-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227023450.1877215-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227023450.1877215-1-philip@philipmcgrath.com> 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=1645929555; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=O2S2PRHkG8IvVGmB0WnxootYPk4QM0bZwqLu/W8JFKU=; b=cVesQzPXqA8r4aPto7R/jLZZty8qJEDtnJBpHJYtJ5UP2PVtDBON0Km9DXoG15JISUJHpW mpXGzuqvk2zclPBRSXVppqLL9/37PETTHmIuvJRLqwAVVusrnY0uVwNzlwlDqvlJB5xLsY yYHI6p1J5JS5qpi4Pa/okxczeGikkoJdcNtnpMluiNkWeO6tmnXfNIT3tyURb4Dr1znFM+ sgkG3kn6FuHw/QZWExBucvRPz66twc0Zwk620MoYff8s4JkV3qxHZMCLalFwSEO+6d3JVH 9WdGjUePKKE+Pl55fE7mw1ioFh89dvrK9KOzmMSnDMBzms24FtxSfpCGd++6ig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645929555; a=rsa-sha256; cv=none; b=cgRJYZxW8AbMIhBDyJ6BjRnPujtp3PtvSJRjhWJfNy4/cLvgMQsHfYOnoZmYa6UBK8GB6w pzA7hVcg7g+iCGutRZFhzonQUA2tAAqTn3GwPXjvYJB3dFjfJ2GDTYuGz7ImHNYWHLgsnO WxzHXKM4p8u+gq67Sh2ciDpFTtknYsQ7aW96/i1o0PBFOhVNOH10jnuA+S3PVnJtBFJ73T /RzUonZeUBsPNX2blTep6kc5BFw5B8WD8PD8qJ7rs8F0irhXChmfBOLlew+Ub0bDb66BB4 WiC1+aDuMKzoKwfZU7N98d2xtpvoN6S6eQXstdqAX1LBTPrtMyPItEvFYQhHOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=TzbthcmP; 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.89 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=TzbthcmP; 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: 60AF72A60F X-Spam-Score: 3.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: nwFLyMDp8c0Y * 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