uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
36
pkgs/development/tools/rust/bindgen/wrapper.sh
Executable file
36
pkgs/development/tools/rust/bindgen/wrapper.sh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!@bash@/bin/bash
|
||||
sep='--' # whether to add -- before new options
|
||||
cxx=0 # whether cxx was explicitly requested
|
||||
lastWasx=0 # whether the last argument passed was -x
|
||||
for e in "$@"; do
|
||||
if [[ "$e" == "--" ]]; then
|
||||
sep=
|
||||
fi;
|
||||
if [[ "$sep" == "" ]]; then
|
||||
# we look for -x c++ after -- only
|
||||
if [[ "$e" == "-x" ]]; then
|
||||
lastWasx=1
|
||||
fi;
|
||||
if [[ $lastWasx -eq 1 && "$e" == "c++" ]]; then
|
||||
lastWasx=0
|
||||
cxx=1
|
||||
fi;
|
||||
if [[ "$e" == "-xc++" || "$e" == -std=c++* ]]; then
|
||||
cxx=1
|
||||
fi;
|
||||
fi;
|
||||
done;
|
||||
cxxflags=
|
||||
if [[ $cxx -eq 1 ]]; then
|
||||
cxxflags="@cxxincludes@"
|
||||
fi;
|
||||
if [[ -n "$NIX_DEBUG" ]]; then
|
||||
set -x;
|
||||
fi;
|
||||
export LIBCLANG_PATH="@libclang@/lib"
|
||||
# shellcheck disable=SC2086
|
||||
# cxxflags and NIX_CFLAGS_COMPILE should be word-split
|
||||
exec -a "$0" @unwrapped@/bin/bindgen "$@" $sep $cxxflags @cincludes@ $NIX_CFLAGS_COMPILE
|
||||
# note that we add the flags after $@ which is incorrect. This is only for the sake
|
||||
# of simplicity.
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue