2021-01-21 17:00:13 +00:00
|
|
|
{lib, stdenv, fetchurl, jre} :
|
2005-09-11 15:38:59 +00:00
|
|
|
|
2016-01-26 03:19:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-05-07 19:15:07 +00:00
|
|
|
name = "jflex-1.8.2";
|
2005-09-11 15:38:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-18 18:58:13 +00:00
|
|
|
url = "http://jflex.de/release/${name}.tar.gz";
|
2020-05-07 19:15:07 +00:00
|
|
|
sha256 = "1ar7g6zb2xjgnws3j4cqcp86jplhc9av8cpcjdmxw08x6igd5q51";
|
2016-01-26 03:19:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = name;
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-11-19 09:50:29 +00:00
|
|
|
runHook preInstall
|
2016-01-26 03:19:18 +00:00
|
|
|
mkdir -p $out
|
|
|
|
cp -a * $out
|
2018-11-18 21:15:58 +00:00
|
|
|
rm -f $out/bin/jflex.bat
|
|
|
|
|
2016-01-26 03:19:18 +00:00
|
|
|
patchShebangs $out
|
2018-11-18 21:15:58 +00:00
|
|
|
sed -i -e '/^JAVA=java/ s#java#${jre}/bin/java#' $out/bin/jflex
|
2018-11-19 09:50:29 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
2018-11-19 10:56:36 +00:00
|
|
|
runHook preInstallCheck
|
2018-11-19 09:50:29 +00:00
|
|
|
$out/bin/jflex --version
|
2018-11-19 10:56:36 +00:00
|
|
|
runHook postInstallCheck
|
2016-01-26 03:19:18 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-03-02 07:17:12 +00:00
|
|
|
homepage = "https://www.jflex.de/";
|
2016-01-26 03:19:18 +00:00
|
|
|
description = "Lexical analyzer generator for Java, written in Java";
|
2021-01-21 17:00:13 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
platforms = lib.platforms.unix;
|
2005-09-11 15:38:59 +00:00
|
|
|
};
|
|
|
|
}
|