php.packages.deployer: install shell completions

This commit is contained in:
Aaron Andersen 2021-05-28 20:26:37 -04:00
parent 9ffd1e0413
commit 7fc20593c0

View file

@ -1,4 +1,4 @@
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
mkDerivation rec {
pname = "deployer";
@ -11,12 +11,17 @@ mkDerivation rec {
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ makeWrapper installShellFiles ];
installPhase = ''
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)
'';
meta = with lib; {