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
|
2017-06-13 20:36:49 +01:00
|
|
|
generic = { version, sha256, license }:
|
2016-12-16 14:50:06 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ragel-${version}";
|
2009-01-27 14:00:54 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://www.colm.net/files/ragel/${name}.tar.gz";
|
2016-12-16 14:50:06 +00:00
|
|
|
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}" ];
|
|
|
|
|
2018-03-25 13:39:31 +01:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optional stdenv.cc.isGNU "-std=gnu++98";
|
2017-01-17 03:58:14 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-11-11 16:36:33 +00:00
|
|
|
homepage = https://www.colm.net/open-source/ragel/;
|
2016-12-16 14:50:06 +00:00
|
|
|
description = "State machine compiler";
|
2017-06-13 20:36:49 +01:00
|
|
|
inherit license;
|
2016-12-16 14:50:06 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
ragelStable = generic {
|
2017-06-13 20:34:58 +01:00
|
|
|
version = "6.10";
|
|
|
|
sha256 = "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az";
|
2017-06-13 20:36:49 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2;
|
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 {
|
2018-05-24 21:16:00 +01:00
|
|
|
version = "7.0.0.11";
|
|
|
|
sha256 = "0h2k9bfz9i7x9mvr9rbsrzz8fk17756zwwrkf3fppvm9ivzwdfh8";
|
2017-06-13 20:36:49 +01:00
|
|
|
license = stdenv.lib.licenses.mit;
|
2009-01-27 14:00:54 +00:00
|
|
|
};
|
|
|
|
}
|