···11-{ stdenv, fetchurl, unzip, jdk, makeWrapper }:
22-33-stdenv.mkDerivation rec {
44- name = "gradle-2.5";
55-66- src = fetchurl {
77- url = "http://services.gradle.org/distributions/${name}-bin.zip";
88- sha256 = "0mc5lf6phkncx77r0papzmfvyiqm0y26x50ipvmzkcsbn463x59z";
99- };
1010-1111- installPhase = ''
1212- mkdir -pv $out/gradle
1313- cp -rv lib $out/gradle
1414-1515- gradle_launcher_jar=$(echo $out/gradle/lib/gradle-launcher-*.jar)
1616- test -f $gradle_launcher_jar
1717- makeWrapper ${jdk}/bin/java $out/bin/gradle \
1818- --set JAVA_HOME ${jdk} \
1919- --add-flags "-classpath $gradle_launcher_jar org.gradle.launcher.GradleMain"
2020- '';
2121-2222- phases = "unpackPhase installPhase";
2323-2424- buildInputs = [ unzip jdk makeWrapper ];
2525-2626- meta = {
2727- description = "Enterprise-grade build system";
2828- longDescription = ''
2929- Gradle is a build system which offers you ease, power and freedom.
3030- You can choose the balance for yourself. It has powerful multi-project
3131- build support. It has a layer on top of Ivy that provides a
3232- build-by-convention integration for Ivy. It gives you always the choice
3333- between the flexibility of Ant and the convenience of a
3434- build-by-convention behavior.
3535- '';
3636- homepage = http://www.gradle.org/;
3737- license = stdenv.lib.licenses.asl20;
3838- };
3939-}