From: paul <goodoldpaul@autistici.org>
To: guix-devel@gnu.org
Subject: Hunspell dictionaries
Date: Sat, 31 Oct 2020 21:03:30 +0100 [thread overview]
Message-ID: <300e0c1f-e40b-be4e-40ae-3139b89a123a@autistici.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2957 bytes --]
Dear Guixers,
I was packaging an Italian dictionary for Hunspell, when I found this
link listing all the Hunspell dictionaries supported by Libreoffice [0].
This lead me to think about a function for defining dictionary packages
(very much based on aspell-dictionary from (gnu packages aspell)).
(define* (hunspell-dictionary dict-name full-name #:key home-page license)
(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
(string-append "libreoffice-" version))))
(file-name (git-file-name "libreoffice-dictionaries" version))
(sha256
(base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(replace 'install ;no install target
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(hunspell (string-append out "/share/hunspell/"))
(myspell (string-append out "/share/myspell")))
(for-each
(lambda (ext)
(install-file (string-append ,dict-name "/" ,dict-name ext)
hunspell))
'(".aff" ".dic"))
(symlink hunspell myspell)
#t))))
#:tests? #f)) ; no tests
(synopsis
(string-append "Hunspell dictionary for " full-name " (" dict-name ")"))
(description "This package provides a dictionary for the Hunspell
spell-checking library.")
(license license)
(home-page home-page)))
Do you think it would be worth to add it to (gnu packages libreoffice)
to define dictionaries?
Cheers,
Giacomo
[0]: https://cgit.freedesktop.org/libreoffice/dictionaries
[-- Attachment #2: Type: text/html, Size: 3406 bytes --]
next reply other threads:[~2020-10-31 20:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 20:03 paul [this message]
2020-11-01 9:41 ` Hunspell dictionaries Jonathan Brielmaier
2020-11-02 13:56 ` Bengt Richter
2020-11-05 1:20 ` paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=300e0c1f-e40b-be4e-40ae-3139b89a123a@autistici.org \
--to=goodoldpaul@autistici.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).