mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
Merge pull request #182919 from smancill/pmd-6.47.0
This commit is contained in:
commit
125e8f6b79
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user