jd-cli: init at 1.2.1
This commit is contained in:
parent
83733b5537
commit
437ae8dfd5
2 changed files with 64 additions and 0 deletions
62
pkgs/tools/security/jd-cli/default.nix
Normal file
62
pkgs/tools/security/jd-cli/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchFromGitHub, jre, makeWrapper, maven }:
|
||||
|
||||
let
|
||||
pname = "jd-cli";
|
||||
version = "1.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intoolswetrust";
|
||||
repo = pname;
|
||||
rev = "${pname}-${version}";
|
||||
hash = "sha256-rRttA5H0A0c44loBzbKH7Waoted3IsOgxGCD2VM0U/Q=";
|
||||
};
|
||||
|
||||
deps = stdenv.mkDerivation {
|
||||
name = "${pname}-${version}-deps";
|
||||
inherit src;
|
||||
|
||||
nativeBuildInputs = [ maven ];
|
||||
buildPhase = ''
|
||||
mvn package -Dmaven.repo.local=$out
|
||||
'';
|
||||
|
||||
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside
|
||||
installPhase = ''
|
||||
find $out -type f \
|
||||
-name \*.lastUpdated -or \
|
||||
-name resolver-status.properties -or \
|
||||
-name _remote.repositories \
|
||||
-delete
|
||||
'';
|
||||
|
||||
dontFixup = true;
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = "sha256-5d3ZLuzoEkPjh01uL/BuhJ6kevLdsm1P4PMLkEWaVUM=";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit pname version src;
|
||||
|
||||
nativeBuildInputs = [ maven makeWrapper ];
|
||||
|
||||
buildPhase = ''
|
||||
mvn --offline -Dmaven.repo.local=${deps} package;
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/jd-cli
|
||||
install -Dm644 jd-cli/target/jd-cli.jar $out/share/jd-cli
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/jd-cli \
|
||||
--add-flags "-jar $out/share/jd-cli/jd-cli.jar"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Simple command line wrapper around JD Core Java Decompiler project";
|
||||
homepage = "https://github.com/intoolswetrust/jd-cli";
|
||||
license = licenses.gpl3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ majiir ];
|
||||
};
|
||||
}
|
|
@ -8101,6 +8101,8 @@ with pkgs;
|
|||
|
||||
jc = with python3Packages; toPythonApplication jc;
|
||||
|
||||
jd-cli = callPackage ../tools/security/jd-cli { };
|
||||
|
||||
jd-diff-patch = callPackage ../development/tools/jd-diff-patch { };
|
||||
|
||||
jd-gui = callPackage ../tools/security/jd-gui { };
|
||||
|
|
Loading…
Reference in a new issue