diff options
author | Brian Leung <leungbk@posteo.net> | 2022-09-05 03:05:30 -0700 |
---|---|---|
committer | Brian Leung <leungbk@posteo.net> | 2022-09-05 16:39:01 -0700 |
commit | 6d0e82f11aeaef74f8f9adcf18c1c77df8c8e2c6 (patch) | |
tree | 96455928d16cb323542023d253c4b5767eef6bbe | |
parent | 24b025c6153bef547295d0db084d80c6d62d5baf (diff) |
emacs: use withPgtk option more
- do not require X when withPgtk is true
- make default settings and boolean logic consistent with withPgtk setting
-rw-r--r-- | pkgs/applications/editors/emacs/generic.nix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 6a1f199461ac..34853b890417 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -15,10 +15,10 @@ , libgccjit, targetPlatform, makeWrapper # native-comp params , fetchFromSavannah , systemd ? null -, withX ? !stdenv.isDarwin +, withX ? !stdenv.isDarwin && !withPgtk , withNS ? stdenv.isDarwin , withGTK2 ? false, gtk2-x11 ? null -, withGTK3 ? false, gtk3-x11 ? null, gsettings-desktop-schemas ? null +, withGTK3 ? withPgtk, gtk3-x11 ? null, gsettings-desktop-schemas ? null , withXwidgets ? false, webkitgtk ? null, wrapGAppsHook ? null, glib-networking ? null , withMotif ? false, motif ? null , withSQLite3 ? false @@ -29,7 +29,7 @@ , nativeComp ? true , withAthena ? false , withToolkitScrollBars ? true -, withPgtk ? false +, withPgtk ? false, gtk3 ? null , withXinput2 ? withX && lib.versionAtLeast version "29" , withImageMagick ? lib.versionOlder version "27" && (withX || withNS) , toolkit ? ( @@ -45,9 +45,10 @@ assert stdenv.isDarwin -> libXaw != null; # fails to link otherwise assert withNS -> !withX; assert withNS -> stdenv.isDarwin; assert (withGTK2 && !withNS) -> withX; -assert (withGTK3 && !withNS) -> withX; -assert withGTK2 -> !withGTK3 && gtk2-x11 != null; -assert withGTK3 -> !withGTK2 && gtk3-x11 != null; +assert (withGTK3 && !withNS) -> withX || withPgtk; +assert withGTK2 -> !withGTK3 && gtk2-x11 != null && !withPgtk; +assert withGTK3 -> !withGTK2 && ((gtk3-x11 != null) || withPgtk); +assert withPgtk -> withGTK3 && !withX && gtk3 != null; assert withXwidgets -> withGTK3 && webkitgtk != null; @@ -134,7 +135,9 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp { ++ lib.optionals withImageMagick [ imagemagick ] ++ lib.optionals (stdenv.isLinux && withX) [ m17n_lib libotf ] ++ lib.optional (withX && withGTK2) gtk2-x11 - ++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ] + ++ lib.optional (withX && withGTK3) gtk3-x11 + ++ lib.optional withGTK3 gsettings-desktop-schemas + ++ lib.optional withPgtk gtk3 ++ lib.optional (withX && withMotif) motif ++ lib.optional withSQLite3 sqlite ++ lib.optional withWebP libwebp |