2016-12-16 15:50:06 +01:00
|
|
|
{ stdenv, fetchurl, transfig, tex, ghostscript, colm
|
|
|
|
, build-manual ? false
|
2014-11-07 00:31:21 +01:00
|
|
|
}:
|
2009-01-27 15:00:54 +01:00
|
|
|
|
2016-12-16 15:50:06 +01:00
|
|
|
let
|
2017-06-13 21:36:49 +02:00
|
|
|
generic = { version, sha256, license }:
|
2016-12-16 15:50:06 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ragel-${version}";
|
2009-01-27 15:00:54 +01:00
|
|
|
|
2016-12-16 15:50:06 +01: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 04:58:14 +01:00
|
|
|
NIX_CFLAGS_COMPILE = "-std=gnu++98";
|
|
|
|
|
2016-12-16 15:50:06 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-11-11 17:36:33 +01:00
|
|
|
homepage = https://www.colm.net/open-source/ragel/;
|
2016-12-16 15:50:06 +01:00
|
|
|
description = "State machine compiler";
|
2017-06-13 21:36:49 +02:00
|
|
|
inherit license;
|
2016-12-16 15:50:06 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
ragelStable = generic {
|
2017-06-13 21:34:58 +02:00
|
|
|
version = "6.10";
|
|
|
|
sha256 = "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az";
|
2017-06-13 21:36:49 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2009-03-07 00:21:28 +01:00
|
|
|
};
|
2009-01-27 15:00:54 +01:00
|
|
|
|
2016-12-16 15:50:06 +01:00
|
|
|
ragelDev = generic {
|
2017-05-29 11:38:36 +02:00
|
|
|
version = "7.0.0.10";
|
|
|
|
sha256 = "1v4ddzxal4gf8l8nkn32qabba6nbpd2mg8sphgmdn8kaqv52nmj0";
|
2017-06-13 21:36:49 +02:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2009-01-27 15:00:54 +01:00
|
|
|
};
|
|
|
|
}
|