-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285828 from drupol/php/remove-COMPOSER-ROOT-VERSI…
…ON-env build-support/php: set `COMPOSER_ROOT_VERSION` environment variable
- Loading branch information
Showing
27 changed files
with
17,399 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
declare version | ||
|
||
setComposeRootVersion() { | ||
set +e # Disable exit on error | ||
|
||
if [[ -v version ]]; then | ||
echo -e "\e[32mSetting COMPOSER_ROOT_VERSION to $version\e[0m" | ||
export COMPOSER_ROOT_VERSION=$version | ||
fi | ||
|
||
set -e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,26 @@ | ||
{ mkDerivation, fetchurl, makeWrapper, installShellFiles, lib, php }: | ||
{ lib | ||
, fetchFromGitHub | ||
, php | ||
}: | ||
|
||
mkDerivation rec { | ||
php.buildComposerProject (finalAttrs: { | ||
pname = "deployer"; | ||
version = "6.8.0"; | ||
version = "7.3.3"; | ||
|
||
src = fetchurl { | ||
url = "https://deployer.org/releases/v${version}/${pname}.phar"; | ||
sha256 = "09mxwfa7yszsiljbkxpsd4sghqngl08cn18v4g1fbsxp3ib3kxi5"; | ||
src = fetchFromGitHub { | ||
owner = "deployphp"; | ||
repo = "deployer"; | ||
rev = "v${finalAttrs.version}^"; | ||
hash = "sha256-zvK7NwIACAhWN/7D8lVY1Bv8x6xKAp/L826SovQhDYg="; | ||
}; | ||
|
||
dontUnpack = true; | ||
vendorHash = "sha256-BDq2uryNWC31AEAEZJL9zGaAPbhXZ6hmfpsnr4wlixE="; | ||
|
||
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; | ||
meta = { | ||
description = "The PHP deployment tool with support for popular frameworks out of the box"; | ||
homepage = "https://deployer.org/"; | ||
license = lib.licenses.mit; | ||
mainProgram = "dep"; | ||
maintainers = with maintainers; teams.php.members; | ||
maintainers = lib.teams.php.members; | ||
}; | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,30 @@ | ||
{ lib | ||
, fetchFromGitHub | ||
, php | ||
, mkDerivation | ||
, fetchurl | ||
, makeWrapper | ||
}: | ||
let | ||
php' = php.withExtensions ({ enabled, all }: enabled ++ [ all.ast ]); | ||
in | ||
mkDerivation rec { | ||
|
||
(php.withExtensions({ enabled, all }: enabled ++ (with all; [ ast ]))).buildComposerProject (finalAttrs: { | ||
pname = "phan"; | ||
version = "5.4.3"; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/phan/phan/releases/download/${version}/phan.phar"; | ||
hash = "sha256-wZU6YIlH0q18iD044y6Z5gSscBn7cI0AwRwZgT/YhOo="; | ||
src = fetchFromGitHub { | ||
owner = "phan"; | ||
repo = "phan"; | ||
rev = finalAttrs.version; | ||
hash = "sha256-O0dtnDsz6X99B99VbRQf3Wr/xJfsJqd+2l5Z5iWxHyU="; | ||
}; | ||
|
||
dontUnpack = true; | ||
|
||
nativeBuildInputs = [ makeWrapper ]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin | ||
install -D $src $out/libexec/phan/phan.phar | ||
makeWrapper ${php'}/bin/php $out/bin/phan \ | ||
--add-flags "$out/libexec/phan/phan.phar" | ||
runHook postInstall | ||
''; | ||
vendorHash = "sha256-yE85MBseJa0VGV5EbjT0te4QT3697YvtumGkMMfZtxI="; | ||
|
||
meta = with lib; { | ||
meta = { | ||
description = "Static analyzer for PHP"; | ||
homepage = "https://github.com/phan/phan"; | ||
license = lib.licenses.mit; | ||
longDescription = '' | ||
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives | ||
and attempts to prove incorrectness rather than correctness. | ||
''; | ||
license = licenses.mit; | ||
homepage = "https://github.com/phan/phan"; | ||
maintainers = [ maintainers.apeschar ]; | ||
mainProgram = "phan"; | ||
maintainers = with lib.maintainers; [ apeschar ] ++ lib.teams.php.members; | ||
}; | ||
} | ||
}) |
Oops, something went wrong.