2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
24 lines
447 B
Bash
24 lines
447 B
Bash
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
|
source $stdenv/setup
|
|
|
|
tar zxvf $src
|
|
cd antlr-*
|
|
cd lib
|
|
|
|
mkdir -p $out/lib/antlr
|
|
mkdir -p $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
|