mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
build-support/php: fix environment variables for Composer
This commit is contained in:
parent
3bcaabbb71
commit
07e6929c81
@ -94,12 +94,6 @@ let
|
||||
or (if finalAttrs.composerRepository.composerLock == null then nix-update-script { } else null);
|
||||
};
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
};
|
||||
|
||||
meta = previousAttrs.meta or { } // {
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
@ -102,13 +102,6 @@ let
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "0";
|
||||
};
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo =
|
||||
if (finalAttrs ? vendorHash && finalAttrs.vendorHash != "") then null else "sha256";
|
||||
|
@ -149,12 +149,6 @@ let
|
||||
or (if finalAttrs.vendor.composerLock == null then nix-update-script { } else null);
|
||||
};
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
};
|
||||
|
||||
meta = previousAttrs.meta or composer.meta;
|
||||
};
|
||||
in
|
||||
|
@ -100,6 +100,7 @@ composerInstallInstallHook() {
|
||||
echo "Executing composerInstallInstallHook"
|
||||
|
||||
setComposeRootVersion
|
||||
setComposeEnvVariables
|
||||
|
||||
# Finally, run `composer install` to install the dependencies and generate
|
||||
# the autoloader.
|
||||
|
@ -13,6 +13,13 @@ setComposeRootVersion() {
|
||||
set -e
|
||||
}
|
||||
|
||||
setComposeEnvVariables() {
|
||||
echo -e "\e[32mSetting some required environment variables for Composer...\e[0m"
|
||||
export COMPOSER_MIRROR_PATH_REPOS=1
|
||||
export COMPOSER_CACHE_DIR=/dev/null
|
||||
export COMPOSER_HTACCESS_PROTECT=0
|
||||
}
|
||||
|
||||
checkComposerValidate() {
|
||||
setComposeRootVersion
|
||||
|
||||
|
@ -94,12 +94,6 @@ let
|
||||
or (if finalAttrs.composerVendor.composerLock == null then nix-update-script { } else null);
|
||||
};
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_DISABLE_NETWORK = "1";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
};
|
||||
|
||||
meta = previousAttrs.meta or { } // {
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
@ -87,13 +87,6 @@ let
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
env = {
|
||||
COMPOSER_CACHE_DIR = "/dev/null";
|
||||
COMPOSER_MIRROR_PATH_REPOS = "1";
|
||||
COMPOSER_HTACCESS_PROTECT = "0";
|
||||
COMPOSER_DISABLE_NETWORK = "0";
|
||||
};
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo =
|
||||
if (finalAttrs ? vendorHash && finalAttrs.vendorHash != "") then null else "sha256";
|
||||
|
@ -59,6 +59,8 @@ composerVendorConfigureHook() {
|
||||
composerVendorBuildHook() {
|
||||
echo "Executing composerVendorBuildHook"
|
||||
|
||||
setComposeEnvVariables
|
||||
|
||||
composer \
|
||||
`# The acpu-autoloader is not reproducible and has to be disabled.` \
|
||||
`# Upstream PR: https://github.com/composer/composer/pull/12090` \
|
||||
|
@ -13,6 +13,13 @@ setComposeRootVersion() {
|
||||
set -e
|
||||
}
|
||||
|
||||
setComposeEnvVariables() {
|
||||
echo -e "\e[32mSetting some required environment variables for Composer...\e[0m"
|
||||
export COMPOSER_MIRROR_PATH_REPOS=1
|
||||
export COMPOSER_CACHE_DIR=/dev/null
|
||||
export COMPOSER_HTACCESS_PROTECT=0
|
||||
}
|
||||
|
||||
checkComposerValidate() {
|
||||
if [ "1" == "${composerGlobal-}" ]; then
|
||||
global="global";
|
||||
|
Loading…
Reference in New Issue
Block a user