Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }: 2 3mkDerivation rec { 4 pname = "deployer"; 5 version = "6.8.0"; 6 7 src = fetchurl { 8 url = "https://deployer.org/releases/v${version}/${pname}.phar"; 9 sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5"; 10 }; 11 12 dontUnpack = true; 13 14 nativeBuildInputs = [ makeWrapper installShellFiles ]; 15 16 installPhase = '' 17 runHook preInstall 18 mkdir -p $out/bin 19 install -D $src $out/libexec/deployer/deployer.phar 20 makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar" 21 22 # fish support currently broken: https://github.com/deployphp/deployer/issues/2527 23 installShellCompletion --cmd dep \ 24 --bash <($out/bin/dep autocomplete --install) \ 25 --zsh <($out/bin/dep autocomplete --install) 26 runHook postInstall 27 ''; 28 29 meta = with lib; { 30 description = "A deployment tool for PHP"; 31 license = licenses.mit; 32 homepage = "https://deployer.org/"; 33 mainProgram = "dep"; 34 maintainers = with maintainers; teams.php.members; 35 }; 36}