2020-07-01 20:30:31 +01:00
|
|
|
{ stdenv, fetchurl, unzip, makeWrapper, openjdk }:
|
2009-06-18 13:51:51 +01:00
|
|
|
|
2015-03-12 20:19:03 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-05 07:10:59 +01:00
|
|
|
pname = "pmd";
|
2020-07-01 20:30:31 +01:00
|
|
|
version = "6.25.0";
|
2009-06-18 13:51:51 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-03-12 20:19:03 +00:00
|
|
|
url = "mirror://sourceforge/pmd/pmd-bin-${version}.zip";
|
2020-07-01 20:30:31 +01:00
|
|
|
sha256 = "0ykg0wylyfiwjlhkbfjqfam34174paihrw7x1dwfq9anyn5bjf0k";
|
2009-06-18 13:51:51 +01:00
|
|
|
};
|
|
|
|
|
2020-07-01 20:30:31 +01:00
|
|
|
nativeBuildInputs = [ unzip makeWrapper ];
|
|
|
|
|
2009-06-18 13:51:51 +01:00
|
|
|
installPhase = ''
|
2019-06-05 07:10:59 +01:00
|
|
|
runHook preInstall
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out
|
2019-06-05 07:10:59 +01:00
|
|
|
cp -R {bin,lib} $out
|
2020-07-01 20:30:31 +01:00
|
|
|
wrapProgram $out/bin/run.sh --prefix PATH : ${openjdk.jre}/bin
|
2019-06-05 07:10:59 +01:00
|
|
|
runHook postInstall
|
2009-06-18 13:51:51 +01:00
|
|
|
'';
|
|
|
|
|
2018-10-11 12:20:01 +01:00
|
|
|
meta = with stdenv.lib; {
|
2018-11-09 12:37:30 +00:00
|
|
|
description = "An extensible cross-language static code analyzer";
|
2019-06-05 07:10:59 +01:00
|
|
|
homepage = "https://pmd.github.io/";
|
|
|
|
changelog = "https://pmd.github.io/pmd-${version}/pmd_release_notes.html";
|
2018-10-11 12:20:01 +01:00
|
|
|
platforms = platforms.unix;
|
2019-06-05 07:10:59 +01:00
|
|
|
license = with licenses; [ bsdOriginal asl20 lgpl3Plus ];
|
2009-06-18 13:51:51 +01:00
|
|
|
};
|
|
|
|
}
|