587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, ant
|
|
, jdk
|
|
, makeWrapper
|
|
, stripJavaArchivesHook
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "jdepend";
|
|
version = "2.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "clarkware";
|
|
repo = "jdepend";
|
|
rev = finalAttrs.version;
|
|
hash = "sha256-0/xGgAaJ7TTUHxShJbbcPzTODk4lDn+FOn5St5McrtM=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
ant
|
|
jdk
|
|
makeWrapper
|
|
stripJavaArchivesHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
ant jar
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm644 dist/jdepend-*.jar -t $out/share/jdepend
|
|
|
|
makeWrapper ${jdk.jre}/bin/java $out/bin/jdepend \
|
|
--add-flags "-classpath $out/share/jdepend/jdepend-*.jar"
|
|
|
|
for type in "swingui" "textui" "xmlui"; do
|
|
makeWrapper $out/bin/jdepend $out/bin/jdepend-$type \
|
|
--add-flags "jdepend.$type.JDepend"
|
|
done
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/clarkware/jdepend/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
|
description = "Traverses Java class file directories and generates design quality metrics for each Java package";
|
|
homepage = "http://www.clarkware.com/software/JDepend.html";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ pSub ];
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|