3
0
Fork 0
forked from mirrors/nixpkgs

jd-gui: patch to work with Gradle 6

This commit is contained in:
Theodore Ni 2022-12-12 13:13:58 -08:00
parent 75a27e2996
commit ea69f1a8b8
No known key found for this signature in database
GPG key ID: 48B67583BDDD4474

View file

@ -1,4 +1,16 @@
{ lib, stdenv, fetchFromGitHub, jre, jdk, gradle_5, makeDesktopItem, copyDesktopItems, perl, writeText, runtimeShell }:
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, jre
, jdk
, gradle_6
, makeDesktopItem
, copyDesktopItems
, perl
, writeText
, runtimeShell
}:
let
pname = "jd-gui";
@ -8,14 +20,23 @@ let
owner = "java-decompiler";
repo = pname;
rev = "v${version}";
sha256 = "010bd3q2m4jy4qz5ahdx86b5f558s068gbjlbpdhq3bhh4yrjy20";
hash = "sha256-QHiZPYFwDQzbXVSuhwzQqBRXlkG9QVU+Jl6SKvBoCwQ=";
};
patches = [
# https://github.com/java-decompiler/jd-gui/pull/362
(fetchpatch {
name = "nebula-plugin-gradle-6-compatibility.patch";
url = "https://github.com/java-decompiler/jd-gui/commit/91f805f9dc8ce0097460e63c8095ccea870687e6.patch";
hash = "sha256-9eaM9Mx2FaKIhGSOHjATKN/CrtvJeXyrH8Mdx8LNtpE=";
})
];
deps = stdenv.mkDerivation {
name = "${pname}-deps";
inherit src;
inherit src patches;
nativeBuildInputs = [ jdk perl gradle_5 ];
nativeBuildInputs = [ jdk perl gradle_6 ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d);
@ -32,7 +53,7 @@ let
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1qil12s0daxpxj5xj5dj6s2k89is0kiir2vcafkm3lasc41acmk3";
outputHash = "sha256-gqUyZE+MoZRYCcJx95Qc4dZIC3DZvxee6UQhpfveDI4=";
};
# Point to our local deps repo
@ -68,10 +89,10 @@ let
};
in stdenv.mkDerivation rec {
inherit pname version src;
inherit pname version src patches;
name = "${pname}-${version}";
nativeBuildInputs = [ jdk gradle_5 copyDesktopItems ];
nativeBuildInputs = [ jdk gradle_6 copyDesktopItems ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)