Subject: [PATCH 4/4] gnu: Add voikko-fi.

From: Jussi Timperi <[email-masked]>
Date: Sun, 17 Sep 2023 15:26:25 +0300

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

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 7bfd67cea0..85aaa30a8e 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -1287,3 +1287,36 @@ (define-public libvoikko
 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))))
+
+(define-public voikko-fi
+  (package
+    (name "voikko-fi")
+    (version "2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://www.puimula.org/voikko-sources/voikko-fi/"
+                    "voikko-fi-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1w90qqp00621hwbgqqxyag60xdjpmz5ba8xzawwif9i5ashb1j9v"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:tests? #f ;no tests
+           #:make-flags #~(list (string-append "DESTDIR="
+                                               #$output "/lib/voikko"))
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+                        (replace 'install
+                          (lambda* (#:key make-flags #:allow-other-keys)
+                            (apply invoke "make" "vvfst-install" make-flags))))))
+    (native-inputs (list foma libvoikko python-minimal))
+    (home-page "https://voikko.puimula.org")
+    (synopsis "Finnish dictionary for Voikko")
+    (description
+     "Voikko-fi (previously know as Suomi-malaga) is a description of Finnish
+morphology written for libvoikko.
+
+The implementation uses unweighted @acronym{VFST, Varissuo Finite-State
+Transducer} format and provides format 5 Finnish dictionary for libvoikko.")
+    (license license:gpl2+)))
-- 
2.41.0