aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xyz/euandreh/queue.scm98
1 files changed, 38 insertions, 60 deletions
diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm
index 03321cb..ee79ccf 100644
--- a/src/xyz/euandreh/queue.scm
+++ b/src/xyz/euandreh/queue.scm
@@ -429,72 +429,49 @@ Mustache templating language for Perl. This version of
Template::Mustache conforms to v1.1.3 of the Mustache specs.")
(license license:perl-license)))
-(define* (hunspell-dictionary dict-name full-name #:key synopsis home-page license)
+(define (hunspell-dictionary-utf8 dict-name)
(package
- (name (string-append
- "hunspell-dict-"
- ;; Downcase and replace underscore in package names
- ;; to follow Guix naming conventions.
- (string-map (match-lambda
- (#\_ #\-)
- (chr chr))
- (string-downcase dict-name))))
- (version (package-version libreoffice))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url (string-append "https://anongit.freedesktop.org/git/"
- "libreoffice/dictionaries.git/"))
- (commit "8cd38fb5138f2e456506aaa889ec2b7042a7439e")))
- (file-name (git-file-name "libreoffice-dictionaries" version))
- (sha256
- (base32 "0h2fmnzg6h4xnr7cil0i055d6ig5vcwnfli8vyflxm06dh6agwla"))))
+ (name (string-append "hunspell-dict-" dict-name "-utf8"))
+ (version "630b34e6f8f3cbe7aa7b27b6d8ab118e27252fd1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wooorm/dictionaries")
+ (commit version)))
+ (file-name (git-file-name "hunspell-dictionary-utf8" version))
+ (sha256
+ (base32 "1iknwzh5h04m067ddw9hlzc1qqj4mr9mdkcfapsnay304laaiyn5"))))
(build-system trivial-build-system)
- (native-inputs
- `(("source" ,source)))
(arguments
`(#:modules ((guix build utils))
#:builder (begin
(use-modules (guix build utils))
- (let* ((dictionary
- (string-append (assoc-ref %build-inputs "source")
- "/" ,dict-name
- "/" ,dict-name))
- (hunspell (string-append %output "/share/hunspell/"))
- (myspell (string-append %output "/share/myspell")))
- (for-each
- (lambda (ext)
- (install-file (string-append dictionary ext)
- hunspell))
- '(".aff" ".dic"))
- (symlink hunspell myspell)
- #t))))
- (synopsis synopsis)
- (description "This package provides a dictionary for the Hunspell
-spell-checking library.")
- (license license)
- (home-page home-page)))
+ (let ((source-prefix (string-append (assoc-ref %build-inputs "source")
+ "/dictionaries/"
+ ,dict-name
+ "/index"))
+ (install-prefix (string-append %output "/share/hunspell/")))
+ (mkdir-p install-prefix)
+ (copy-file (string-append source-prefix ".aff")
+ (string-append install-prefix ,dict-name ".aff"))
+ (copy-file (string-append source-prefix ".dic")
+ (string-append install-prefix ,dict-name ".dic"))))))
+ (synopsis (string-append "Hunspell " dict-name " dictionary in UTF-8"))
+ (description (string-append "Hunspell " dict-name " dictionary in UTF-8"))
+ (license license:expat)
+ (home-page "https://github.com/wooorm/dictionaries")))
-(define-public hunspell-dict-pt-br
- (hunspell-dictionary "pt_BR" "Brazilian Portuguese"
- #:synopsis "Hunspell dictionary for Brazilian Portuguese"
- #:home-page "http://pt-br.libreoffice.org/projetos/projeto-vero-verificador-ortografico/"
- #:license license:lgpl3))
+(define-public hunspell-dict-en-utf8
+ (hunspell-dictionary-utf8 "en"))
-(define-public hunspell-dict-eo
- (hunspell-dictionary "eo" "Esperanto"
- #:synopsis "Hunspell dictionary for Esperanto"
- #:home-page "https://eo.libreoffice.org/helpo/"
- #:license license:gpl3))
+(define-public hunspell-dict-pt-utf8
+ (hunspell-dictionary-utf8 "pt"))
-(define-public hunspell-iconv
- (package
- (inherit hunspell)
- (name "hunspell-iconv")
- (inputs
- `(("libiconv" ,libiconv)
- ,@(package-inputs hunspell)))))
+(define-public hunspell-dict-fr-utf8
+ (hunspell-dictionary-utf8 "fr"))
+
+(define-public hunspell-dict-eo-utf8
+ (hunspell-dictionary-utf8 "eo"))
(list
perl-tidy
@@ -512,6 +489,7 @@ spell-checking library.")
perl-class-tiny-antlers
perl-moosex-mungehas
perl-template-mustache
- hunspell-iconv
- hunspell-dict-pt-br
- hunspell-dict-eo)
+ hunspell-dict-en-utf8
+ hunspell-dict-pt-utf8
+ hunspell-dict-fr-utf8
+ hunspell-dict-eo-utf8)