3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/java/jflex/default.nix

38 lines
832 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 {
2018-11-18 21:15:58 +00:00
name = "jflex-1.7.0";
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 = ''
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 = {
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;
};
}