Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions pkgs/applications/editors/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,6 @@ lib.makeScope pkgs.newScope (
;
};

emacs28 = callPackage (self.sources.emacs28) inheritedArgs;

emacs28-gtk3 = self.emacs28.override {
withGTK3 = true;
};

emacs28-nox = pkgs.lowPrio (
self.emacs28.override {
noGui = true;
}
);

emacs29 = callPackage (self.sources.emacs29) inheritedArgs;

emacs29-gtk3 = self.emacs29.override {
withGTK3 = true;
};

emacs29-nox = self.emacs29.override {
noGui = true;
};

emacs29-pgtk = self.emacs29.override {
withPgtk = true;
};

emacs30 = callPackage (self.sources.emacs30) inheritedArgs;

emacs30-gtk3 = self.emacs30.override {
Expand Down
43 changes: 0 additions & 43 deletions pkgs/applications/editors/emacs/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -101,49 +101,6 @@ let
};
in
{
emacs28 = import ./make-emacs.nix (mkArgs {
pname = "emacs";
version = "28.2";
variant = "mainline";
rev = "28.2";
hash = "sha256-4oSLcUDR0MOEt53QOiZSVU8kPJ67GwugmBxdX3F15Ag=";
patches = fetchpatch: [
# CVE-2022-45939
(fetchpatch {
url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
})

# https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
(fetchpatch {
url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/10_all_org-macro-eval.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
hash = "sha256-OdGt4e9JGjWJPkfJhbYsmQQc6jart4BH5aIKPIbWKFs=";
})
(fetchpatch {
url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/11_all_untrusted-content.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
hash = "sha256-wa2bsnCt5yFx0+RAFZGBPI+OoKkbrfkkMer/KBEc/wA=";
})
(fetchpatch {
url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/12_all_org-remote-unsafe.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
hash = "sha256-b6WU1o3PfDV/6BTPfPNUFny6oERJCNsDrvflxX3Yvek=";
})

# security fix from Emacs 29.4
(fetchpatch {
url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=c645e1d8205f0f0663ec4a2d27575b238c646c7c";
hash = "sha256-G+gGQx5w3KuWMotR1n/sYYL8WyAABYW3fUPeffMMs38=";
})
];
});

emacs29 = import ./make-emacs.nix (mkArgs {
pname = "emacs";
version = "29.4";
variant = "mainline";
rev = "29.4";
hash = "sha256-FCP6ySkN9mAdp2T09n6foS2OciqZXc/54guRZ0B4Z2s=";
});

emacs30 = import ./make-emacs.nix (mkArgs {
pname = "emacs";
version = "30.1";
Expand Down
9 changes: 8 additions & 1 deletion pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,19 @@ mapAliases {
elixir_ls = elixir-ls; # Added 2023-03-20

# Emacs
emacs28 = throw "Emacs 28 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs28-gtk2 = throw "emacs28-gtk2 was removed because GTK2 is EOL; migrate to emacs28{,-gtk3,-nox} or to more recent versions of Emacs."; # Added 2024-09-20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: reword this message so that no one gets it wrong by accident.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which part may be confusing? Would it be better to remove which are fixed in Emacs 30?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  emacs28-gtk2 = throw "Emacs 28 is removed due to CVEs which are fixed in Emacs 30"; # Added 2024-09-20

Supposing someone did not update their system in a long heck of time, the "update to emacs29 or use other toolkit" message can be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you are referring to the emacs28-gtk2 alias which is not touched by this PR.

If a user of that emacs28-gtk2 alias switches to emacs28 or emacs28-gtk3, he will follow instructions added by this PR to use emacs 30. Yes, it is not great for a user to have to change attr twice, but I do not think it is confusing/misleading.

emacs28-gtk3 = throw "Emacs 28 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs28-nox = throw "Emacs 28 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs28NativeComp = emacs28; # Added 2022-06-08
emacs28Packages = throw "'emacs28Packages' has been renamed to/replaced by 'emacs28.pkgs'"; # Converted to throw 2024-10-17
emacs28WithPackages = throw "'emacs28WithPackages' has been renamed to/replaced by 'emacs28.pkgs.withPackages'"; # Converted to throw 2024-10-17
emacs29 = throw "Emacs 29 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs29-gtk3 = throw "Emacs 29 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs29-nox = throw "Emacs 29 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacs29-pgtk = throw "Emacs 29 is removed due to CVEs which are fixed in Emacs 30"; # Added 2025-03-03
emacsMacport = emacs-macport; # Added 2023-08-10
emacsNativeComp = emacs28NativeComp; # Added 2022-06-08
emacsNativeComp = emacs; # Added 2022-06-08
emacsWithPackages = throw "'emacsWithPackages' has been renamed to/replaced by 'emacs.pkgs.withPackages'"; # Converted to throw 2024-10-17
emacsPackages = emacs.pkgs; # Added 2025-03-02

Expand Down
9 changes: 0 additions & 9 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13167,15 +13167,6 @@ with pkgs;
};

inherit (recurseIntoAttrs (callPackage ../applications/editors/emacs { }))
emacs28
emacs28-gtk3
emacs28-nox

emacs29
emacs29-gtk3
emacs29-nox
emacs29-pgtk

emacs30
emacs30-gtk3
emacs30-nox
Expand Down
Loading