From 6fd6bfb28d0068385e75d78749a37977d2a7c025 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 6 Jun 2026 19:38:20 +0800 Subject: [PATCH] emacs: test upstream bug#81105 in the withPackages test Currently, the test only passes on Emacs < 31. We have to work around it before upstream fixes the bug (if they decide to fix it). https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81105 --- .../editors/emacs/build-support/wrapper-test.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/editors/emacs/build-support/wrapper-test.nix b/pkgs/applications/editors/emacs/build-support/wrapper-test.nix index e782bc5d50b6..6ba33006ce64 100644 --- a/pkgs/applications/editors/emacs/build-support/wrapper-test.nix +++ b/pkgs/applications/editors/emacs/build-support/wrapper-test.nix @@ -15,6 +15,10 @@ runCommand "test-emacs-withPackages-wrapper" )) git # needed by magit ]; + env = { + # emulate a default NixOS env where INFOPATH is set like this (not ending with a ":") + INFOPATH = "/fake-info-dir1:/fake-info-dir2"; + }; } '' emacs --batch --eval="(require 'magit)" @@ -23,5 +27,9 @@ runCommand "test-emacs-withPackages-wrapper" # transitive dependencies should be made available # https://github.com/NixOS/nixpkgs/issues/388829 emacs --batch --eval="(require 'flx)" + + # test that https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81105 is fixed or worked around + emacs --batch --eval='(progn (package-activate-all) (info "(magit)Top"))' + touch $out ''