@@ -0,0 +1,39 @@
1+{ stdenv, fetchurl, unzip, jdk, makeWrapper }:
2+
3+stdenv.mkDerivation rec {
4+ name = "gradle-2.5";
5+
6+ src = fetchurl {
7+ url = "http://services.gradle.org/distributions/${name}-bin.zip";
8+ sha256 = "0mc5lf6phkncx77r0papzmfvyiqm0y26x50ipvmzkcsbn463x59z";
9+ };
10+
11+ installPhase = ''
12+ mkdir -pv $out/gradle
13+ cp -rv lib $out/gradle
14+
15+ gradle_launcher_jar=$(echo $out/gradle/lib/gradle-launcher-*.jar)
16+ test -f $gradle_launcher_jar
17+ makeWrapper ${jdk}/bin/java $out/bin/gradle \
18+ --set JAVA_HOME ${jdk} \
19+ --add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain"
20+ '';
21+
22+ phases = "unpackPhase installPhase";
23+
24+ buildInputs = [ unzip jdk makeWrapper ];
25+
26+ meta = {
27+ description = "Enterprise-grade build system";
28+ longDescription = ''
29+ Gradle is a build system which offers you ease, power and freedom.
30+ You can choose the balance for yourself. It has powerful multi-project
31+ build support. It has a layer on top of Ivy that provides a
32+ build-by-convention integration for Ivy. It gives you always the choice
33+ between the flexibility of Ant and the convenience of a
34+ build-by-convention behavior.
35+ '';
36+ homepage = http://www.gradle.org/;
37+ license = stdenv.lib.licenses.asl20;
38+ };
39+}