3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/parsing/ragel/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, transfig, tex, ghostscript, colm
, build-manual ? false
2014-11-06 23:31:21 +00:00
}:
let
generic = { version, sha256, license }:
stdenv.mkDerivation rec {
2019-08-13 22:52:01 +01:00
pname = "ragel";
inherit version;
src = fetchurl {
2019-08-13 22:52:01 +01:00
url = "https://www.colm.net/files/ragel/${pname}-${version}.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}" ];
2019-10-30 02:23:29 +00:00
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-std=gnu++98";
2017-01-17 03:58:14 +00:00
doCheck = true;
meta = with stdenv.lib; {
homepage = "https://www.colm.net/open-source/ragel/";
description = "State machine compiler";
inherit license;
platforms = platforms.unix;
maintainers = with maintainers; [ pSub ];
};
};
in
{
ragelStable = generic {
2017-06-13 20:34:58 +01:00
version = "6.10";
sha256 = "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az";
license = stdenv.lib.licenses.gpl2;
};
ragelDev = generic {
2019-05-25 10:20:00 +01:00
version = "7.0.0.12";
sha256 = "0x3si355lv6q051lgpg8bpclpiq5brpri5lv3p8kk2qhzfbyz69r";
license = stdenv.lib.licenses.mit;
};
}