summary refs log tree commit diff
path: root/pkgs/development/compilers/aspectj/builder.sh
blob: 31ec97942e524d301a2e21a4102be1f8d1c8d6cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
source $stdenv/setup

export JAVA_HOME=$jre

cat >> props <<EOF
output.dir=$out
context.javaPath=$jre
EOF

mkdir -p $out
$jre/bin/java -jar $src -text props

echo "Removing files at top level"
for file in $out/*
do
  if test -f $file ; then
    rm $file
  fi
done

cat >> $out/bin/aj-runtime-env <<EOF
#! $SHELL

export CLASSPATH=$CLASSPATH:.:$out/lib/aspectjrt.jar
EOF

chmod u+x $out/bin/aj-runtime-env