From 0e1cd35d6e0908529e5dbfca77bc3830312dc909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 14 Feb 2026 23:16:36 +0100 Subject: [PATCH] =?UTF-8?q?gnu:=20nss-certs-for-test:=20Use=20=E2=80=98wit?= =?UTF-8?q?h-imported-modules=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gnu/packages/nss.scm | 51 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index fbb19282a6..3e19742027 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)))))