2018-11-18 21:15:58 +00:00
|
|
|
{stdenv, fetchurl, jre} :
|
2005-09-11 16:38:59 +01:00
|
|
|
|
2016-01-26 03:19:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2018-11-18 21:15:58 +00:00
|
|
|
name = "jflex-1.7.0";
|
2005-09-11 16:38:59 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-18 18:58:13 +00:00
|
|
|
url = "http://jflex.de/release/${name}.tar.gz";
|
2018-11-18 21:15:58 +00:00
|
|
|
sha256 = "1k7bqw1mn569g9dxc0ia3yz1bzgzs5w52lh1xn3hgj7k5ymh54kk";
|
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 = {
|
2019-04-15 00:25:45 +01:00
|
|
|
homepage = https://www.jflex.de/;
|
2016-01-26 03:19:18 +00:00
|
|
|
description = "Lexical analyzer generator for Java, written in Java";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
2016-08-02 18:50:55 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2005-09-11 16:38:59 +01:00
|
|
|
};
|
|
|
|
}
|