Skip to content

Commit

Permalink
emacs: make cairo optional (NixOS#375289)
Browse files Browse the repository at this point in the history
  • Loading branch information
jian-lin authored Jan 22, 2025
2 parents 7450648 + 4fc79e6 commit f06293e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkgs/applications/editors/emacs/make-emacs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
jansson,
libXaw,
libXcursor,
libXft,
libXi,
libXpm,
libgccjit,
Expand Down Expand Up @@ -69,6 +70,7 @@
withAcl ? false,
withAlsaLib ? false,
withAthena ? false,
withCairo ? withX,
withCsrc ? true,
withDbus ? stdenv.hostPlatform.isLinux,
withGTK3 ? withPgtk && !noGui,
Expand Down Expand Up @@ -333,7 +335,6 @@ mkDerivation (finalAttrs: {
]
++ lib.optionals withX [
Xaw3d
cairo
giflib
libXaw
libXpm
Expand All @@ -342,6 +343,12 @@ mkDerivation (finalAttrs: {
librsvg
libtiff
]
++ lib.optionals withCairo [
cairo
]
++ lib.optionals (withX && !withCairo) [
libXft
]
++ lib.optionals withXinput2 [
libXi
]
Expand Down Expand Up @@ -396,8 +403,8 @@ mkDerivation (finalAttrs: {
else if withX then
[
(lib.withFeatureAs true "x-toolkit" toolkit)
(lib.withFeature true "cairo")
(lib.withFeature true "xft")
(lib.withFeature withCairo "cairo")
(lib.withFeature (!withCairo) "xft")
]
else if withPgtk then
[
Expand Down

0 comments on commit f06293e

Please sign in to comment.