gnu: readline: Add a version parameter to patch procedures.

* gnu/packages/readline.scm (patch-url, readline-patch, patch-series): Add
VERSION parameter.
(%patch-series-7.0): Pass "7.0" to PATCH-SERIES.
This commit is contained in:
Marius Bakke 2019-11-30 03:33:56 +01:00
parent c218e03362
commit f7511ff110
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -30,22 +30,24 @@ (define-module (gnu packages readline)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (ice-9 format)) #:use-module (ice-9 format))
(define (patch-url seqno) (define (patch-url version seqno)
(format #f "mirror://gnu/readline/readline-7.0-patches/readline70-~3,'0d" seqno)) (format #f "mirror://gnu/readline/readline-~a-patches/readline~a-~3,'0d"
version (string-join (string-split version #\.) "") seqno))
(define (readline-patch seqno sha256) (define (readline-patch version seqno sha256)
"Return the origin of Readline patch SEQNO, with expected hash SHA256" "Return the origin of Readline patch SEQNO, with expected hash SHA256"
(origin (origin
(method url-fetch) (method url-fetch)
(uri (patch-url seqno)) (uri (patch-url version seqno))
(sha256 sha256))) (sha256 sha256)))
(define-syntax-rule (patch-series (seqno hash) ...) (define-syntax-rule (patch-series version (seqno hash) ...)
(list (readline-patch seqno (base32 hash)) (list (readline-patch version seqno (base32 hash))
...)) ...))
(define %patch-series-7.0 (define %patch-series-7.0
(patch-series (patch-series
"7.0"
(1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs") (1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs")
(2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7") (2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7")
(3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy") (3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy")