From 13cdb0775b87afce1a70d95f75200cb1cdac2751 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 16 Sep 2024 09:42:12 +0800 Subject: [PATCH] emacsPackages.eglot: only build info manual when needed --- .../elisp-packages/elpa-common-overrides.nix | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-common-overrides.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-common-overrides.nix index 1b33f0455316..56cdd8ad733e 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-common-overrides.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-common-overrides.nix @@ -54,19 +54,21 @@ in } ); - # TODO delete this when we get upstream fix https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73241 - eglot = super.eglot.overrideAttrs (old: { - postInstall = - old.postInstall or "" - + '' - local info_file=eglot.info - pushd $out/share/emacs/site-lisp/elpa/eglot-* - # specify output info file to override the one defined in eglot.texi - makeinfo --output=$info_file eglot.texi - install-info $info_file dir - popd - ''; - }); + eglot = super.eglot.overrideAttrs ( + finalAttrs: previousAttrs: { + postInstall = + previousAttrs.postInstall or "" + # old versions do not include an info manual + + lib.optionalString (lib.versionAtLeast "1.17.0.20240829.5352" finalAttrs.version) '' + local info_file=eglot.info + pushd $out/share/emacs/site-lisp/elpa/eglot-* + # specify output info file to override the one defined in eglot.texi + makeinfo --output=$info_file eglot.texi + install-info $info_file dir + popd + ''; + } + ); jinx = super.jinx.overrideAttrs (old: { dontUnpack = false;