nixpkgs/pkgs/build-support/setup-hooks
Kovacsics Robert 2c8c8f2961 wrapGAppsHook: don't add empty variables
Adding empty variables can lead to this problem:

```diff
 wrapProgram \
     ./pye_menu_shell \
     --prefix PATH : /nix/store/4c3z5r6yxsf2cxwwyazhdn92xixn4j5b-python3-3.7.5/bin:/nix/store/b3l3niilvqcxcsbxmd6sgqk1dy1rk81c-pye-menu-1.0/bin:/nix/store/y8j1cfj8d9r5rbbxc22w7hnfjw5f4fd3-cairo-1.16.0-dev/bin:/nix/store/6mg7lfbdh9pgx7pbxr3544qqbrigdl1q-freetype-2.10.1-dev/bin:/nix/store/gpszqcy0xi0lavbbjdq82zkkjp3jbp2a-bzip2-1.0.6.0.1-bin/bin:/nix/store/031c5pk5lzabgmpqpyd46hzi625as6bp-libpng-apng-1.6.37-dev/bin:/nix/store/f8kl7kmpv130aw9zm542p74a3hg0yc13-fontconfig-2.12.6-bin/bin:/nix/store/bqp30vkncmm222mjvwggz0s7p318sflj-expat-2.2.7-dev/bin:/nix/store/w57xa8g4s4aviwmqwgra7m5hwj2b005m-glib-2.60.7-dev/bin:/nix/store/v5d4966ahvfir2hwpv003022f3pb7vik-gettext-0.19.8.1/bin:/nix/store/qpvxhl1jr0fxnrx9idnpdagqs00m5m2z-glib-2.60.7/bin \
     --set PYTHONNOUSERSITE true \
     --set GDK_PIXBUF_MODULE_FILE /nix/store/7ddlakx6xjczqbfs80xjd14f30fzadws-gdk-pixbuf-2.38.1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
     --prefix XDG_DATA_DIRS : /nix/store/0snjc1qg89zqn3v35l9d55xrykh9nj5c-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10:/nix/store/b41z51vdv11n6df8ki5vj8dynxw98f9l-gsettings-desktop-schemas-3.32.0/share/gsettings-schemas/gsettings-desktop-schemas-3.32.0:/nix/store/0snjc1qg89zqn3v35l9d55xrykh9nj5c-gtk+3-3.24.10/share/gsettings-schemas/gtk+3-3.24.10 \
-     --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : \
+     --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "" \
     --prefix GI_TYPELIB_PATH : /nix/store/0snjc1qg89zqn3v35l9d55xrykh9nj5c-gtk+3-3.24.10/lib/girepository-1.0:/nix/store/z29l5xaaxh1s0697mcldj71ab0zshry1-librsvg-2.44.15/lib/girepository-1.0:/nix/store/pija1xzm7izxfb5m2hvhvlwp1l38ffxa-gobject-introspection-1.60.2/lib/girepository-1.0 \
-     --prefix GRL_PLUGIN_PATH :
+     --prefix GRL_PLUGIN_PATH : ""
```
Where the diff is to highlight the problem: we don't have a valid value
for GST_PLUGIN_SYSTEM_PATH_1_0 or GRL_PLUGIN_PATH, and instead of
passing the empy string, the empty string gets unquoted somewhere, so we
end up passing no arguments, thus the parser in wrapProgram takes
--prefix as the argument of GST_PLUGIN_SYSTEM_PATH_1_0, and then
GI_TYPELIB_PATH is missing it's --prefix so wrapProgram complains/dies.

The easiest change is to not add empty arguments to the wrapper
2019-12-10 17:19:10 +00:00
..
audit-tmpdir.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
auto-patchelf.sh treewide: Make still dont* Variables are optional in most cases 2019-11-01 14:44:44 -04:00
autoreconf.sh autoreconfHook: Simplify by avoiding findInputs 2017-09-14 13:16:12 -04:00
breakpoint-hook.sh breakpointHook: add for debugging failing builds 2018-10-25 10:19:41 +01:00
compress-man-pages.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
die.sh dieHook: Add die utility function 2017-08-08 00:17:56 -05:00
enable-coverage-instrumentation.sh
find-xml-catalogs.sh find-xml-catalogues: Ensure XML_CATALOG_FILES is defined 2019-11-01 14:44:44 -04:00
fix-darwin-dylib-names.sh gcj: fix build on Darwin 2019-01-30 18:19:17 +00:00
gog-unpack.sh build-support gogUnpackHook: support for unpacking games from gog.com 2018-02-12 22:28:06 +08:00
install-shell-files.sh installShellFiles: init (#65211) 2019-09-04 23:19:17 +02:00
keep-build-tree.sh
ld-is-cc-hook.sh ld-is-cc-hook: init 2017-12-19 01:45:42 +00:00
make-coverage-analysis-report.sh releaseTools.coverageAnalysis: Emit hydra-metrics 2015-07-30 18:06:33 +02:00
make-wrapper.sh makeWrapper: Remove unused extraFlagsArray feature 2019-09-25 09:23:09 -07:00
move-docs.sh move-docs.sh: Handle share/gtk-doc 2015-07-26 13:35:49 +02:00
move-lib64.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
move-sbin.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
multiple-outputs.sh multiple-outputs setup hook: Remove accidentally added tab 2019-11-04 19:51:04 -05:00
patch-shebangs.sh treewide: Make still dont* Variables are optional in most cases 2019-11-01 14:44:44 -04:00
prune-libtool-files.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
role.bash treewide: Use pkgs/build-support/roles.bash to remove copy pasta 2018-05-07 15:10:37 -04:00
separate-debug-info.sh misc setup-hooks: Use env vars to refer to binutils programs 2017-12-13 16:08:18 -05:00
set-java-classpath.sh java classpath hook: allow unbound $CLASSPATH 2019-11-24 23:30:05 -05:00
set-source-date-epoch-to-latest.sh set-source-date-epoch-to-latest: fix warning 2018-11-29 09:49:08 +01:00
setup-debug-info-dirs.sh treewide: Don't use envHook anymore 2017-12-30 22:04:22 -05:00
shorten-perl-shebang.sh add shortenPerlShebang function 2019-08-18 16:22:23 -07:00
strip.sh common setup hooks: set -u robustness 2019-11-01 14:44:43 -04:00
update-autotools-gnu-config-scripts.sh treewide: Make still dont* Variables are optional in most cases 2019-11-01 14:44:44 -04:00
use-old-cxx-abi.sh useOldCXXAbi: Change into a setup hook 2016-04-01 13:36:59 +02:00
win-dll-link.sh misc setup-hooks: Use env vars to refer to binutils programs 2017-12-13 16:08:18 -05:00
wrap-gapps-hook.sh wrapGAppsHook: don't add empty variables 2019-12-10 17:19:10 +00:00