nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }:
2
3mkDerivation rec {
4 pname = "deployer";
5 version = "6.8.0";
6
7 src = fetchurl {
8 url = "https://deployer.org/releases/v${version}/${pname}.phar";
9 sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5";
10 };
11
12 dontUnpack = true;
13
14 nativeBuildInputs = [ makeWrapper installShellFiles ];
15
16 installPhase = ''
17 mkdir -p $out/bin
18 install -D $src $out/libexec/deployer/deployer.phar
19 makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"
20
21 # fish support currently broken: https://github.com/deployphp/deployer/issues/2527
22 installShellCompletion --cmd dep \
23 --bash <($out/bin/dep autocomplete --install) \
24 --zsh <($out/bin/dep autocomplete --install)
25 '';
26
27 meta = with lib; {
28 description = "A deployment tool for PHP";
29 license = licenses.mit;
30 homepage = "https://deployer.org/";
31 maintainers = with maintainers; teams.php.members;
32 };
33}