2016-12-16 14:50:06 +00:00
|
|
|
{ stdenv, fetchurl, transfig, tex, ghostscript, colm
|
|
|
|
, build-manual ? false
|
2014-11-06 23:31:21 +00:00
|
|
|
}:
|
2009-01-27 14:00:54 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
let
|
|
|
|
generic = { version, sha256 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ragel-${version}";
|
2009-01-27 14:00:54 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.colm.net/files/ragel/${name}.tar.gz";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = stdenv.lib.optional build-manual [ transfig ghostscript tex ];
|
|
|
|
|
|
|
|
preConfigure = stdenv.lib.optional build-manual ''
|
|
|
|
sed -i "s/build_manual=no/build_manual=yes/g" DIST
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-colm=${colm}" ];
|
|
|
|
|
2017-01-17 03:58:14 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-std=gnu++98";
|
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.complang.org/ragel;
|
|
|
|
description = "State machine compiler";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
ragelStable = generic {
|
|
|
|
version = "6.9";
|
|
|
|
sha256 = "02k6rwh8cr95f1p5sjjr3wa6dilg06572xz1v71dk8awmc7vw1vf";
|
2009-03-06 23:21:28 +00:00
|
|
|
};
|
2009-01-27 14:00:54 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
ragelDev = generic {
|
2017-05-29 10:38:36 +01:00
|
|
|
version = "7.0.0.10";
|
|
|
|
sha256 = "1v4ddzxal4gf8l8nkn32qabba6nbpd2mg8sphgmdn8kaqv52nmj0";
|
2009-01-27 14:00:54 +00:00
|
|
|
};
|
|
|
|
}
|