[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/25: gnu: configure-layer.rkt: Adjust indentation.
From: |
guix-commits |
Subject: |
09/25: gnu: configure-layer.rkt: Adjust indentation. |
Date: |
Fri, 4 Mar 2022 17:54:14 -0500 (EST) |
lilyp pushed a commit to branch master
in repository guix.
commit f6cd4279a01ad6f08fd319c7ce3940315dc7c2ff
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Sun Feb 27 16:29:05 2022 -0500
gnu: configure-layer.rkt: Adjust indentation.
* gnu/packages/racket.scm (configure-layer.rkt): Wrap 'command-line' in
'define-values' to reduce rightward drift.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
---
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 f5f2daf841..f7e5e3c75a 100644
--- a/gnu/packages/racket.scm
+++ b/gnu/packages/racket.scm
@@ -927,84 +927,86 @@ languages such as Typed Racket, R5RS and R6RS Scheme,
Algol 60, and Datalog.")
;; 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)))))))
- 03/25: gnu: racket: Use Git origins for Racket packages., (continued)
- 03/25: gnu: racket: Use Git origins for Racket packages., guix-commits, 2022/03/04
- 05/25: gnu: racket-minimal: Don't configure non-existant catalogs., guix-commits, 2022/03/04
- 07/25: gnu: racket-minimal: Adjust indentation., guix-commits, 2022/03/04
- 08/25: gnu: racket-minimal: Add "debug" output., guix-commits, 2022/03/04
- 25/25: gnu: komikku: Update to 0.37.0., guix-commits, 2022/03/04
- 14/25: gnu: chez-scheme: Use new style for Chez packages., guix-commits, 2022/03/04
- 11/25: gnu: racket: Move Chez bootfiles to (gnu packages chez)., guix-commits, 2022/03/04
- 13/25: gnu: racket: Add 'racket-vm-for-system'., guix-commits, 2022/03/04
- 12/25: gnu: chez: Add utilities for Chez machine types., guix-commits, 2022/03/04
- 15/25: gnu: chez-scheme: Use "lib/chez-scheme" for search path., guix-commits, 2022/03/04
- 09/25: gnu: configure-layer.rkt: Adjust indentation.,
guix-commits <=
- 16/25: gnu: chez-scheme: Use shared zlib and lz4., guix-commits, 2022/03/04
- 23/25: gnu: chez: Add 'chez-scheme-for-system'., guix-commits, 2022/03/04
- 19/25: gnu: Add chez-nanopass., guix-commits, 2022/03/04
- 04/25: gnu: racket-minimal: Use new package style., guix-commits, 2022/03/04
- 06/25: gnu: racket-minimal: Change inheritance to follow bootstrapping., guix-commits, 2022/03/04
- 10/25: gnu: racket-minimal: Separate from the Racket VM., guix-commits, 2022/03/04
- 22/25: gnu: Add chez-scheme-for-racket., guix-commits, 2022/03/04
- 01/25: gnu: Use license prefix in (gnu packages racket)., guix-commits, 2022/03/04
- 02/25: gnu: racket: Update to 8.4., guix-commits, 2022/03/04
- 21/25: gnu: chez-mit: Support chez-scheme-for-racket., guix-commits, 2022/03/04