1 { lib, stdenv, fetchFromGitHub, zlib, flex, bison, readline, darwin }:
3 stdenv.mkDerivation rec {
5 version = "0.10.0alpha";
7 src = fetchFromGitHub {
10 rev = "82f9acdef234eae8b7619ccc3a386cc0d7df62bc";
11 sha256 = "1vf01l18j8cksnavbabcckp9gg692w6v5lg81xrzv6f5v14zp4nr";
14 sourceRoot = "${src.name}/foma";
16 nativeBuildInputs = [ flex bison ]
17 ++ lib.optional stdenv.isDarwin darwin.cctools;
18 buildInputs = [ zlib readline ];
24 ] ++ lib.optionals (!stdenv.isDarwin) [
25 "AR:=$(AR)" # libtool is used for darwin
29 substituteInPlace Makefile \
30 --replace '-ltermcap' ' '
34 description = "A multi-purpose finite-state toolkit designed for applications ranging from natural language processing to research in automata theory";
35 homepage = "https://github.com/mhulden/foma";
36 license = licenses.asl20;
37 maintainers = [ maintainers.tckmn ];
38 platforms = platforms.all;