aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-10-18 23:42:04 -0300
committerEuAndreh <eu@euandre.org>2022-10-18 23:43:39 -0300
commitbb8adb088873da92939d738f9815c9c369c8bdec (patch)
tree2dccd632a9711ab231d5c7267c90b1a047bb406e
parentetc/guix/home.scm: Re-add perl-critic (diff)
downloaddotfiles-bb8adb088873da92939d738f9815c9c369c8bdec.tar.gz
dotfiles-bb8adb088873da92939d738f9815c9c369c8bdec.tar.xz
etc/guix/home.scm: Add hunspell-iconv and dictionaries
-rw-r--r--etc/guix/home.scm52
1 files changed, 52 insertions, 0 deletions
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