diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2020-10-31 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2020-10-31 04:20:00 +0000 |
commit | ed047f80bf36cf6c53239bc9b840959188f8ebd7 (patch) | |
tree | 91162b5e09bd508c0ca37002de0a3b0359fa7cfd /pkgs/applications/editors/emacs | |
parent | 76165535700f917ecb057092e0bbe0e1391ad2a3 (diff) |
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
Diffstat (limited to 'pkgs/applications/editors/emacs')
-rw-r--r-- | pkgs/applications/editors/emacs/generic.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index f2904f3e012b..2de45d03dd6a 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -22,6 +22,7 @@ , srcRepo ? false, autoreconfHook ? null, texinfo ? null , siteStart ? ./site-start.el , nativeComp ? false +, withImageMagick ? lib.versionOlder version "27" && (withX || withNS) , toolkit ? ( if withGTK2 then "gtk2" else if withGTK3 then "gtk3" @@ -101,7 +102,8 @@ in stdenv.mkDerivation { ++ lib.optionals withX [ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff libXft gconf cairo ] - ++ lib.optionals (withX || withNS) [ imagemagick librsvg ] + ++ lib.optionals (withX || withNS) [ librsvg ] + ++ 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 ] @@ -126,6 +128,7 @@ in stdenv.mkDerivation { "--with-gif=no" "--with-tiff=no" ]) ++ lib.optional withXwidgets "--with-xwidgets" ++ lib.optional nativeComp "--with-nativecomp" + ++ lib.optional withImageMagick "--with-imagemagick" ; installTargets = [ "tags" "install" ]; |