fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ mkDerivation, fetchurl, makeWrapper, lib, php }:
2let
3 pname = "phpmd";
4 version = "2.8.2";
5
6 isPhp74 = lib.versionAtLeast php.version "7.4";
7in
8mkDerivation {
9 inherit pname version;
10
11 src = fetchurl {
12 url = "https://github.com/phpmd/phpmd/releases/download/${version}/phpmd.phar";
13 sha256 = "1i8qgzxniw5d8zjpypalm384y7qfczapfq70xmg129laq6xiqlqb";
14 };
15
16 phases = [ "installPhase" ];
17 nativeBuildInputs = [ makeWrapper ];
18
19 installPhase = ''
20 mkdir -p $out/bin
21 install -D $src $out/libexec/phpmd/phpmd.phar
22 makeWrapper ${php}/bin/php $out/bin/phpmd \
23 --add-flags "$out/libexec/phpmd/phpmd.phar"
24 '';
25
26 meta = with lib; {
27 description = "PHP code quality analyzer";
28 license = licenses.bsd3;
29 homepage = "https://phpmd.org/";
30 maintainers = teams.php.members;
31 broken = !isPhp74;
32 };
33}