Subject: [bug#66049] [PATCH v2 3/4] gnu: Add libvoikko.

From: Jussi Timperi <[email-masked]>
Date: Tue, 26 Sep 2023 15:09:54 +0300

* gnu/packages/language.scm (libvoikko): New variable.
---
 gnu/packages/language.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index f2dd1aba2f..76dfc47cbb 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -1266,3 +1266,39 @@ (define-public foma
 the main use of foma, it is sufficiently generic to use for a large number of
 purposes.")
       (license license:asl2.0))))
+
+(define-public libvoikko
+  (package
+    (name "libvoikko")
+    (version "4.3.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.puimula.org/voikko-sources/libvoikko/"
+                    "libvoikko-" version ".tar.gz"))
+              (sha256
+               (base32
+                "18hdb7w25kc0ib6z0h0bia192igazknfyz6wmllbim1jmamc4mh1"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; Outdated tests
+     ;; see: https://github.com/voikko/corevoikko/issues/55
+     (list #:tests? #f))
+    (inputs (list hfst-ospell))
+    (native-inputs (list pkg-config python-minimal))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "VOIKKO_DICTIONARY_PATH")
+            (files (list "lib/voikko")))))
+    (home-page "https://voikko.puimula.org")
+    (synopsis "Library of language tools")
+    (description
+     "Libvoikko provides spell checking, hyphenation, grammar checking and
+morphological analysis for Finnish language.  Spell checking is supported for
+other languages through @acronym{HFST, Helsinki Finite-State Technology}
+backend.
+
+Libvoikko aims to provide support for languages that are not well served by
+Hunspell or other existing free linguistic tools.")
+    ;; Library and default backends are under tri-license.
+    (license (list license:gpl2+ license:lgpl2.1+ license:mpl1.1))))
-- 
2.41.0