From 3fdb75bce34486b2f25ff0208c6498ce85a8d41d Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 5 May 2024 18:45:52 +0200 Subject: [PATCH] build-support/php: move environment variables under `env` attribute (cherry picked from commit b5855e4e666231507bdde8982190d5e0486f4c47) --- pkgs/build-support/php/build-composer-project.nix | 8 +++++--- pkgs/build-support/php/build-composer-repository.nix | 10 ++++++---- .../php/pkgs/composer-local-repo-plugin.nix | 10 ++++++---- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/pkgs/build-support/php/build-composer-project.nix b/pkgs/build-support/php/build-composer-project.nix index 9d5e57e8c482..0fc958a874e9 100644 --- a/pkgs/build-support/php/build-composer-project.nix +++ b/pkgs/build-support/php/build-composer-project.nix @@ -79,9 +79,11 @@ let composerStrictValidation = previousAttrs.composerStrictValidation or true; }; - COMPOSER_CACHE_DIR="/dev/null"; - COMPOSER_DISABLE_NETWORK="1"; - COMPOSER_MIRROR_PATH_REPOS="1"; + env = { + COMPOSER_CACHE_DIR = "/dev/null"; + COMPOSER_DISABLE_NETWORK = "1"; + COMPOSER_MIRROR_PATH_REPOS = "1"; + }; meta = previousAttrs.meta or { } // { platforms = lib.platforms.all; diff --git a/pkgs/build-support/php/build-composer-repository.nix b/pkgs/build-support/php/build-composer-repository.nix index 2f6595eab6fb..38e8510629d7 100644 --- a/pkgs/build-support/php/build-composer-repository.nix +++ b/pkgs/build-support/php/build-composer-repository.nix @@ -89,10 +89,12 @@ let runHook postInstallCheck ''; - COMPOSER_CACHE_DIR = "/dev/null"; - COMPOSER_MIRROR_PATH_REPOS = "1"; - COMPOSER_HTACCESS_PROTECT = "0"; - COMPOSER_DISABLE_NETWORK = "0"; + 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"; diff --git a/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix b/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix index bfdc3d4f98d1..21be0c83e8fa 100644 --- a/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix +++ b/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix @@ -38,10 +38,12 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-edbn07r/Uc1g0qOuVBZBs6N1bMN5kIfA1b4FCufdw5M="; }; - COMPOSER_CACHE_DIR = "/dev/null"; - COMPOSER_MIRROR_PATH_REPOS = "1"; - COMPOSER_HTACCESS_PROTECT = "0"; - COMPOSER_DISABLE_NETWORK = "1"; + env = { + COMPOSER_CACHE_DIR = "/dev/null"; + COMPOSER_MIRROR_PATH_REPOS = "1"; + COMPOSER_HTACCESS_PROTECT = "0"; + COMPOSER_DISABLE_NETWORK = "1"; + }; nativeBuildInputs = [ makeBinaryWrapper