mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 10:56:53 +00:00
24 lines
344 B
Bash
24 lines
344 B
Bash
|
source $stdenv/setup
|
||
|
|
||
|
tar zxvf $src
|
||
|
cd antlr-*
|
||
|
cd lib
|
||
|
|
||
|
ensureDir $out/lib/antlr
|
||
|
ensureDir $out/bin
|
||
|
|
||
|
cp *.jar $out/lib/antlr
|
||
|
|
||
|
classpath=""
|
||
|
for jar in $out/lib/antlr/*.jar; do
|
||
|
classpath="$classpath:$jar"
|
||
|
done
|
||
|
|
||
|
cat > $out/bin/antlr <<EOF
|
||
|
#! $SHELL
|
||
|
|
||
|
$jre/bin/java -cp $classpath -Xms200M -Xmx400M org.antlr.Tool \$*
|
||
|
EOF
|
||
|
|
||
|
chmod u+x $out/bin/antlr
|