[bug#66049,2/4] gnu: Add foma.
Commit Message
* gnu/packages/language.scm (foma): New variable.
---
gnu/packages/language.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
Comments
Hi Jussi,
Jussi Timperi <jussi.timperi@iki.fi> writes:
> + (list #:tests? #f ;no tests
I see a foma/tests directory. Looks like it's not being run
automatically as part of the build system (worth asking upstream to
integrate this into their CMake based system) but instead it's done by
manually invoking the run.sh script. You might have to patch this script
to have `^foma' replaced with (string-append #$output "/bin/foma") though.
> + #:phases #~(modify-phases %standard-phases
> + (add-after 'unpack 'chdir
> + (lambda _
> + (chdir "foma") #t)))))
No need for a trailing #t.
Hi Bruno,
Bruno Victal <mirai@makinata.eu> writes:
> I see a foma/tests directory. Looks like it's not being run
> automatically as part of the build system (worth asking upstream to
> integrate this into their CMake based system) but instead it's done by
> manually invoking the run.sh script. You might have to patch this script
> to have `^foma' replaced with (string-append #$output "/bin/foma") though.
What I did in V2 was prepending PATH with the directory with the newly
build 'foma' in it. Let me know if that's not OK, and I'll move the
phase around to have #$output populated before it is run.
I'll see about raising an issue upstream about integrating the tests.
> No need for a trailing #t.
Removed in V2.
Thanks,
--
Jussi
@@ -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,39 @@ (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 #:tests? #f ;no tests
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "foma") #t)))))
+ (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))))