nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ mkDerivation, fetchurl, makeWrapper, lib, php }:
2let
3 pname = "phing";
4 version = "2.17.2";
5in
6mkDerivation {
7 inherit pname version;
8
9 src = fetchurl {
10 url = "https://www.phing.info/get/phing-${version}.phar";
11 sha256 = "sha256-KDqJdHIqgtar6ofNG4ENRlpRg9XYFeL5YS7Rclh1+PQ=";
12 };
13
14 dontUnpack = true;
15
16 nativeBuildInputs = [ makeWrapper ];
17
18 installPhase = ''
19 runHook preInstall
20 mkdir -p $out/bin
21 install -D $src $out/libexec/phing/phing.phar
22 makeWrapper ${php}/bin/php $out/bin/phing \
23 --add-flags "$out/libexec/phing/phing.phar"
24 runHook postInstall
25 '';
26
27 meta = with lib; {
28 description = "PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant";
29 license = licenses.lgpl3;
30 homepage = "https://github.com/phingofficial/phing";
31 maintainers = with maintainers; teams.php.members;
32 };
33}