Merge pull request #124817 from aanderse/php.packages.deployer

php.packages.deployer: install shell completions
This commit is contained in:
Sandro 2021-06-06 00:30:39 +02:00 committed by GitHub
commit 790a4683b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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; {