6952cab029
Co-authored-by: R. Ryantm <ryantm-bot@ryantm.com> Co-authored-by: Souvik Sen <nixpkgs-commits@deshaw.com>
39 lines
927 B
Nix
39 lines
927 B
Nix
{ stdenv, lib, fetchFromGitHub, ant, jdk, jre, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "javacc";
|
|
version = "7.0.12";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = pname;
|
|
repo = pname;
|
|
rev = "${pname}-${version}";
|
|
sha256 = "sha256-tDtstF3ivKjG01vOZ8Ga1zTjIZFSTWt5QPY1VQvyFMU=";
|
|
};
|
|
|
|
nativeBuildInputs = [ ant jdk makeWrapper ];
|
|
|
|
buildPhase = ''
|
|
ant jar
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/target
|
|
mv scripts $out/bin
|
|
mv target/javacc.jar $out/target/
|
|
find -L "$out/bin" -type f -executable -print0 \
|
|
| while IFS= read -r -d ''' file; do
|
|
wrapProgram "$file" --suffix PATH : ${jre}/bin
|
|
done
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = "ant test";
|
|
|
|
meta = with lib; {
|
|
homepage = "https://javacc.github.io/javacc";
|
|
description = "A parser generator for building parsers from grammars";
|
|
license = licenses.bsd2;
|
|
maintainers = teams.deshaw.members;
|
|
};
|
|
}
|