2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ant, jdk, runtimeShell }:
|
2009-06-18 13:51:51 +01:00
|
|
|
|
2017-03-20 20:29:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "jdepend";
|
2020-03-07 20:52:17 +00:00
|
|
|
version = "2.10";
|
2009-06-18 13:51:51 +01:00
|
|
|
|
2017-03-20 20:29:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "clarkware";
|
|
|
|
repo = "jdepend";
|
|
|
|
rev = version;
|
2020-03-07 20:52:17 +00:00
|
|
|
sha256 = "1lxf3j9vflky7a2py3i59q7cwd1zvjv2b88l3za39vc90s04dz6k";
|
2009-06-18 13:51:51 +01:00
|
|
|
};
|
|
|
|
|
2017-03-20 20:29:47 +00:00
|
|
|
nativeBuildInputs = [ ant jdk ];
|
|
|
|
buildPhase = "ant jar";
|
|
|
|
|
2009-06-18 13:51:51 +01:00
|
|
|
installPhase = ''
|
2017-03-20 20:29:47 +00:00
|
|
|
mkdir -p $out/bin $out/share
|
2019-08-15 13:41:18 +01:00
|
|
|
install dist/${pname}-${version}.jar $out/share
|
2017-03-20 20:29:47 +00:00
|
|
|
|
|
|
|
cat > "$out/bin/jdepend" <<EOF
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2017-03-20 20:29:47 +00:00
|
|
|
exec ${jdk.jre}/bin/java -classpath "$out/share/*" "\$@"
|
|
|
|
EOF
|
|
|
|
chmod a+x $out/bin/jdepend
|
2009-06-18 13:51:51 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Traverses Java class file directories and generates design quality metrics for each Java package";
|
2020-03-07 20:52:17 +00:00
|
|
|
homepage = "http://www.clarkware.com/software/JDepend.html";
|
2017-03-20 20:29:47 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.linux;
|
2018-07-17 21:00:14 +01:00
|
|
|
maintainers = with maintainers; [ pSub ];
|
2009-06-18 13:51:51 +01:00
|
|
|
};
|
|
|
|
}
|