From bb8adb088873da92939d738f9815c9c369c8bdec Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 18 Oct 2022 23:42:04 -0300 Subject: etc/guix/home.scm: Add hunspell-iconv and dictionaries --- etc/guix/home.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'etc') diff --git a/etc/guix/home.scm b/etc/guix/home.scm index 62b26a9..6d29a54 100644 --- a/etc/guix/home.scm +++ b/etc/guix/home.scm @@ -9,7 +9,9 @@ (gnu home services shells) (gnu home services shepherd) (gnu packages) + (gnu packages base) (gnu packages gnupg) + (gnu packages libreoffice) (gnu packages mail) (gnu packages music) (gnu packages wget) @@ -23,11 +25,56 @@ (guix build-system trivial) (guix download) (guix gexp) + (guix git-download) (guix modules) (guix packages) (guix utils)) (heredoc:enable-syntax) +(define-public hunspell-iconv + (package + (inherit hunspell) + (name "hunspell-iconv") + (inputs + `(("libiconv" ,libiconv) + ,@(package-inputs hunspell))))) + +(define (hunspell-dictionary-utf8 dict-name) + (package + (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) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (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 licenses:expat) + (home-page "https://github.com/wooorm/dictionaries"))) + (define cmucl (package (name "cmucl-binary") @@ -514,6 +561,11 @@ texinfo-with-options mpv-with-options openssh-with-options + hunspell-iconv + (hunspell-dictionary-utf8 "en") + (hunspell-dictionary-utf8 "pt") + (hunspell-dictionary-utf8 "fr") + (hunspell-dictionary-utf8 "eo") (script "cronjob" (slurp (string-append (getenv "XDG_CONFIG_HOME") "/sh/cronjob.sh")))))) (services -- cgit v1.2.3