Merge pull request #182919 from smancill/pmd-6.47.0

This commit is contained in:
Sandro 2022-08-05 11:37:43 +02:00 committed by GitHub
commit 125e8f6b79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,20 +2,32 @@
stdenv.mkDerivation rec {
pname = "pmd";
version = "6.43.0";
version = "6.47.0";
src = fetchurl {
url = "mirror://sourceforge/pmd/pmd-bin-${version}.zip";
sha256 = "sha256-+eJCN890vm4WBcMZ2VCGOS8WUyIckL+DfQVNaUSovGE=";
url = "https://github.com/pmd/pmd/releases/download/pmd_releases/${version}/pmd-bin-${version}.zip";
hash = "sha256-0rOV6l5VCdBkk5+F/k2vYtHQWzwugvp3ogaTRuXUKXE=";
};
nativeBuildInputs = [ unzip makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R {bin,lib} $out
wrapProgram $out/bin/run.sh --prefix PATH : ${openjdk.jre}/bin
install -Dm755 bin/run.sh $out/libexec/pmd
install -Dm644 lib/*.jar -t $out/lib/pmd
wrapProgram $out/libexec/pmd \
--prefix PATH : ${openjdk.jre}/bin \
--set LIB_DIR $out/lib/pmd
for app in pmd cpd cpdgui designer bgastviewer designerold ast-dump; do
makeWrapper $out/libexec/pmd $out/bin/$app --argv0 $app --add-flags $app
done
runHook postInstall
'';