summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el1
-rw-r--r--guix/import/utils.scm12
2 files changed, 13 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index cea37fc9ef8..3f1d292a199 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -119,6 +119,7 @@
119 (eval . (put 'call-with-port 'scheme-indent-function 1)) 119 (eval . (put 'call-with-port 'scheme-indent-function 1))
120 (eval . (put 'guard 'scheme-indent-function 1)) 120 (eval . (put 'guard 'scheme-indent-function 1))
121 (eval . (put 'lambda* 'scheme-indent-function 1)) 121 (eval . (put 'lambda* 'scheme-indent-function 1))
122 (eval . (put 'peekable-lambda 'scheme-indent-function 1))
122 (eval . (put 'substitute* 'scheme-indent-function 1)) 123 (eval . (put 'substitute* 'scheme-indent-function 1))
123 (eval . (put 'match-record 'scheme-indent-function 3)) 124 (eval . (put 'match-record 'scheme-indent-function 3))
124 (eval . (put 'match-record-lambda 'scheme-indent-function 2)) 125 (eval . (put 'match-record-lambda 'scheme-indent-function 2))
diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 303d29bf8a8..ce7671f4e83 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -14,6 +14,7 @@
14;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com> 14;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
15;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com> 15;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
16;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org> 16;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
17;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
17;;; 18;;;
18;;; This file is part of GNU Guix. 19;;; This file is part of GNU Guix.
19;;; 20;;;
@@ -66,6 +67,9 @@
66 url-fetch 67 url-fetch
67 guix-hash-url 68 guix-hash-url
68 69
70 peekable-lambda
71 peek-body
72
69 package-names->package-inputs 73 package-names->package-inputs
70 maybe-inputs 74 maybe-inputs
71 maybe-native-inputs 75 maybe-native-inputs
@@ -165,6 +169,14 @@ thrown."
165 "Return the hash of FILENAME in nix-base32 format." 169 "Return the hash of FILENAME in nix-base32 format."
166 (bytevector->nix-base32-string (file-sha256 filename))) 170 (bytevector->nix-base32-string (file-sha256 filename)))
167 171
172(define-syntax-rule (peekable-lambda args this-body)
173 (lambda args
174 #((body . this-body))
175 this-body))
176
177(define (peek-body proc)
178 (procedure-property proc 'body))
179
168(define %spdx-license-identifiers 180(define %spdx-license-identifiers
169 ;; https://spdx.org/licenses/ 181 ;; https://spdx.org/licenses/
170 ;; The gfl1.0, nmap, repoze 182 ;; The gfl1.0, nmap, repoze