php.packages.deployer: install shell completions
This commit is contained in:
parent
9ffd1e0413
commit
7fc20593c0
|
@ -1,4 +1,4 @@
|
||||||
{ mkDerivation, fetchurl, makeWrapper, lib, php }:
|
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "deployer";
|
pname = "deployer";
|
||||||
|
@ -11,12 +11,17 @@ mkDerivation rec {
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
install -D $src $out/libexec/deployer/deployer.phar
|
install -D $src $out/libexec/deployer/deployer.phar
|
||||||
makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$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; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue