aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-24 18:36:12 -0300
committerEuAndreh <eu@euandre.org>2021-06-24 18:36:12 -0300
commit423aececeed6eccfaf48505d80ebd7a07ed57ca6 (patch)
tree6a58b33a1ae78c73e00174bf18fdd73b742a884e /src
parentscripts/paku: Stop duplicating OS instructions for every package (diff)
downloadpackage-repository-423aececeed6eccfaf48505d80ebd7a07ed57ca6.tar.gz
package-repository-423aececeed6eccfaf48505d80ebd7a07ed57ca6.tar.xz
src/xyz/euandreh/queue.scm: Add initial definition of Hunspell dicts for pt_BR and eo
Diffstat (limited to 'src')
-rw-r--r--src/xyz/euandreh/queue.scm72
1 files changed, 70 insertions, 2 deletions
diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm
index 34aa7e2..01fb4b3 100644
--- a/src/xyz/euandreh/queue.scm
+++ b/src/xyz/euandreh/queue.scm
@@ -1,10 +1,14 @@
(define-module (xyz euandreh queue)
#:use-module (srfi srfi-26)
#:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (gnu packages)
+ #:use-module (gnu packages aspell)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages perl)
#:use-module (gnu packages perl-check)
#:use-module (gnu packages language)
@@ -421,6 +425,68 @@ Mustache templating language for Perl. This version of
Template::Mustache conforms to v1.1.3 of the Mustache specs.")
(license license:perl-license)))
+(define* (aspell-word-list language synopsis
+ #:optional
+ (nick (string-map (lambda (chr)
+ (if (char=? #\_ chr)
+ #\-
+ chr))
+ (string-downcase language))))
+ (package
+ (name (string-append "hunspell-dict-" nick))
+ (version "2018.04.16")
+ (source #f)
+ (native-inputs
+ `(("tar" ,tar)
+ ("gzip" ,gzip)
+ ("perl" ,perl)
+ ("aspell" ,aspell)
+ ("which" ,which)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "ASPELL_CONF" (string-append "dict-dir " out "/lib"))
+ (invoke "./configure"))))
+ (delete 'check))
+ #:make-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list (string-append "dictdir=" out "/share/locale")
+ (string-append "datadir=" out "/lib/aspell")))))
+ (synopsis synopsis)
+ (description
+ "This package provides a dictionary for the Hunspell spell-checking
+library.")
+ (home-page "http://wordlist.aspell.net/")
+ (license (license:non-copyleft "file://Copyright"
+ "Word lists come from several sources, all
+under permissive licensing terms. See the 'Copyright' file."))))
+
+(define-public hunspell-dict-pt-br
+ (let ((s "Hunspell dictionary for Brazilian Portuguese"))
+ (package
+ (inherit (aspell-word-list "pt_BR" s))
+ (source (origin
+ (method url-fetch)
+ (uri "https://ftp.gnu.org/gnu/aspell/dict/pt_BR/aspell6-pt_BR-20131030-12-0.tar.bz2")
+ (sha256
+ (base32
+ "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb")))))))
+
+(define-public hunspell-dict-eo
+ (let ((s "Hunspell dictionary for Brazilian Portuguese"))
+ (package
+ (inherit (aspell-word-list "pt_BR" s))
+ (source (origin
+ (method url-fetch)
+ (uri "https://ftp.gnu.org/gnu/aspell/dict/eo/aspell6-eo-2.1.20000225a-2.tar.bz2")
+ (sha256
+ (base32
+ "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))))))
+
(list
perl-tidy
perl-b-lint
@@ -436,4 +502,6 @@ Template::Mustache conforms to v1.1.3 of the Mustache specs.")
perl-escape-houdini
perl-class-tiny-antlers
perl-moosex-mungehas
- perl-template-mustache)
+ perl-template-mustache
+ hunspell-dict-pt-br
+ hunspell-dict-eo)