me
/
guix
Archived
1
0
Fork 0

gnu: aspell.scm: Handle dictionary names with underscore/uppercase.

* gnu/packages/aspell.scm(aspell-dictionary)<name>:
Generate package name from upstream name.
(aspell-dict-pt-pt, aspell-dict-pt-br): Use upstream name for URL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Jens Mølgaard 2019-06-06 17:06:56 +12:00 committed by Ludovic Courtès
parent 28353bd0a4
commit cd37b144e4
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 12 additions and 4 deletions

View File

@ -32,7 +32,8 @@
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages perl)) #:use-module (gnu packages perl)
#:use-module (ice-9 match))
(define-public aspell (define-public aspell
(package (package
@ -102,7 +103,14 @@ dictionaries, including personal ones.")
(define* (aspell-dictionary dict-name full-name (define* (aspell-dictionary dict-name full-name
#:key version sha256 (prefix "aspell6-")) #:key version sha256 (prefix "aspell6-"))
(package (package
(name (string-append "aspell-dict-" dict-name)) (name (string-append
"aspell-dict-"
;; Downcase and replace underscore in package names
;; to follow Guix naming conventions.
(string-map (match-lambda
(#\_ #\-)
(chr chr))
(string-downcase dict-name))))
(version version) (version version)
(source (origin (source (origin
(method url-fetch) (method url-fetch)
@ -281,7 +289,7 @@ dictionaries, including personal ones.")
"0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc"))) "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc")))
(define-public aspell-dict-pt-br (define-public aspell-dict-pt-br
(aspell-dictionary "pt-br" "Brazilian Portuguese" (aspell-dictionary "pt_BR" "Brazilian Portuguese"
#:version "20090702-0" #:version "20090702-0"
#:prefix "aspell6-" #:prefix "aspell6-"
#:sha256 #:sha256
@ -289,7 +297,7 @@ dictionaries, including personal ones.")
"1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p"))) "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))
(define-public aspell-dict-pt-pt (define-public aspell-dict-pt-pt
(aspell-dictionary "pt-pt" "Portuguese" (aspell-dictionary "pt_PT" "Portuguese"
#:version "20070510-0" #:version "20070510-0"
#:prefix "aspell6-" #:prefix "aspell6-"
#:sha256 #:sha256