From 2e6053dade9ec03e2bb64d4e2b1ad352809a2255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20P=C3=A4ssler?= Date: Fri, 10 Jan 2020 04:16:48 +0100 Subject: [PATCH] jd-gui: use gradle from nixpkgs It builds just fine with the packaged gradle, no reason to pull in another impure dependency. --- pkgs/tools/security/jd-gui/default.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/security/jd-gui/default.nix b/pkgs/tools/security/jd-gui/default.nix index 86b88638bd76..63672386987c 100644 --- a/pkgs/tools/security/jd-gui/default.nix +++ b/pkgs/tools/security/jd-gui/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, jre, jdk, makeDesktopItem, perl, writeText, runtimeShell }: +{ stdenv, fetchFromGitHub, jre, jdk, gradle, makeDesktopItem, perl, writeText, runtimeShell }: let pname = "jd-gui"; @@ -15,13 +15,11 @@ let 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 = "1rbsi4i8xihsihkmxacgawlwjyixmhm2n9mn8ykv8595iyifzw6w"; }; # 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