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