summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-02-14 23:16:36 +0100
committerLudovic Courtès <ludo@gnu.org>2026-03-08 14:13:48 +0100
commit0e1cd35d6e0908529e5dbfca77bc3830312dc909 (patch)
tree8e885368dee7e1a08d3d9d52ec13492c8f2e6172 /gnu
parent13f2fe89362f2b78133309ca7a0ed1d606de7d8f (diff)
gnu: nss-certs-for-test: Use ‘with-imported-modules’.
This is functionally equivalent to the previous style but hopefully clearer. * gnu/packages/nss.scm (nss-certs-for-test)[arguments]: Remove #:modules and use ‘with-imported-modules’ instead. Change-Id: I6cb7b4d377d891e42c4a4dfb55230169714da523
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/nss.scm51
1 files changed, 26 insertions, 25 deletions
diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index fbb19282a67..3e197420272 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -364,32 +364,33 @@ taken from the NSS package and thus ultimately from the Mozilla project.")
(inputs '())
(propagated-inputs '())
(arguments
- (list #:modules '((guix build utils))
- #:builder
- #~(begin
- (use-modules (guix build utils)
- (rnrs io ports)
- (srfi srfi-26))
- (define certs-dir (string-append #$output "/etc/ssl/certs/"))
- (define ca-files
- (find-files (string-append #+(this-package-native-input
- "nss-certs")
- "/etc/ssl/certs")
- (lambda (file stat)
- (string-suffix? ".pem" file))))
- (define (concatenate-files files result)
- "Make RESULT the concatenation of all of FILES."
- (define (dump file port)
- (display (call-with-input-file file get-string-all) port)
- (newline port))
- (call-with-output-file result
- (lambda (port)
- (for-each (cut dump <> port) files))))
+ (list
+ #:builder
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils)
+ (rnrs io ports)
+ (srfi srfi-26))
+ (define certs-dir (string-append #$output "/etc/ssl/certs/"))
+ (define ca-files
+ (find-files (string-append #+(this-package-native-input
+ "nss-certs")
+ "/etc/ssl/certs")
+ (lambda (file stat)
+ (string-suffix? ".pem" file))))
+ (define (concatenate-files files result)
+ "Make RESULT the concatenation of all of FILES."
+ (define (dump file port)
+ (display (call-with-input-file file get-string-all) port)
+ (newline port))
+ (call-with-output-file result
+ (lambda (port)
+ (for-each (cut dump <> port) files))))
- (mkdir-p certs-dir)
- (concatenate-files
- ca-files (string-append certs-dir "/ca-certificates.crt"))
- (for-each (cut install-file <> certs-dir) ca-files))))
+ (mkdir-p certs-dir)
+ (concatenate-files
+ ca-files (string-append certs-dir "/ca-certificates.crt"))
+ (for-each (cut install-file <> certs-dir) ca-files)))))
(native-search-paths
(list $SSL_CERT_DIR
$SSL_CERT_FILE)))))