2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, makeWrapper, openjdk }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pmd";
|
2021-02-19 19:06:45 +00:00
|
|
|
version = "6.30.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/pmd/pmd-bin-${version}.zip";
|
2021-02-19 19:06:45 +00:00
|
|
|
sha256 = "sha256-LgQmoUdsG5sAyHs9YyiaOFonMFaVtHKdp/KvSAWSy8w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
nativeBuildInputs = [ unzip makeWrapper ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
cp -R {bin,lib} $out
|
2020-07-18 16:06:22 +00:00
|
|
|
wrapProgram $out/bin/run.sh --prefix PATH : ${openjdk.jre}/bin
|
2020-04-24 23:36:52 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An extensible cross-language static code analyzer";
|
|
|
|
homepage = "https://pmd.github.io/";
|
|
|
|
changelog = "https://pmd.github.io/pmd-${version}/pmd_release_notes.html";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = with licenses; [ bsdOriginal asl20 lgpl3Plus ];
|
|
|
|
};
|
|
|
|
}
|