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

pdepend: Build from source
This commit is contained in:
Pol Dellaiera 2023-09-17 19:35:18 +02:00 committed by GitHub
commit 5cbbc68e1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 43 deletions

View file

@ -0,0 +1,29 @@
{ php, fetchFromGitHub, lib }:
php.buildComposerProject (finalAttrs: {
pname = "pdepend";
version = "2.14.0";
src = fetchFromGitHub {
owner = "pdepend";
repo = "pdepend";
rev = finalAttrs.version;
hash = "sha256-ZmgMuOpUsx5JWTcPRS6qKbTWZvuOrBVOVdPMcvvTV20=";
};
vendorHash = "sha256-MWm8urRB9IujqrIl22x+JFFCRR+nINLQqnHUywT2pi0=";
meta = {
description = "An adaptation of JDepend for PHP";
homepage = "https://github.com/pdepend/pdepend";
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 = lib.teams.php.members;
platforms = lib.platforms.all;
};
})

View file

@ -1,41 +0,0 @@
{ stdenv, fetchurl, makeWrapper, lib, php }:
let
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=";
};
dontUnpack = true;
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; {
description = "An adaptation of JDepend for PHP";
homepage = "https://github.com/pdepend/pdepend";
license = 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;
};
}

View file

@ -4014,8 +4014,6 @@ with pkgs;
pbpctrl = callPackage ../applications/audio/pbpctrl { }; pbpctrl = callPackage ../applications/audio/pbpctrl { };
pdepend = callPackage ../development/php-packages/pdepend { };
inherd-quake = callPackage ../applications/misc/inherd-quake { inherd-quake = callPackage ../applications/misc/inherd-quake {
inherit (darwin.apple_sdk.frameworks) CoreServices Security; inherit (darwin.apple_sdk.frameworks) CoreServices Security;
}; };