nixpkgs-suyu/pkgs/build-support/setup-hooks/set-java-classpath.sh
2014-08-09 12:47:05 +02:00

13 lines
305 B
Bash

# This setup hook adds every JAR in the share/java subdirectories of
# the build inputs to $CLASSPATH.
export CLASSPATH
addPkgToClassPath () {
local jar
for jar in $1/share/java/*.jar; do
export CLASSPATH=''${CLASSPATH}''${CLASSPATH:+:}''${jar}
done
}
envHooks+=(addPkgToClassPath)