mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
b06550ed1f
In commit e76ccc6b27
("php.extensions: Add missing meta info",
2021-06-08), Nix expressions for PHP packages were refactored and in
case of phpmd, the value of meta.broken was negated (likely by
mistake). The result was that phpmd is marked as broken, but it seems
to work well, at least for my use case.
Here, we correct the mentioned commit by negating meta.broken again.
33 lines
799 B
Nix
33 lines
799 B
Nix
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
|
let
|
|
pname = "phpmd";
|
|
version = "2.8.2";
|
|
in
|
|
mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/phpmd/phpmd/releases/download/${version}/phpmd.phar";
|
|
sha256 = "1i8qgzxniw5d8zjpypalm384y7qfczapfq70xmg129laq6xiqlqb";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
install -D $src $out/libexec/phpmd/phpmd.phar
|
|
makeWrapper ${php}/bin/php $out/bin/phpmd \
|
|
--add-flags "$out/libexec/phpmd/phpmd.phar"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "PHP code quality analyzer";
|
|
license = licenses.bsd3;
|
|
homepage = "https://phpmd.org/";
|
|
maintainers = teams.php.members;
|
|
broken = versionOlder php.version "7.4";
|
|
};
|
|
}
|