summary refs log tree commit diff
path: root/pkgs/development/tools/misc/cquery/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc/cquery/wrapper')
-rw-r--r--pkgs/development/tools/misc/cquery/wrapper12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/cquery/wrapper b/pkgs/development/tools/misc/cquery/wrapper
new file mode 100644
index 000000000000..f0bea41536d0
--- /dev/null
+++ b/pkgs/development/tools/misc/cquery/wrapper
@@ -0,0 +1,12 @@
+#! @shell@ -e
+
+initString="--init={\"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[@]}" "$@"