Unverified Commit 5cbbc68e authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

Merge pull request #255704 from etu/pdepend-build-from-source

pdepend: Build from source
parents ec55bc4a 77f079cb
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
{ stdenv, fetchurl, makeWrapper, lib, php }:
{ php, fetchFromGitHub, lib }:

let
php.buildComposerProject (finalAttrs: {
  pname = "pdepend";
  version = "2.14.0";
in
stdenv.mkDerivation {
  inherit pname version;

  src = fetchurl {
    url = "https://github.com/pdepend/pdepend/releases/download/${version}/pdepend.phar";
    sha256 = "sha256-t6Yf+z/8O/tZuYoLAZo2G5bORh8XPeEMdK57dWjHsmk=";
  src = fetchFromGitHub {
    owner = "pdepend";
    repo = "pdepend";
    rev = finalAttrs.version;
    hash = "sha256-ZmgMuOpUsx5JWTcPRS6qKbTWZvuOrBVOVdPMcvvTV20=";
  };

  dontUnpack = true;
  vendorHash = "sha256-MWm8urRB9IujqrIl22x+JFFCRR+nINLQqnHUywT2pi0=";

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/bin
    install -D $src $out/libexec/pdepend/pdepend.phar
    makeWrapper ${php}/bin/php $out/bin/pdepend \
      --add-flags "$out/libexec/pdepend/pdepend.phar"
    runHook postInstall
  '';

  meta = with lib; {
  meta = {
    description = "An adaptation of JDepend for PHP";
    homepage = "https://github.com/pdepend/pdepend";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    longDescription = "
      PHP Depend is an adaptation of the established Java
      development tool JDepend. This tool shows you the quality
      of your design in terms of extensibility, reusability and
      maintainability.
    ";
    maintainers = teams.php.members;
    platforms = platforms.all;
    maintainers = lib.teams.php.members;
    platforms = lib.platforms.all;
  };
}
})
+0 −2
Original line number Diff line number Diff line
@@ -4014,8 +4014,6 @@ with pkgs;
  pbpctrl = callPackage ../applications/audio/pbpctrl { };
  pdepend = callPackage ../development/php-packages/pdepend { };
  inherd-quake = callPackage ../applications/misc/inherd-quake {
    inherit (darwin.apple_sdk.frameworks) CoreServices Security;
  };