Merge pull request #77417 from petabyteboy/feature/gradle-cleanup

remove old gradle versions
This commit is contained in:
Florian Klink 2020-01-10 11:27:47 +01:00 committed by GitHub
commit f29e259efe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 57 deletions

View file

@ -72,38 +72,4 @@ rec {
sha256 = "0vhqxnk0yj3q9jam5w4kpia70i4h0q4pjxxqwynh3qml0vrcn9l6";
};
};
gradle_3_5 = gradleGen rec {
name = "gradle-3.5.1";
nativeVersion = "0.14";
src = fetchurl {
url = "http://services.gradle.org/distributions/${name}-bin.zip";
sha256 = "1y7fbhrdriclbs5ksxahi0aafsz760lalwyz8r4llysc5pskbkld";
};
};
gradle_2_14 = gradleGen rec {
name = "gradle-2.14.1";
nativeVersion = "0.10";
src = fetchurl {
url = "http://services.gradle.org/distributions/${name}-bin.zip";
sha256 = "0fggjxpsnakdaviw7bn2jmsl06997phlqr1251bjmlgjf7d1xing";
};
};
# Nix pkgs that depend on this old version:
# pkgs/tools/security/jd-gui/default.nix
# pkgs/servers/mxisd/default.nix
# If these packages are updated, this old version can probably be removed
gradle_2_5 = gradleGen rec {
name = "gradle-2.5";
nativeVersion = "0.10";
src = fetchurl {
url = "http://services.gradle.org/distributions/${name}-bin.zip";
sha256 = "0mc5lf6phkncx77r0papzmfvyiqm0y26x50ipvmzkcsbn463x59z";
};
};
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, jre, git, gradle_4, perl, makeWrapper }:
{ stdenv, fetchFromGitHub, jre, git, gradle, perl, makeWrapper }:
let
name = "mxisd-${version}";
@ -16,7 +16,7 @@ let
deps = stdenv.mkDerivation {
name = "${name}-deps";
inherit src;
nativeBuildInputs = [ gradle_4 perl git ];
nativeBuildInputs = [ gradle perl git ];
buildPhase = ''
export MXISD_BUILD_VERSION=${rev}
@ -41,7 +41,7 @@ let
in
stdenv.mkDerivation {
inherit name src version;
nativeBuildInputs = [ gradle_4 perl makeWrapper ];
nativeBuildInputs = [ gradle perl makeWrapper ];
buildInputs = [ jre ];
patches = [ ./0001-gradle.patch ];

View file

@ -1,27 +1,25 @@
{ stdenv, fetchFromGitHub, jre, jdk, makeDesktopItem, perl, writeText, runtimeShell }:
{ stdenv, fetchFromGitHub, jre, jdk, gradle, makeDesktopItem, perl, writeText, runtimeShell }:
let
pname = "jd-gui";
version = "1.6.5";
version = "1.6.6";
src = fetchFromGitHub {
owner = "java-decompiler";
repo = pname;
rev = "v${version}";
sha256 = "0yn2xcwznig941pw2f3wi8ixz1wprxcn9wl0g2ggdzx51rfwgzzi";
sha256 = "010bd3q2m4jy4qz5ahdx86b5f558s068gbjlbpdhq3bhh4yrjy20";
};
deps = stdenv.mkDerivation {
name = "${pname}-deps";
inherit src;
nativeBuildInputs = [ jdk perl ];
patchPhase = "patchShebangs gradlew";
nativeBuildInputs = [ jdk perl gradle ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d);
./gradlew --no-daemon jar
gradle --no-daemon jar
'';
# Mavenize dependency paths
@ -30,12 +28,11 @@ let
find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \
| perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
| sh
cp -r $GRADLE_USER_HOME/wrapper $out
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1s4p91iiyikrsgvpzkhw3jm5lsm0jpzp7iw7afdhhl9jm18igs70";
outputHash = "1qil12s0daxpxj5xj5dj6s2k89is0kiir2vcafkm3lasc41acmk3";
};
# Point to our local deps repo
@ -74,15 +71,11 @@ in stdenv.mkDerivation rec {
inherit pname version src;
name = "${pname}-${version}";
nativeBuildInputs = [ jdk ];
patchPhase = "patchShebangs gradlew";
nativeBuildInputs = [ jdk gradle ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
cp -r ${deps}/wrapper $GRADLE_USER_HOME
chmod u+w $GRADLE_USER_HOME/wrapper/dists/gradle*/*/*.lck
./gradlew --offline --no-daemon --info --init-script ${gradleInit} jar
gradle --offline --no-daemon --info --init-script ${gradleInit} jar
'';
installPhase = let

View file

@ -10119,12 +10119,7 @@ in
java = jdk;
};
gradle = res.gradleGen.gradle_latest;
gradle_2_5 = res.gradleGen.gradle_2_5;
gradle_2_14 = res.gradleGen.gradle_2_14;
gradle_3_5 = res.gradleGen.gradle_3_5;
gradle_4_10 = res.gradleGen.gradle_4_10;
gradle_2 = gradle_2_14;
gradle_3 = gradle_3_5;
gradle_4 = gradle_4_10;
gradle_5 = res.gradleGen.gradle_5_6;