@@ -0,0 +1,32 @@
1+{ stdenv, fetchFromGitHub, zlib, flex, bison, readline }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "foma";
5+ version = "0.9.18alpha";
6+
7+ src = fetchFromGitHub {
8+ owner = "mhulden";
9+ repo = "foma";
10+ rev = "4456a40e81f46e3fe909c5a97a15fcf1d2a3b6c1";
11+ sha256 = "188yxj8wahlj2yf93rj1vx549j5cq0085d2jmj3vwzbfjq1mi1f0";
12+ };
13+
14+ sourceRoot = "source/foma";
15+
16+ nativeBuildInputs = [ flex bison ];
17+ buildInputs = [ zlib readline ];
18+
19+ patchPhase = ''
20+ substituteInPlace Makefile \
21+ --replace '-ltermcap' ' ' \
22+ --replace '/usr/local' '$(out)'
23+ '';
24+
25+ meta = with stdenv.lib; {
26+ description = "A multi-purpose finite-state toolkit designed for applications ranging from natural language processing to research in automata theory";
27+ homepage = "https://github.com/mhulden/foma";
28+ license = licenses.asl20;
29+ maintainers = [ maintainers.tckmn ];
30+ platforms = platforms.all;
31+ };
32+}