From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 iEL1A+btG2K8TgAAgWs5BA (envelope-from ) for ; Sun, 27 Feb 2022 22:32:22 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6DGfAObtG2KsnAAAauVa8A (envelope-from ) for ; Sun, 27 Feb 2022 22:32:22 +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 6A0673F968 for ; Sun, 27 Feb 2022 22:32:21 +0100 (CET) Received: from localhost ([::1]:59270 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOR9O-0000Vq-IW for larch@yhetil.org; Sun, 27 Feb 2022 16:32:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOR99-0000Vc-1F for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37241) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOR98-0005ej-P6 for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nOR98-0008HQ-La for guix-patches@gnu.org; Sun, 27 Feb 2022 16:32:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53878] [PATCH v7 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 21:32: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.164599747031698 (code B ref 53878); Sun, 27 Feb 2022 21:32:02 +0000 Received: (at 53878) by debbugs.gnu.org; 27 Feb 2022 21:31:10 +0000 Received: from localhost ([127.0.0.1]:59354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nOR8H-0008F3-NR for submit@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 ) id 1nOR7u-0008Ch-5o for 53878@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@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 Date: Sun, 27 Feb 2022 16:29:05 -0500 Message-Id: <20220227212920.2009000-10-philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220227212920.2009000-1-philip@philipmcgrath.com> References: <20220220060610.178131-1-philip@philipmcgrath.com> <20220227212920.2009000-1-philip@philipmcgrath.com> MIME-Version: 1.0 Content-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=1645997541; 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=PutN4x7jn6ODMb7ESFDxkatnHChHdH/PL2YoIfBEHJk=; b=eZ7DByiVNk1syhdkog4LMUgrZAVNZrvDcaQts+HcARHJcXqqbLUX9T0Rzz8qu/aX7lG1DU SFpcF4G4qaF8i5wcIYLVAZ7EtXQfT2FCE/l6LjArkxhY+EMI76TZDxiUEj+//wMxK3MCkN C5CFz8Dh1SlPVmZppWp3mH+4RlbJuzwDX0J+PE8f/00ngu/VHA73X9itAEB2dO6opzSib9 ejNY+Yj+xl1VB181ni7Uzxcu9rvwOSzO/39MzGuiSiiIwGnA0Jm1ZBTuDbShoRKZUpxk8f HkjgdOl6tLbuK6kMX32lt8r3sqIcC903kWEvi5kRzLOtnBdrXo8KAFpJUpOA2w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1645997541; a=rsa-sha256; cv=none; b=OPM+xry60G9x1CPtnNrg0UTnY74Jl4EpgO6VRdAXjUGst9woyBxyhCNKtqOQEQMLIW40em +yvO0ttBX9qhn8piTS+lD9N3d4T2z95PAoNYUVa24boV66y/7/BykxpPvbjSaXQzzszrFi pd/8bWzUhcfUmCmX4NaJ8WOM0pniDOljZ/dEs6S7DmtW9XVCEQZID+x7V5EOAFMwL8KLdo /ohPRMtIiip1DLKvFxbdiImoyUXs+wwJtbSON4oDNYMWukVOahFhlyLAR7iPHc6cSIWQ6t fRhhmkzlwbv3Ynq//Mv2I4Ak48T2PSkxC4vzvCXeZma0X+L2ZsMDkTArIIhQvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=YnS7e0SO; 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.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=YnS7e0SO; 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: 6A0673F968 X-Spam-Score: 3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: 87LYcuCjjzSh * 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