transformations: Switch to SRFI-71.

* guix/transformations.scm (package-with-source)
(evaluate-source-replacement-specs): Use SRFI-71 'let' instead of
'let-values'.
This commit is contained in:
Ludovic Courtès 2022-10-02 22:13:06 +02:00
parent bb3b810167
commit 6a04bc8a6d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -43,11 +43,11 @@ (define-module (guix transformations)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-9) #:use-module (srfi srfi-9)
#:use-module (srfi srfi-11)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34) #:use-module (srfi srfi-34)
#:use-module (srfi srfi-35) #:use-module (srfi srfi-35)
#:use-module (srfi srfi-37) #:use-module (srfi srfi-37)
#:use-module (srfi srfi-71)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (ice-9 vlist) #:use-module (ice-9 vlist)
#:export (options->transformation #:export (options->transformation
@ -115,8 +115,7 @@ (define* (package-with-source p uri #:optional version)
"Return a package based on P but with its source taken from URI. Extract "Return a package based on P but with its source taken from URI. Extract
the new package's version number from URI." the new package's version number from URI."
(let ((base (tarball-base-name (basename uri)))) (let ((base (tarball-base-name (basename uri))))
(let-values (((_ version*) (let ((_ version* (hyphen-package-name->name+version base)))
(hyphen-package-name->name+version base)))
(package (inherit p) (package (inherit p)
(version (or version version* (version (or version version*
(package-version p))) (package-version p)))
@ -146,8 +145,7 @@ (define not-equal
(lambda (old) (lambda (old)
(package-with-source old uri))))) (package-with-source old uri)))))
((spec uri) ((spec uri)
(let-values (((name version) (let ((name version (package-name->name+version spec)))
(package-name->name+version spec)))
;; Note: Here VERSION is used as the version string of the new ;; Note: Here VERSION is used as the version string of the new
;; package rather than as part of the spec of the package being ;; package rather than as part of the spec of the package being
;; targeted. ;; targeted.