Change:
The file generated by the Emacs wrapper is redundant because the autoload definitions are already processed by the builtin : the is loaded after with the command line option , but loads the package autoloads before . We can understand this better by considering a few scenarios. If we start Emacs with disabled, then the autoloads will not be available in because is not loaded until later: If we modify the wrapper as in so that is not loaded, the autoloads will still be found as long as is enabled: is enough on its own to handle autoloads for the Emacs wrapper. Therefore, I propose to remove in favor of the builtin Emacs functionality.
Somehow, removing this broke from emacs-overlay. I have to manually run or anything depending on autoloaded tramp functions errors out with "no such function". I do disable as my site-lisp directory is managed by Nix. Is this configuration no longer recommended/supported? Is there a way to just engage 's autoload mechanism without allowing it to access the network or install packages?
I also fully disable since all of my emacs packages are installed via nix and noticed this change broke things for me. I'm interested in this as well. Edit: Maybe this:

Discussion:
''} } <del> siteAutoloads="$out/share/emacs/site-lisp/nix-generated-autoload.el" touch $siteAutoloads </del> # Iterate over the array of inputs (avoiding nix's own interpolation) for pkg in "''${requires[@]}"; do linkEmacsPackage $pkg <del> find $pkg -name "*-autoloads.el"  -exec echo (load "{}" 'noerror 'nomessage) ; >> $siteAutoloads </del> done <del> echo "(provide 'nix-generated-autoload)" >> $siteAutoloads </del> siteStart="$out/share/emacs/site-lisp/site-start.el" siteStartByteCompiled="$siteStart"c

> "$subdirs" # Byte-compiling improves start-up time only slightly, but costs nothing. <del> $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs" "$siteAutoloads" </del> <ins> $emacs/bin/emacs --batch -f batch-byte-compile "$siteStart" "$subdirs" </ins> ${optionalString nativeComp '' $emacs/bin/emacs --batch  --eval "(add-to-list 'native-comp-eln-load-path "$out/share/emacs/native-lisp/")"  <del> -f batch-native-compile "$siteStart" "$subdirs" "$siteAutoloads" </del> <ins> -f batch-native-compile "$siteStart" "$subdirs" </ins> ''} '';

# Wrap emacs and friends so they find our site-start.el before the original. for prog in $emacs/bin/*; do # */ local progname=$(basename "$prog") <del> local autoloadExpression="" </del> rm -f "$out/bin/$progname" <del> if [[ $progname == emacs ]]; then # progs other than "emacs" do not understand the `-l` switches autoloadExpression="-l cl-loaddefs -l nix-generated-autoload" fi </del> substitute ${./wrapper.sh} $out/bin/$progname  --subst-var-by bash ${emacs.stdenv.shell}  --subst-var-by wrapperSiteLisp "$deps/share/emacs/site-lisp"  --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp:"  <del> --subst-var autoloadExpression  </del> --subst-var prog chmod +x $out/bin/$progname done

--subst-var-by bash ${emacs.stdenv.shell}  --subst-var-by wrapperSiteLisp "$deps/share/emacs/site-lisp"  --subst-var-by wrapperSiteLispNative "$deps/share/emacs/native-lisp:"  <del> --subst-var-by autoloadExpression "-l cl-loaddefs -l nix-generated-autoload"  </del> --subst-var-by prog "$emacs/Applications/Emacs.app/Contents/MacOS/Emacs" chmod +x $out/Applications/Emacs.app/Contents/MacOS/Emacs fi

export EMACSNATIVELOADPATH="${newNativeLoadPath[*]}" export emacsWithPackages_siteLispNative=@wrapperSiteLispNative@ <del> exec @prog@ @autoloadExpression@ "$@" </del> <ins> exec @prog@ "$@" </ins>