Merge pull request #163986 from drupol/php/add-phive
php.packages.phive: init at 0.15.0
commit438fb6de0936d73192bdfc04365c25433d0bd9ba
authorJan Tojnar <jtojnar@gmail.com>
dateSun 13 Mar 2022, 23:59 (5 years ago)
parent1900db540195e1
pkgs/development/php-packages/box/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/box/box.phar
2122 makeWrapper ${php}/bin/php $out/bin/box \
2223 --add-flags "-d phar.readonly=0 $out/libexec/box/box.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/deployer/default.nix+2
@@ -14,6 +14,7 @@ mkDerivation rec {
1414 nativeBuildInputs = [ makeWrapper installShellFiles ];
1515
1616 installPhase = ''
17+ runHook preInstall
1718 mkdir -p $out/bin
1819 install -D $src $out/libexec/deployer/deployer.phar
1920 makeWrapper ${php}/bin/php $out/bin/dep --add-flags "$out/libexec/deployer/deployer.phar"
@@ -22,6 +23,7 @@ mkDerivation rec {
2223 installShellCompletion --cmd dep \
2324 --bash <($out/bin/dep autocomplete --install) \
2425 --zsh <($out/bin/dep autocomplete --install)
26+ runHook postInstall
2527 '';
2628
2729 meta = with lib; {
pkgs/development/php-packages/phing/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/phing/phing.phar
2122 makeWrapper ${php}/bin/php $out/bin/phing \
2223 --add-flags "$out/libexec/phing/phing.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/phive/default.nixnew file+31
@@ -0,0 +1,31 @@
1+{ mkDerivation, fetchurl, makeWrapper, lib, php }:
2+
3+mkDerivation rec {
4+ pname = "phive";
5+ version = "0.15.0";
6+
7+ src = fetchurl {
8+ url = "https://github.com/phar-io/phive/releases/download/${version}/phive-${version}.phar";
9+ sha256 = "sha256-crMr8d5nsVt7+zQ5xPeph/JXmTEn6jJFVtp3mOgylB4=";
10+ };
11+
12+ dontUnpack = true;
13+
14+ nativeBuildInputs = [ makeWrapper ];
15+
16+ installPhase = ''
17+ runHook preInstall
18+ mkdir -p $out/bin
19+ install -D $src $out/libexec/phive/phive.phar
20+ makeWrapper ${php}/bin/php $out/bin/phive \
21+ --add-flags "$out/libexec/phive/phive.phar"
22+ runHook postInstall
23+ '';
24+
25+ meta = with lib; {
26+ description = "The Phar Installation and Verification Environment (PHIVE)";
27+ homepage = "https://github.com/phar-io/phive";
28+ license = licenses.bsd3;
29+ maintainers = with maintainers; teams.php.members;
30+ };
31+}
pkgs/development/php-packages/php-cs-fixer/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/php-cs-fixer/php-cs-fixer.phar
2122 makeWrapper ${php}/bin/php $out/bin/php-cs-fixer \
2223 --add-flags "$out/libexec/php-cs-fixer/php-cs-fixer.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/php-parallel-lint/default.nix+4
@@ -20,15 +20,19 @@ mkDerivation {
2020 ];
2121
2222 buildPhase = ''
23+ runHook preBuild
2324 composer dump-autoload
2425 box build
26+ runHook postBuild
2527 '';
2628
2729 installPhase = ''
30+ runHook preInstall
2831 mkdir -p $out/bin
2932 install -D parallel-lint.phar $out/libexec/php-parallel-lint/php-parallel-lint.phar
3033 makeWrapper ${php}/bin/php $out/bin/php-parallel-lint \
3134 --add-flags "$out/libexec/php-parallel-lint/php-parallel-lint.phar"
35+ runHook postInstall
3236 '';
3337
3438 meta = with lib; {
pkgs/development/php-packages/phpcbf/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/phpcbf/phpcbf.phar
2122 makeWrapper ${php}/bin/php $out/bin/phpcbf \
2223 --add-flags "$out/libexec/phpcbf/phpcbf.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/phpcs/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/phpcs/phpcs.phar
2122 makeWrapper ${php}/bin/php $out/bin/phpcs \
2223 --add-flags "$out/libexec/phpcs/phpcs.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/phpmd/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/phpmd/phpmd.phar
2122 makeWrapper ${php}/bin/php $out/bin/phpmd \
2223 --add-flags "$out/libexec/phpmd/phpmd.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/phpstan/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/phpstan/phpstan.phar
2122 makeWrapper ${php}/bin/php $out/bin/phpstan \
2223 --add-flags "$out/libexec/phpstan/phpstan.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/psalm/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 install -D $src $out/libexec/psalm/psalm.phar
2122 makeWrapper ${php}/bin/php $out/bin/psalm \
2223 --add-flags "$out/libexec/psalm/psalm.phar"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/development/php-packages/psysh/default.nix+2
@@ -16,10 +16,12 @@ mkDerivation {
1616 nativeBuildInputs = [ makeWrapper ];
1717
1818 installPhase = ''
19+ runHook preInstall
1920 mkdir -p $out/bin
2021 tar -xzf $src -C $out/bin
2122 chmod +x $out/bin/psysh
2223 wrapProgram $out/bin/psysh --prefix PATH : "${lib.makeBinPath [ php ]}"
24+ runHook postInstall
2325 '';
2426
2527 meta = with lib; {
pkgs/top-level/php-packages.nix+2
@@ -144,6 +144,8 @@ lib.makeScope pkgs.newScope (self: with self; {
144144
145145 phing = callPackage ../development/php-packages/phing { };
146146
147+ phive = callPackage ../development/php-packages/phive { };
148+
147149 php-cs-fixer = callPackage ../development/php-packages/php-cs-fixer { };
148150
149151 php-parallel-lint = callPackage ../development/php-packages/php-parallel-lint { };