ragel: add stable version, default to stable

Changed files
+42 -25
pkgs
development
tools
parsing
ragel
top-level
+38 -22
pkgs/development/tools/parsing/ragel/default.nix
···
-
{stdenv, fetchurl, transfig, tex , ghostscript, colm, build-manual ? false
}:
-
stdenv.mkDerivation rec {
-
name = "ragel-${version}";
-
version = "7.0.0.9";
-
src = fetchurl {
-
url = "http://www.colm.net/files/ragel/${name}.tar.gz";
-
sha256 = "1w2jhfg3fxl15gcmm7z3jbi6splgc83mmwcfbp08lfc8sg2wmrmr";
-
};
-
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}" ];
-
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 ];
};
}
···
+
{ stdenv, fetchurl, transfig, tex, ghostscript, colm
+
, build-manual ? false
}:
+
let
+
generic = { version, sha256 }:
+
stdenv.mkDerivation rec {
+
name = "ragel-${version}";
+
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}" ];
+
+
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";
+
};
+
+
ragelDev = generic {
+
version = "7.0.0.9";
+
sha256 = "1w2jhfg3fxl15gcmm7z3jbi6splgc83mmwcfbp08lfc8sg2wmrmr";
};
}
+4 -3
pkgs/top-level/all-packages.nix
···
luaBindings = config.radare.luaBindings or false;
};
-
ragel = callPackage ../development/tools/parsing/ragel {
-
tex = texlive.combined.scheme-small;
-
};
hammer = callPackage ../development/tools/parsing/hammer { };
···
luaBindings = config.radare.luaBindings or false;
};
+
ragel = ragelStable;
+
inherit (callPackages ../development/tools/parsing/ragel {
+
tex = texlive.combined.scheme-small;
+
}) ragelStable ragelDev;
hammer = callPackage ../development/tools/parsing/hammer { };