2020-04-24 23:36:52 +00:00
|
|
|
{stdenv, fetchurl, jre} :
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-05-15 21:57:56 +00:00
|
|
|
name = "jflex-1.8.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://jflex.de/release/${name}.tar.gz";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "1ar7g6zb2xjgnws3j4cqcp86jplhc9av8cpcjdmxw08x6igd5q51";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = name;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
cp -a * $out
|
|
|
|
rm -f $out/bin/jflex.bat
|
|
|
|
|
|
|
|
patchShebangs $out
|
|
|
|
sed -i -e '/^JAVA=java/ s#java#${jre}/bin/java#' $out/bin/jflex
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/jflex --version
|
|
|
|
runHook postInstallCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.jflex.de/";
|
|
|
|
description = "Lexical analyzer generator for Java, written in Java";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|