about summary refs log tree commit diff
path: root/pkgs/build-support/substitute/substitute.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/substitute/substitute.sh')
-rw-r--r--pkgs/build-support/substitute/substitute.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/build-support/substitute/substitute.sh b/pkgs/build-support/substitute/substitute.sh
index dbac275a80ed..d50a82446639 100644
--- a/pkgs/build-support/substitute/substitute.sh
+++ b/pkgs/build-support/substitute/substitute.sh
@@ -8,7 +8,13 @@ if test -n "$dir"; then
     mkdir -p $out/$dir
 fi
 
-substitute $src $target $replacements
+substitutionsList=($replacements)
+
+if [[ -v substitutions ]]; then
+    eval "substitutionsList+=($substitutions)"
+fi
+
+substitute $src $target "${substitutionsList[@]}"
 
 if test -n "$isExecutable"; then
     chmod +x $target