nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1119B)


      1 { lib, stdenv, fetchFromGitHub, bison, flex, libtool, ncurses, readline, zlib }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "foma";
      5   version = "2022-02-26";
      6 
      7   src = fetchFromGitHub {
      8     owner = "mhulden";
      9     repo = pname;
     10     rev = "82f9acdef234eae8b7619ccc3a386cc0d7df62bc";
     11     hash = "sha256-2ZL7SdjFmf1zD+jRsg0XybyX7mRsqbWV1ZMhiQINwO0=";
     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 }