2021-06-06 07:54:09 +00:00
|
|
|
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "deployer";
|
|
|
|
version = "6.8.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://deployer.org/releases/v${version}/${pname}.phar";
|
|
|
|
sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5";
|
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2021-06-06 07:54:09 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook preInstall
|
2021-05-20 23:08:51 +00:00
|
|
|
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"
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
# 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)
|
2022-03-30 09:31:56 +00:00
|
|
|
runHook postInstall
|
2021-05-20 23:08:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A deployment tool for PHP";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://deployer.org/";
|
2022-11-21 17:40:18 +00:00
|
|
|
mainProgram = "dep";
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; teams.php.members;
|
|
|
|
};
|
|
|
|
}
|