mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +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:
parent
2f674d85af
commit
fc966aead0
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user