default.nix (1119B)
1 { lib, stdenv, fetchFromGitHub, bison, flex, libtool, ncurses, readline, zlib }: 2 3 stdenv.mkDerivation rec { 4 pname = "foma"; 5 version = "2021-06-04"; 6 7 src = fetchFromGitHub { 8 owner = "mhulden"; 9 repo = pname; 10 rev = "180b6febf718af4b0223b6c7ac46f698a76e6a45"; 11 hash = "sha256-6pdd9yQ+o2uPwPWSFPUSpTk/UC/up8xv1SZY++hKPPk="; 12 }; 13 14 sourceRoot = "${src.name}/foma"; 15 16 nativeBuildInputs = [ bison flex libtool ]; 17 18 buildInputs = [ ncurses readline zlib ]; 19 20 postPatch = '' 21 substituteInPlace Makefile \ 22 --replace "CC = gcc" "#CC = gcc" \ 23 --replace "-ltermcap" "-lncurses" 24 ''; 25 26 makeFlags = [ "prefix=$(out)" ]; 27 28 meta = with lib; { 29 description = "xfst-compatible C++ finite-state transducer library"; 30 longDescription = '' 31 Foma is designed to be a complete replacement for the 32 closed-source Xerox tool xfst. Everything that compiles 33 with xfst should compile with Foma. If not it is a bug. 34 ''; 35 homepage = "https://code.google.com/p/foma/"; 36 license = licenses.asl20; 37 maintainers = [ maintainers.sikmir ]; 38 platforms = platforms.unix; 39 }; 40 }