<commit_before>gappsWrapperArgs=()

find_gio_modules() {
    if [ -d "$1"/lib/gio/modules ] && [ -n "$(ls -A $1/lib/gio/modules)" ] ; then
        gappsWrapperArgs+=(--prefix GIO_EXTRA_MODULES : "$1/lib/gio/modules")
    fi
}

addEnvHooks "$targetOffset" find_gio_modules

# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
wrapGAppsHook() {
  # guard against running multiple times (e.g. due to propagation)
  [ -z "$wrapGAppsHookHasRun" ] || return 0
  wrapGAppsHookHasRun=1

  if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then
    gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
  fi

  if [ -n "$XDG_ICON_DIRS" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS")
  fi

  if [ -n "$GSETTINGS_SCHEMAS_PATH" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH")
  fi

  if [ -d "$prefix/share" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$prefix/share")
  fi

  for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do
    eval local dummy="\$$v"
    gappsWrapperArgs+=(--prefix $v : "$dummy")
  done

  if [[ -z "$dontWrapGApps" ]]; then
    targetDirsThatExist=()
    targetDirsRealPath=()
<commit_msg>wrapGAppsHook: add package’s own modules to GIO_EXTRA_MODULES<commit_after>gappsWrapperArgs=()

find_gio_modules() {
    if [ -d "$1"/lib/gio/modules ] && [ -n "$(ls -A $1/lib/gio/modules)" ] ; then
        gappsWrapperArgs+=(--prefix GIO_EXTRA_MODULES : "$1/lib/gio/modules")
    fi
}

addEnvHooks "$targetOffset" find_gio_modules

# Note: $gappsWrapperArgs still gets defined even if $dontWrapGApps is set.
wrapGAppsHook() {
  # guard against running multiple times (e.g. due to propagation)
  [ -z "$wrapGAppsHookHasRun" ] || return 0
  wrapGAppsHookHasRun=1

  if [ -n "$GDK_PIXBUF_MODULE_FILE" ]; then
    gappsWrapperArgs+=(--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE")
  fi

  if [ -n "$XDG_ICON_DIRS" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS")
  fi

  if [ -n "$GSETTINGS_SCHEMAS_PATH" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH")
  fi

  if [ -d "$prefix/share" ]; then
    gappsWrapperArgs+=(--prefix XDG_DATA_DIRS : "$prefix/share")
  fi

  if [ -d "$prefix/lib/gio/modules" ] && [ -n "$(ls -A $prefix/lib/gio/modules)" ] ; then
    gappsWrapperArgs+=(--prefix GIO_EXTRA_MODULES : "$prefix/lib/gio/modules")
  fi

  for v in $wrapPrefixVariables GST_PLUGIN_SYSTEM_PATH_1_0 GI_TYPELIB_PATH GRL_PLUGIN_PATH; do
    eval local dummy="\$$v"
    gappsWrapperArgs+=(--prefix $v : "$dummy")
  done

  if [[ -z "$dontWrapGApps" ]]; then
    targetDirsThatExist=()
    targetDirsRealPath=()

{'fraction_non_alphanumeric': 0.14406468210216833, 'fraction_numerical': 0.005145167217934583, 'mean_word_length': 4.050092764378479, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '523095', 'n_tokens_mistral': 1094, 'n_tokens_neox': 1063, 'n_words': 208}