nixpkgs/pkgs/development/libraries/java/jflex/default.nix

38 lines
834 B
Nix
Raw Normal View History

2018-11-18 21:15:58 +00:00
{stdenv, fetchurl, jre} :
2016-01-26 03:19:18 +00:00
stdenv.mkDerivation rec {
2020-05-07 20:15:07 +01:00
name = "jflex-1.8.2";
src = fetchurl {
2018-11-18 18:58:13 +00:00
url = "http://jflex.de/release/${name}.tar.gz";
2020-05-07 20:15:07 +01: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 = ''
runHook preInstallCheck
2018-11-19 09:50:29 +00:00
$out/bin/jflex --version
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";
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.unix;
};
}