aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/readline.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-30 03:33:56 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-12-05 17:59:00 +0100
commitf7511ff1109868d215f5668d8e07e539ef77bd7b (patch)
tree6460b554f5e7b082703bef0ee8aba3bc73e22202 /gnu/packages/readline.scm
parentc218e03362ebddca17d1797c5d4c0b18d634bded (diff)
downloadguix-f7511ff1109868d215f5668d8e07e539ef77bd7b.tar
guix-f7511ff1109868d215f5668d8e07e539ef77bd7b.tar.gz
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.
Diffstat (limited to 'gnu/packages/readline.scm')
-rw-r--r--gnu/packages/readline.scm14
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 57d550d67f..1304bb8b2b 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -30,22 +30,24 @@
#:use-module (guix utils)
#:use-module (ice-9 format))
-(define (patch-url seqno)
- (format #f "mirror://gnu/readline/readline-7.0-patches/readline70-~3,'0d" seqno))
+(define (patch-url version 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"
(origin
(method url-fetch)
- (uri (patch-url seqno))
+ (uri (patch-url version seqno))
(sha256 sha256)))
-(define-syntax-rule (patch-series (seqno hash) ...)
- (list (readline-patch seqno (base32 hash))
+(define-syntax-rule (patch-series version (seqno hash) ...)
+ (list (readline-patch version seqno (base32 hash))
...))
(define %patch-series-7.0
(patch-series
+ "7.0"
(1 "0xm3sxvwmss7ddyfb11n6pgcqd1aglnpy15g143vzcf75snb7hcs")
(2 "0n1dxmqsbjgrfxb1hgk5c6lsraw4ncbnzxlsx7m35nym6lncjiw7")
(3 "1027kmymniizcy0zbdlrczxfx3clxcdln5yq05q9yzlc6y9slhwy")