summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-08-17 23:10:53 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-08-19 03:08:25 +0000
commit4cdad15f34e6321a2f789b99d42815b9142ac2ba (patch)
tree672eb400e5fd0c13f58d3a6b2f16d14fe32efe30
parentemacs29-macport: init at 29.1 (diff)
downloadnixpkgs-4cdad15f34e6321a2f789b99d42815b9142ac2ba.tar.gz
emacs: better glib-networking detection
Fixes https://github.com/NixOS/nixpkgs/issues/249756 (cherry picked from commit 6415fe87aa3fb20438e55bc865033463054dbab0)
-rw-r--r--pkgs/applications/editors/emacs/generic.nix29
1 files changed, 15 insertions, 14 deletions
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix
index 1ae3d5c79252..9da821de3f54 100644
--- a/pkgs/applications/editors/emacs/generic.nix
+++ b/pkgs/applications/editors/emacs/generic.nix
@@ -59,19 +59,6 @@
, webkitgtk
, wrapGAppsHook
-# macOS dependencies for NS and macPort
-, AppKit
-, Carbon
-, Cocoa
-, GSS
-, IOKit
-, ImageCaptureCore
-, ImageIO
-, OSAKit
-, Quartz
-, QuartzCore
-, WebKit
-
# Boolean flags
, nativeComp ? null
, withNativeCompilation ?
@@ -87,6 +74,7 @@
, withGTK2 ? false
, withGTK3 ? withPgtk && !noGui
, withGconf ? false
+, withGlibNetworking ? withPgtk || withGTK3 || (withX && withXwidgets)
, withGpm ? stdenv.isLinux
, withImageMagick ? lib.versionOlder version "27" && (withX || withNS)
, withMotif ? false
@@ -109,6 +97,19 @@
else if withMotif then "motif"
else if withAthena then "athena"
else "lucid")
+
+# macOS dependencies for NS and macPort
+, AppKit
+, Carbon
+, Cocoa
+, GSS
+, IOKit
+, ImageCaptureCore
+, ImageIO
+, OSAKit
+, Quartz
+, QuartzCore
+, WebKit
}:
assert (withGTK2 && !withNS && variant != "macport") -> withX;
@@ -244,7 +245,7 @@ mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation {
gtk3-x11
] ++ lib.optionals (withX && withMotif) [
motif
- ] ++ lib.optionals (withX && withXwidgets) [
+ ] ++ lib.optionals withGlibNetworking [
glib-networking
] ++ lib.optionals withNativeCompilation [
libgccjit