Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 29 additions & 43 deletions pkgs/applications/editors/emacs/make-emacs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
gtk3-x11,
harfbuzz,
imagemagick,
jansson,
libXaw,
libXcursor,
libXft,
Expand Down Expand Up @@ -82,21 +81,20 @@
withGTK3 ? withPgtk && !noGui,
withGlibNetworking ? withPgtk || withGTK3 || (withX && withXwidgets),
withGpm ? stdenv.hostPlatform.isLinux,
withImageMagick ? lib.versionOlder version "27" && (withX || withNS),
# Emacs 30+ has native JSON support
withJansson ? lib.versionOlder version "30",
# https://github.com/emacs-mirror/emacs/blob/master/etc/NEWS.27#L140-L142
withImageMagick ? false,
withMailutils ? true,
withMotif ? false,
withNS ? stdenv.hostPlatform.isDarwin && !(variant == "macport" || noGui),
withPgtk ? false,
withSelinux ? stdenv.hostPlatform.isLinux,
withSQLite3 ? lib.versionAtLeast version "29",
withSQLite3 ? true,
withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd,
withToolkitScrollBars ? true,
withTreeSitter ? lib.versionAtLeast version "29",
withWebP ? lib.versionAtLeast version "29",
withTreeSitter ? true,
withWebP ? true,
withX ? !(stdenv.hostPlatform.isDarwin || noGui || withPgtk),
withXinput2 ? withX && lib.versionAtLeast version "29",
withXinput2 ? withX && true,
withXwidgets ?
!stdenv.hostPlatform.isDarwin
&& !noGui
Expand Down Expand Up @@ -143,6 +141,7 @@ assert noGui -> !(withX || withGTK3 || withNS || variant == "macport");
assert withAcl -> stdenv.hostPlatform.isLinux;
assert withAlsaLib -> stdenv.hostPlatform.isLinux;
assert withGpm -> stdenv.hostPlatform.isLinux;
assert withImageMagick -> (withX || withNS);
assert withNS -> stdenv.hostPlatform.isDarwin && !(withX || variant == "macport");
assert withPgtk -> withGTK3 && !withX;
assert withXwidgets -> !noGui && (withGTK3 || withPgtk);
Expand Down Expand Up @@ -183,39 +182,29 @@ mkDerivation (finalAttrs: {
patches =
patches fetchpatch
++ lib.optionals withNativeCompilation [
(replaceVars
(
if lib.versionOlder finalAttrs.version "29" then
./native-comp-driver-options-28.patch
else if lib.versionOlder finalAttrs.version "30" then
./native-comp-driver-options.patch
else
./native-comp-driver-options-30.patch
)
{
backendPath = (
lib.concatStringsSep " " (
builtins.map (x: ''"-B${x}"'') (
[
# Paths necessary so the JIT compiler finds its libraries:
"${lib.getLib libgccjit}/lib"
]
++ libGccJitLibraryPaths
++ [
# Executable paths necessary for compilation (ld, as):
"${lib.getBin stdenv.cc.cc}/bin"
"${lib.getBin stdenv.cc.bintools}/bin"
"${lib.getBin stdenv.cc.bintools.bintools}/bin"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# The linker needs to know where to find libSystem on Darwin.
"${apple-sdk.sdkroot}/usr/lib"
]
)
(replaceVars ./native-comp-driver-options-30.patch {
backendPath = (
lib.concatStringsSep " " (
builtins.map (x: ''"-B${x}"'') (
[
# Paths necessary so the JIT compiler finds its libraries:
"${lib.getLib libgccjit}/lib"
]
++ libGccJitLibraryPaths
++ [
# Executable paths necessary for compilation (ld, as):
"${lib.getBin stdenv.cc.cc}/bin"
"${lib.getBin stdenv.cc.bintools}/bin"
"${lib.getBin stdenv.cc.bintools.bintools}/bin"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# The linker needs to know where to find libSystem on Darwin.
"${apple-sdk.sdkroot}/usr/lib"
]
)
);
}
)
)
);
})
];

postPatch = lib.concatStringsSep "\n" [
Expand Down Expand Up @@ -283,9 +272,6 @@ mkDerivation (finalAttrs: {
gnutls
(lib.getDev harfbuzz)
]
++ lib.optionals withJansson [
jansson
]
++ [
libxml2
ncurses
Expand Down

This file was deleted.

19 changes: 0 additions & 19 deletions pkgs/applications/editors/emacs/native-comp-driver-options.patch

This file was deleted.