From b5855e4e666231507bdde8982190d5e0486f4c47 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 --- 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 92d9cf9f633f..4a8a94591cc0 100644 --- a/pkgs/build-support/php/build-composer-project.nix +++ b/pkgs/build-support/php/build-composer-project.nix @@ -89,9 +89,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 6edaf513bad0..03ac2ac7d5f9 100644 --- a/pkgs/build-support/php/build-composer-repository.nix +++ b/pkgs/build-support/php/build-composer-repository.nix @@ -106,10 +106,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 = 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 5351a3e51f4d..601640b6f0bb 100644 --- a/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix +++ b/pkgs/build-support/php/pkgs/composer-local-repo-plugin.nix @@ -43,10 +43,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 ];