From 289604273803b548605a3eca8ef44a26e7c43c7d Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Tue, 15 Nov 2016 18:38:48 -0500 Subject: [PATCH] gradle: Add variable nativeVersion --- .../tools/build-managers/gradle/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index dee5146e7307..8d9308e7fcff 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchurl, unzip, jdk, makeWrapper }: rec { - gradleGen = {name, src} : stdenv.mkDerivation rec { - inherit name src; + gradleGen = {name, src, nativeVersion} : stdenv.mkDerivation rec { + inherit name src nativeVersion; dontBuild = true; @@ -21,10 +21,10 @@ rec { let arch = if stdenv.is64bit then "amd64" else "i386"; in '' mkdir patching pushd patching - jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-0.11.jar + jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-${nativeVersion}.jar patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64" net/rubygrapefruit/platform/linux-${arch}/libnative-platform.so - jar cf native-platform-linux-${arch}-0.11.jar . - mv native-platform-linux-${arch}-0.11.jar $out/lib/gradle/lib/ + jar cf native-platform-linux-${arch}-${nativeVersion}.jar . + mv native-platform-linux-${arch}-${nativeVersion}.jar $out/lib/gradle/lib/ popd # The scanner doesn't pick up the runtime dependency in the jar. @@ -53,6 +53,7 @@ rec { gradle_latest = gradleGen rec { name = "gradle-3.2"; + nativeVersion = "0.11"; src = fetchurl { url = "http://services.gradle.org/distributions/${name}-bin.zip"; @@ -62,6 +63,7 @@ rec { gradle_2_14 = gradleGen rec { name = "gradle-2.14.1"; + nativeVersion = "0.10"; src = fetchurl { url = "http://services.gradle.org/distributions/${name}-bin.zip"; @@ -71,6 +73,7 @@ rec { gradle_2_5 = gradleGen rec { name = "gradle-2.5"; + nativeVersion = "0.10"; src = fetchurl { url = "http://services.gradle.org/distributions/${name}-bin.zip";