2021-01-23 12:26:19 +00:00
|
|
|
{ lib, 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";
|
2021-01-20 23:59:41 +00:00
|
|
|
version = "6.30.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";
|
2021-01-20 23:59:41 +00:00
|
|
|
sha256 = "sha256-LgQmoUdsG5sAyHs9YyiaOFonMFaVtHKdp/KvSAWSy8w=";
|
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
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with 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
|
|
|
};
|
|
|
|
}
|