8a45d4525b
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
35 lines
1 KiB
Nix
35 lines
1 KiB
Nix
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
|
|
|
|
mkDerivation rec {
|
|
pname = "deployer";
|
|
version = "6.8.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://deployer.org/releases/v${version}/${pname}.phar";
|
|
sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
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;
|
|
homepage = "https://deployer.org/";
|
|
maintainers = with maintainers; teams.php.members;
|
|
};
|
|
}
|