From 385d523a8e578dbd046b2345c8b034ddc164e12d Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Tue, 3 Sep 2024 04:14:28 +0800 Subject: [PATCH] treewide: handle preInstallPhases __structuredAttrs-agnostically Always specify the preInstallPhases attribute as a list instead of a string. Append elements to the preInstallPhases Bash variable using appendToVar instead of string or Bash array concatenation. --- pkgs/desktops/gnustep/make/setup-hook.sh | 2 +- .../interpreters/python/hooks/python-runtime-deps-check-hook.sh | 2 +- pkgs/development/libraries/glib/setup-hook.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/desktops/gnustep/make/setup-hook.sh b/pkgs/desktops/gnustep/make/setup-hook.sh index 0bfbd35f45f5..202084cc671d 100644 --- a/pkgs/desktops/gnustep/make/setup-hook.sh +++ b/pkgs/desktops/gnustep/make/setup-hook.sh @@ -18,7 +18,7 @@ addGnustepInstallFlags() { ) } -preInstallPhases+=" addGnustepInstallFlags" +appendToVar preInstallPhases addGnustepInstallFlags addGNUstepEnvVars() { local filename diff --git a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.sh b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.sh index 43a2f9b88745..dc888262ea0d 100644 --- a/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.sh @@ -16,5 +16,5 @@ pythonRuntimeDepsCheckHook() { if [ -z "${dontCheckRuntimeDeps-}" ]; then echo "Using pythonRuntimeDepsCheckHook" - preInstallPhases+=" pythonRuntimeDepsCheckHook" + appendToVar preInstallPhases pythonRuntimeDepsCheckHook fi diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index 8ead5510ec4f..9eabf8a679a9 100644 --- a/pkgs/development/libraries/glib/setup-hook.sh +++ b/pkgs/development/libraries/glib/setup-hook.sh @@ -12,7 +12,7 @@ addEnvHooks "$targetOffset" make_glib_find_gsettings_schemas glibPreInstallPhase() { makeFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/") } -preInstallPhases+=" glibPreInstallPhase" +appendToVar preInstallPhases glibPreInstallPhase glibPreFixupPhase() { # Move gschemas in case the install flag didn't help