Inject own runtimePath to brew.sh

This commit is contained in:
Zhaofeng Li
2024-01-22 12:26:27 -07:00
parent 51ffd69941
commit 6049f4b25f
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ then
fi
# filter the user environment
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
PATH="@runtimePath@:/usr/bin:/bin:/usr/sbin:/sbin"
FILTERED_ENV=()
ENV_VAR_NAMES=(
+1
View File
@@ -134,6 +134,7 @@ let
src = template;
isExecutable = true;
inherit runtimePath;
inherit (prefix) prefix library;
};
+4 -1
View File
@@ -22,4 +22,7 @@ cat >"${brew_tail}" <<EOF
# nix-homebrew:
# Run scripts/update-brew-tail.sh to update this
EOF
sed -e '1,/^HOMEBREW_LIBRARY=/d' "${brew_upstream}" >>"${brew_tail}"
sed \
-e '1,/^HOMEBREW_LIBRARY=/d' \
-e 's/^PATH="/PATH="@runtimePath@:/' \
"${brew_upstream}" >>"${brew_tail}"