anchor.diff:  { stdenv, lib, makeDesktopItem, makeWrapper, lndir, config
  -, replace, fetchurl, zip, unzip, jq, xdg-utils, writeText
  +, fetchurl, zip, unzip, jq, xdg-utils, writeText
   
   ## various stuff that can be plugged in
   , ffmpeg, xorg, alsa-lib, libpulseaudio, libcanberra-gtk3, libglvnd, libnotify, opensc
  
positive.code:             --set MOZ_ALLOW_DOWNGRADE 1 \
              --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
              --suffix XDG_DATA_DIRS : '${gnome.adwaita-icon-theme}/share' \
              ${lib.optionalString forceWayland ''
                --set MOZ_ENABLE_WAYLAND "1" \
              ''}
          #############################
          #                           #
          #   END EXTRA PREF CHANGES  #
  
negative.code:         done
  
          # fix links and absolute references
  
          find . -type l -print0 | while read -d $'\0' l; do
            target="$(readlink "$l")"
            target=''${target/#"${browser}"/"$out"}
            ln -sfT "$target" "$out/$l"
          done
  
          # create the wrapper
  
          executablePrefix="$out/bin"
          executablePath="$executablePrefix/${applicationName}"
          oldWrapperArgs=()
  
          if [[ -L $executablePath ]]; then
            # Symbolic link: wrap the link's target.
            oldExe="$(readlink -v --canonicalize-existing "$executablePath")"
            rm "$executablePath"
          elif wrapperCmd=$(strings -dw "$executablePath" | sed -n '/^makeCWrapper/,/^$/ p'); [[ $wrapperCmd ]]; then
            # If the executable is a binary wrapper, we need to update its target to
            # point to $out, but we can't just edit the binary in-place because of length
            # issues. So we extract the command used to create the wrapper and add the
            # arguments to our wrapper.
            parseMakeCWrapperCall() {
              shift # makeCWrapper
              oldExe=$1; shift
              for arg do case $arg in
                --inherit-argv0) oldWrapperArgs+=(--argv0 '$0');; # makeWrapper doesn't understand --inherit-argv0
                *) oldWrapperArgs+=("$arg");;
              esac done
            }
            eval "parseMakeCWrapperCall ''${wrapperCmd//"${browser}"/"$out"}"
            rm "$executablePath"
          else
            if read -rn2 shebang < "$executablePath" && [[ $shebang == '#!' ]]; then
              # Shell wrapper: patch in place to point to $out.
              sed -i "s@${browser}@$out@g" "$executablePath"
            fi
            # Suffix the executable with -old, because -wrapped might already be used by the old wrapper.
            oldExe="$executablePrefix/.${applicationName}"-old
            mv "$executablePath" "$oldExe"
          fi
  
          makeWrapper "$oldExe" \
            "''${executablePath}${nameSuffix}" \
              --prefix LD_LIBRARY_PATH ':' "$libs" \
              --suffix-each GTK_PATH ':' "$gtk_modules" \
              --prefix PATH ':' "${xdg-utils}/bin" \
  