Unverified Commit 7491aa43 authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

phpPackages.deployer: 6.8.0 -> 7.3.3

parent 8d0197fe
Loading
Loading
Loading
Loading
+17 −27
Original line number Diff line number Diff line
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
{ lib
, fetchFromGitHub
, php
}:

mkDerivation rec {
php.buildComposerProject (finalAttrs: {
  pname = "deployer";
  version = "6.8.0";
  version = "7.3.3";

  src = fetchurl {
    url = "https://deployer.org/releases/v${version}/${pname}.phar";
    sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5";
  src = fetchFromGitHub {
    owner = "deployphp";
    repo = "deployer";
    rev = "v${finalAttrs.version}^";
    hash = "sha256-zvK7NwIACAhWN/7D8lVY1Bv8x6xKAp/L826SovQhDYg=";
  };

  dontUnpack = true;
  vendorHash = "sha256-BDq2uryNWC31AEAEZJL9zGaAPbhXZ6hmfpsnr4wlixE=";

  nativeBuildInputs = [ makeWrapper installShellFiles ];

  installPhase = ''
    runHook preInstall
    mkdir -p $out/bin
    install -D $src $out/libexec/deployer/deployer.phar
    makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"

    # fish support currently broken: https://github.com/deployphp/deployer/issues/2527
    installShellCompletion --cmd dep \
      --bash <($out/bin/dep autocomplete --install) \
      --zsh <($out/bin/dep autocomplete --install)
    runHook postInstall
  '';

  meta = with lib; {
    description = "A deployment tool for PHP";
    license = licenses.mit;
  meta = {
    description = "The PHP deployment tool with support for popular frameworks out of the box";
    homepage = "https://deployer.org/";
    license = lib.licenses.mit;
    mainProgram = "dep";
    maintainers = with maintainers; teams.php.members;
    maintainers = lib.teams.php.members;
  };
}
})