@@ -0,0 +1,41 @@
1+{ stdenv, fetchurl, makeWrapper, lib, php }:
2+
3+let
4+ pname = "pdepend";
5+ version = "2.10.3";
6+in
7+stdenv.mkDerivation {
8+ inherit pname version;
9+
10+ src = fetchurl {
11+ url = "https://github.com/pdepend/pdepend/releases/download/${version}/pdepend.phar";
12+ sha256 = "I5+n8+a3rHRgW4OM6FbVcf3T1wu9zBrTSb5sGq7ArH4=";
13+ };
14+
15+ dontUnpack = true;
16+
17+ nativeBuildInputs = [ makeWrapper ];
18+
19+ installPhase = ''
20+ runHook preInstall
21+ mkdir -p $out/bin
22+ install -D $src $out/libexec/pdepend/pdepend.phar
23+ makeWrapper ${php}/bin/php $out/bin/pdepend \
24+ --add-flags "$out/libexec/pdepend/pdepend.phar"
25+ runHook postInstall
26+ '';
27+
28+ meta = with lib; {
29+ description = "An adaptation of JDepend for PHP";
30+ homepage = "https://github.com/pdepend/pdepend";
31+ license = licenses.bsd3;
32+ longDescription = "
33+ PHP Depend is an adaptation of the established Java
34+ development tool JDepend. This tool shows you the quality
35+ of your design in terms of extensibility, reusability and
36+ maintainability.
37+ ";
38+ maintainers = teams.php.members;
39+ platforms = platforms.all;
40+ };
41+}