Unverified Commit 568bfef5 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

build-support/php: fix environment variables for Composer (#343900)

parents 79d3272c 95f5cf75
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
+4 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ composerInstallConfigureHook() {
    fi

    if [[ ! -f "composer.lock" ]]; then
        setComposeRootVersion
        setComposerRootVersion

        composer \
            --no-install \
@@ -79,7 +79,7 @@ composerInstallConfigureHook() {
composerInstallBuildHook() {
    echo "Executing composerInstallBuildHook"

    setComposeRootVersion
    setComposerRootVersion

    # Since this file cannot be generated in the composer-repository-hook.sh
    # because the file contains hardcoded nix store paths, we generate it here.
@@ -99,7 +99,8 @@ composerInstallCheckHook() {
composerInstallInstallHook() {
    echo "Executing composerInstallInstallHook"

    setComposeRootVersion
    setComposerRootVersion
    setComposerEnvVariables

    # Finally, run `composer install` to install the dependencies and generate
    # the autoloader.
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ composerRepositoryConfigureHook() {
    fi

    if [[ ! -f "composer.lock" ]]; then
        setComposeRootVersion
        setComposerRootVersion

        composer \
            --no-install \
@@ -58,7 +58,7 @@ composerRepositoryBuildHook() {

    mkdir -p repository

    setComposeRootVersion
    setComposerRootVersion

    # Build the local composer repository
    # The command 'build-local-repo' is provided by the Composer plugin
Loading