Commit graph

28 commits

Author SHA1 Message Date
Mauricio Collares 67bbabc0a4 emacs: adapt to renamed native-comp variables 2021-05-06 16:47:21 -03:00
adisbladis c801ffd4a3
emacs: Use --with-native-compilation instead of --with-nativecomp
Upstream changed this parameter name in https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=feature/native-comp&id=42fc752a14b23be95f02b598930f13a96883d3a0
2021-02-26 23:31:27 +02:00
adisbladis 44131d7fc3
emacs: Remove clean-env patch and use substituteInPlace
This approach applies to _all_ RUN_TEMACS calls and successfully removes -dev paths from the closure and reduces the closure size from ~1.4G to just under ~464M.

It's also less brittle than having in-tree patches.
2021-02-25 12:40:37 +02:00
Mauricio Collares 4d60e14ad2 emacs: precompile trampolines in parallel 2021-02-19 19:35:07 -03:00
Mauricio Collares 2ff98c2f17
emacs: precompile all trampolines 2021-02-19 11:41:29 +01:00
Alyssa Ross 7eaa07dd3f
emacs: add withMotif option
Why not? ;)
2021-02-12 12:59:52 +00:00
Jonathan Ringer 9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
adisbladis 6347f78fd9
emacsPackages*: Move to emacs*.pkgs
This makes it much easier to create customisations around emacs via
the a new convenience passthru attr:
- `emacs.pkgs`: What used to be emacsPackages is now `emacs.pkgs`

The previous versioned names `emacs*Packages` have been moved to
aliases.nix and are now considered deprecated in favour of `emacs*.pkgs`.
2021-01-13 17:04:55 +01:00
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00
Tad Fisher a7cb8e36ac
emacs: Add comp-eln-load-path infrastructure 2020-12-16 19:45:07 +01:00
Alyssa Ross 755670f5e4
emacs: fix siteVersionDir path
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.
2020-12-10 12:19:14 +00:00
Matt Jones 571b17de5e
emacs: Link native-lisp directory into Mac app (#103933)
Without the symlink, the application can't be launched.

Fixes <https://github.com/nix-community/emacs-overlay/issues/71>

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
2020-12-03 11:41:46 -05:00
Michael Raskin eee54dba79
Merge pull request #103913 from catern/copysrc
emacs: properly include source code when withCsrc is true
2020-11-22 16:37:40 +00:00
Spencer Baugh e4fcc9aed1 emacs: properly include source code when withCsrc is true
Previously, we just copied it into a separate directory in the build
directory. That's not useful, and not what was intended.
2020-11-15 10:59:19 -05:00
Mario Rodas ed047f80bf emacs: make ImageMagick dependency optional in Emacs≥27
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
2020-10-31 04:20:00 +00:00
adisbladis 14154fea52
Revert "emacs: Remove references from emacs.pdmp"
This reverts commit 8e13d34944.

It turns out this breaks the build of emacsGit from the nix-community overlay.
2020-10-06 01:14:24 +02:00
Eelco Dolstra 8e13d34944 emacs: Remove references from emacs.pdmp
This reduces the Emacs closure size from 1324 MiB to 424 MiB.

Fixes #98755.
2020-10-01 09:53:02 +02:00
Anthony Cowley 30313a797d emacs: fix paths for native compilation
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>
2020-09-24 14:54:36 -04:00
Frederik Rietdijk af81d39b87 Merge staging-next into staging 2020-09-04 20:03:30 +02:00
Damien Cassou 556b29dd3e
emacs: Add missing patches to the Emacs derivations
patches were removed by a recent refactoring of Emacs packages:

  967259e6b4 * emacs: Factor out expression to a generic build
2020-09-03 17:10:32 +02:00
Andreas Fuchs 04fffd6cae emacs: use -B flags for native compilation dependencies
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.
2020-09-01 22:58:27 -04:00
Andreas Fuchs 6ad323d0a0 emacs: use -B flags for native compilation dependencies
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.
2020-08-31 00:47:33 -04:00
Andreas Fuchs 3384837123 emacs: Use stdenv's bintools instead of clang
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>
2020-08-30 10:58:50 -04:00
Andreas Fuchs ad7a3fb3f6 emacs: Use stdenv.cc.libc instead of plain .libc
This is the portable way to address the system-appropriate libc,
better than conditionalizing by (darwin/GNU) system or using either
one.
2020-08-29 23:10:38 -04:00
Andreas Fuchs a891ae41b3 emacs: Set native-comp library path as linker flags instead
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.
2020-08-29 23:10:38 -04:00
Andreas Fuchs 861f27018d emacs: Fix paths to bintools on Darwin
This changes PATH such that the correct linker can be found to
construct .eln files at runtime.
2020-08-29 23:10:38 -04:00
Andreas Fuchs 0d15ea9500 emacs: Use stdenv.libc instead of .glibc
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.
2020-08-25 08:12:35 -04:00
adisbladis 967259e6b4
emacs: Factor out expression to a generic build 2020-08-21 00:54:00 +02:00
Renamed from pkgs/applications/editors/emacs/default.nix (Browse further)