2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, transfig, tex, ghostscript, colm
|
2016-12-16 14:50:06 +00:00
|
|
|
, 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 19:36:49 +00:00
|
|
|
generic = { version, sha256, license }:
|
2016-12-16 14:50:06 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 21:52:01 +00:00
|
|
|
pname = "ragel";
|
|
|
|
inherit version;
|
2009-01-27 14:00:54 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
src = fetchurl {
|
2019-08-13 21:52:01 +00:00
|
|
|
url = "https://www.colm.net/files/ragel/${pname}-${version}.tar.gz";
|
2016-12-16 14:50:06 +00:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
buildInputs = lib.optional build-manual [ transfig ghostscript tex ];
|
2016-12-16 14:50:06 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
preConfigure = lib.optional build-manual ''
|
2016-12-16 14:50:06 +00:00
|
|
|
sed -i "s/build_manual=no/build_manual=yes/g" DIST
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--with-colm=${colm}" ];
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-std=gnu++98";
|
2017-01-17 03:58:14 +00:00
|
|
|
|
2016-12-16 14:50:06 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +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 19:36:49 +00:00
|
|
|
inherit license;
|
2016-12-16 14:50:06 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ pSub ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
ragelStable = generic {
|
2017-06-13 19:34:58 +00:00
|
|
|
version = "6.10";
|
|
|
|
sha256 = "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = 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 {
|
2019-05-25 09:20:00 +00:00
|
|
|
version = "7.0.0.12";
|
|
|
|
sha256 = "0x3si355lv6q051lgpg8bpclpiq5brpri5lv3p8kk2qhzfbyz69r";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.mit;
|
2009-01-27 14:00:54 +00:00
|
|
|
};
|
|
|
|
}
|