mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 19:44:09 +00:00
parent
081ac25dc6
commit
1ad1edbb32
@ -23,7 +23,7 @@ getVersion=0
|
|||||||
nonFlagArgs=0
|
nonFlagArgs=0
|
||||||
[[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0
|
[[ "@prog@" = *++ ]] && isCpp=1 || isCpp=0
|
||||||
|
|
||||||
params=("$@")
|
expandResponseParams "$@"
|
||||||
n=0
|
n=0
|
||||||
while [ $n -lt ${#params[*]} ]; do
|
while [ $n -lt ${#params[*]} ]; do
|
||||||
p=${params[n]}
|
p=${params[n]}
|
||||||
|
@ -16,7 +16,7 @@ source @out@/nix-support/utils.sh
|
|||||||
|
|
||||||
|
|
||||||
# Optionally filter out paths not refering to the store.
|
# Optionally filter out paths not refering to the store.
|
||||||
params=("$@")
|
expandResponseParams "$@"
|
||||||
if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" \
|
if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" \
|
||||||
-a \( -z "$NIX_IGNORE_LD_THROUGH_GCC" -o -z "$NIX_LDFLAGS_SET" \) ]; then
|
-a \( -z "$NIX_IGNORE_LD_THROUGH_GCC" -o -z "$NIX_LDFLAGS_SET" \) ]; then
|
||||||
rest=()
|
rest=()
|
||||||
|
@ -22,3 +22,27 @@ badPath() {
|
|||||||
"${p:0:4}" != "/tmp" -a \
|
"${p:0:4}" != "/tmp" -a \
|
||||||
"${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
|
"${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expandResponseParams() {
|
||||||
|
local inparams=("$@")
|
||||||
|
local n=0
|
||||||
|
local p
|
||||||
|
params=()
|
||||||
|
while [ $n -lt ${#inparams[*]} ]; do
|
||||||
|
p=${inparams[n]}
|
||||||
|
case $p in
|
||||||
|
@*)
|
||||||
|
if [ -e "${p:1}" ]; then
|
||||||
|
args=$(<"${p:1}")
|
||||||
|
eval 'for arg in '$args'; do params+=("$arg"); done'
|
||||||
|
else
|
||||||
|
params+=("$p")
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
params+=("$p")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
n=$((n + 1))
|
||||||
|
done
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user