nixpkgs/pkgs/by-name/jf/jflex/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
893 B
Nix
Raw Normal View History

{lib, stdenv, fetchurl, jre} :
2016-01-26 03:19:18 +00:00
stdenv.mkDerivation rec {
pname = "jflex";
2023-03-22 02:22:17 +00:00
version = "1.9.1";
src = fetchurl {
url = "http://jflex.de/release/jflex-${version}.tar.gz";
2023-03-22 02:22:17 +00:00
sha256 = "sha256-4MHp7vkf9t8E1z+l6v8T86ArZ5/uFHTlzK4AciTfbfY=";
2016-01-26 03:19:18 +00:00
};
sourceRoot = "${pname}-${version}";
2016-01-26 03:19:18 +00:00
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";
mainProgram = "jflex";
license = lib.licenses.bsd3;
platforms = lib.platforms.unix;
};
}