forked from mirrors/nixpkgs
78e8173e57
This also extends the wrapper to explicitly set the cache directory, since it is required for every invokation with the `--init` option.
13 lines
378 B
Plaintext
13 lines
378 B
Plaintext
#! @shell@ -e
|
|
|
|
initString="--init={\"cacheDirectory\": \"/tmp/cquery\", \"extraClangArguments\": [@standard_library_includes@"
|
|
|
|
if [ "${NIX_CFLAGS_COMPILE}" != "" ]; then
|
|
read -a cflags_array <<< ${NIX_CFLAGS_COMPILE}
|
|
initString+=$(printf ', \"%s\"' "${cflags_array[@]}")
|
|
fi
|
|
|
|
initString+="]}"
|
|
|
|
exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "${extraFlagsArray[@]}" "$@"
|