all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jussi Timperi <jussi.timperi@iki.fi>
To: 66049@debbugs.gnu.org
Subject: [bug#66049] [PATCH v2 2/4] gnu: Add foma.
Date: Tue, 26 Sep 2023 15:09:53 +0300	[thread overview]
Message-ID: <167dc20d70d817afae1742aa587bc13ce7313609.1695678993.git.jussi.timperi@iki.fi> (raw)
In-Reply-To: <804a598c1c5b401858c795e26b1df1ab2f1ce1da.1695678993.git.jussi.timperi@iki.fi>

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

diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index 241b145440..f2dd1aba2f 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -32,10 +32,12 @@ (define-module (gnu packages language)
   #:use-module (gnu packages audio)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dbm)
   #:use-module (gnu packages docbook)
   #:use-module (gnu packages emacs)
+  #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
@@ -55,6 +57,7 @@ (define-module (gnu packages language)
   #:use-module (gnu packages python)
   #:use-module (gnu packages perl-check)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages ruby)
   #:use-module (gnu packages scheme)
   #:use-module (gnu packages sqlite)
@@ -1212,3 +1215,54 @@ (define-public hfst-ospell
 optimized-lookup format based spell checker library and a demonstrational
 implementation of command line based spell checker.")
     (license license:asl2.0)))
+
+(define-public foma
+  (let ((commit "fe40aceea1797642dd1cf0fa61fd024c7a7f7095")
+        (revision "0"))
+    (package
+      (name "foma")
+      (version (git-version "0.10.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/mhulden/foma")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1y6yjc72wh6gqqip6jjnrzwv95inr1kncnnfd144vfnvv9bj3msx"))))
+      (build-system cmake-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'chdir
+              (lambda _
+                (chdir "foma")))
+            (replace 'check
+              (lambda* (#:key tests? out-of-source? #:allow-other-keys)
+                (if tests?
+                    (let* ((builddir (getcwd))
+                           (srcdir (if out-of-source?
+                                       (string-append builddir "/../foma")
+                                       builddir))
+                           (testdir (string-append srcdir "/tests")))
+                      (with-directory-excursion testdir
+                        (setenv "PATH" (string-append builddir
+                                                      ":"
+                                                      (getenv "PATH")))
+                        (invoke "./run.sh")))
+                    (format #t "test suite not run~%")))))))
+      (inputs (list ncurses readline zlib))
+      (native-inputs (list bison flex pkg-config))
+      (home-page "https://fomafst.github.io/")
+      (synopsis "Finite-state compiler and C library")
+      (description
+       "Foma is a compiler, programming language, and C library for
+constructing finite-state automata and transducers for various uses.
+
+It has specific support for many natural language processing applications such
+as producing morphological analyzers.  Although NLP applications are probably
+the main use of foma, it is sufficiently generic to use for a large number of
+purposes.")
+      (license license:asl2.0))))
-- 
2.41.0





  reply	other threads:[~2023-09-26 12:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17 12:20 [bug#66049] [PATCH 0/4] Add Voikko Jussi Timperi
2023-09-17 12:26 ` [bug#66049] [PATCH 1/4] gnu: Add hfst-ospell Jussi Timperi
2023-09-17 12:26 ` [bug#66049] [PATCH 2/4] gnu: Add foma Jussi Timperi
2023-09-24 16:15   ` [bug#66049] [PATCH 0/4] Add Voikko Bruno Victal
2023-09-26 12:11     ` Jussi Timperi
2023-09-17 12:26 ` [bug#66049] [PATCH 3/4] gnu: Add libvoikko Jussi Timperi
2023-09-17 12:26 ` [bug#66049] [PATCH 4/4] gnu: Add voikko-fi Jussi Timperi
2023-09-17 19:20 ` [bug#66049] [PATCH 0/4] Add Voikko Saku Laesvuori via Guix-patches via
2023-09-26 12:09 ` [bug#66049] [PATCH v2 1/4] gnu: Add hfst-ospell Jussi Timperi
2023-09-26 12:09   ` Jussi Timperi [this message]
2023-09-26 12:09   ` [bug#66049] [PATCH v2 3/4] gnu: Add libvoikko Jussi Timperi
2023-09-26 12:09   ` [bug#66049] [PATCH v2 4/4] gnu: Add voikko-fi Jussi Timperi

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167dc20d70d817afae1742aa587bc13ce7313609.1695678993.git.jussi.timperi@iki.fi \
    --to=jussi.timperi@iki.fi \
    --cc=66049@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.