mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
import: utils: Add API to peek procedure bodies.
* guix/import/utils.scm (peekable-lambda, peek-body): Add procedures. * .dir-locals.el: Add peekable-lambda indentation. Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
parent
6d48eaa9a3
commit
68c4eab949
2 changed files with 13 additions and 0 deletions
|
@ -119,6 +119,7 @@
|
||||||
(eval . (put 'call-with-port 'scheme-indent-function 1))
|
(eval . (put 'call-with-port 'scheme-indent-function 1))
|
||||||
(eval . (put 'guard 'scheme-indent-function 1))
|
(eval . (put 'guard 'scheme-indent-function 1))
|
||||||
(eval . (put 'lambda* 'scheme-indent-function 1))
|
(eval . (put 'lambda* 'scheme-indent-function 1))
|
||||||
|
(eval . (put 'peekable-lambda 'scheme-indent-function 1))
|
||||||
(eval . (put 'substitute* 'scheme-indent-function 1))
|
(eval . (put 'substitute* 'scheme-indent-function 1))
|
||||||
(eval . (put 'match-record 'scheme-indent-function 3))
|
(eval . (put 'match-record 'scheme-indent-function 3))
|
||||||
(eval . (put 'match-record-lambda 'scheme-indent-function 2))
|
(eval . (put 'match-record-lambda 'scheme-indent-function 2))
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
|
;;; Copyright © 2022 Kyle Meyer <kyle@kyleam.com>
|
||||||
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
|
;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com>
|
||||||
;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
|
;;; Copyright © 2025 Cayetano Santos <csantosb@inventati.org>
|
||||||
|
;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -66,6 +67,9 @@
|
||||||
url-fetch
|
url-fetch
|
||||||
guix-hash-url
|
guix-hash-url
|
||||||
|
|
||||||
|
peekable-lambda
|
||||||
|
peek-body
|
||||||
|
|
||||||
package-names->package-inputs
|
package-names->package-inputs
|
||||||
maybe-inputs
|
maybe-inputs
|
||||||
maybe-native-inputs
|
maybe-native-inputs
|
||||||
|
@ -165,6 +169,14 @@ thrown."
|
||||||
"Return the hash of FILENAME in nix-base32 format."
|
"Return the hash of FILENAME in nix-base32 format."
|
||||||
(bytevector->nix-base32-string (file-sha256 filename)))
|
(bytevector->nix-base32-string (file-sha256 filename)))
|
||||||
|
|
||||||
|
(define-syntax-rule (peekable-lambda args this-body)
|
||||||
|
(lambda args
|
||||||
|
#((body . this-body))
|
||||||
|
this-body))
|
||||||
|
|
||||||
|
(define (peek-body proc)
|
||||||
|
(procedure-property proc 'body))
|
||||||
|
|
||||||
(define %spdx-license-identifiers
|
(define %spdx-license-identifiers
|
||||||
;; https://spdx.org/licenses/
|
;; https://spdx.org/licenses/
|
||||||
;; The gfl1.0, nmap, repoze
|
;; The gfl1.0, nmap, repoze
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue