Unverified Commit 07e6929c authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

build-support/php: fix environment variables for Composer

parent 3bcaabbb
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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;
      };
+0 −7
Original line number Diff line number Diff line
@@ -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";
+0 −6
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ composerInstallInstallHook() {
    echo "Executing composerInstallInstallHook"

    setComposeRootVersion
    setComposeEnvVariables

    # Finally, run `composer install` to install the dependencies and generate
    # the autoloader.
+7 −0
Original line number Diff line number Diff line
@@ -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

Loading