1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-26 15:41:40 +00:00

gradle: don't hardcode gradle-launcher-VERSION.jar

Instead, figure out VERSION at build-time. This simplifies using
overrideDerivation (no need to copy and modify installPhase).

Also add a check that the file exists (catch potential failure early).
This commit is contained in:
Bjørn Forsman 2015-02-27 11:04:04 +01:00
parent 2f674d85af
commit fc966aead0

View file

@ -12,9 +12,11 @@ stdenv.mkDerivation rec {
mkdir -pv $out
cp -rv lib $out
gradle_launcher_jar=$(echo $out/lib/gradle-launcher-*.jar)
test -f $gradle_launcher_jar
makeWrapper ${jdk}/bin/java $out/bin/gradle \
--set JAVA_HOME ${jdk} \
--add-flags "-classpath $out/lib/gradle-launcher-2.2.1.jar org.gradle.launcher.GradleMain"
--add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain"
'';
phases = "unpackPhase installPhase";