If I'm running an Emacs executable from emacsWithPackages as my main
programming environment, and I'm hacking on Emacs, or the Emacs
packaging in Nixpkgs, or whatever, I don't want the Emacs packages
from the wrapper to show up in the load path of that child Emacs. It
results in differing behaviour depending on whether the child Emacs is
run from Emacs or from, for example, an external terminal emulator,
which is very surprising.
To avoid this, pass another environment variable containing the
wrapper site-lisp path, and use that value to remove the corresponding
entry in EMACSLOADPATH, so it won't be propagated to child Emacsen.
siteVersionDir isn't a full path, it's just the name of the version
directory entry in $out/share/emacs, e.g. "27.1", so since
d1b0eef9b5 ("emacs: Don't use interpolation for version"), we've been
trying to remove a non-existent directory. This would have been
caught if we hadn't been giving -f to rm unnecessarily, because -f
suppresses errors. As well as fixing the path, I've removed the -f
from rm. Doing this to the line above as well revealed that rm-ing
$out/var was no longer necessary, since nothing has been put there
since ac23a7c459 ("emacs: 25.3 → 26.1") -- it would now only be
created if we set the --with-gameuser configure option, which we
don't.
Emacs 27 doesn't use ImageMagick by default to display images [1]:
** Emacs no longer defaults to using ImageMagick to display images.
This is due to security and stability concerns with ImageMagick. To
override the default, use 'configure --with-imagemagick'.
[1] https://github.com/emacs-mirror/emacs/blob/emacs-27.1/etc/NEWS#L96-L98
The given paths gives rise to errors such as,
```
x86_64-unknown-linux-gnu-gcc-9.3.0: fatal error: cannot execute ‘as’: execvp: No such file or directory
compilation terminated.
```
in the `*Async-native-compile-log*` buffer.
Fixes <https://github.com/nix-community/emacs-overlay/issues/69>
The -B flag to gcc (and libgccjit) allows us to specify where it can
find things it needs to correctly compile code (both programs and
libraries) without adjusting any environmental flags: So, no need to
wrap the program for a PATH entry containing binutils, and no need to
explicitly pass a linker path anymore.
The -B flag to gcc (and libgccjit) allows us to specify where it can
find things it needs to correctly compile code (both programs and
libraries) without adjusting any environmental flags: So, no need to
wrap the program for a PATH entry containing binutils, and no need to
explicitly pass a linker path anymore.
This way, we don't have to drag clang or binutils/binutils-wrapped
into the emacs closure, and can instead rely on using the correct one
for the platform we're running on.
Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
Since Darwin's linker does not understand LIBRARY_PATH, we have to set
the library path as explicit linker flags: This requires a very recent
feature/native-comp emacs revision, but it runs on Darwin and
correctly compiles files at runtime.
The latter doesn't exist on Darwin (and, presumably, other targets as
well). This change allows emacsGcc from emacs-overlay to attempt to
build where previously, the derivation would error out.
These are required for emacs 27 and above and the nix-community emacs
overlay are adding these via overrides.
Add these already on emacs 26 to be forwards compatible and require
less overrides in the overlay.
@the-kenny did a good job in the past and is set as maintainer in many package,
however since 2017-2018 he stopped contributing. To create less confusion
in pull requests when people try to request his feedback, I removed him as
maintainer from all packages.