From 994274e7a5674b622bc4d034ab4f943a187b607f Mon Sep 17 00:00:00 2001 From: archer-65 Date: Sun, 6 Apr 2025 21:01:46 +0200 Subject: [PATCH 1/2] emacs: allow specifying meta in sources --- pkgs/applications/editors/emacs/make-emacs.nix | 4 ++-- pkgs/applications/editors/emacs/sources.nix | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs/make-emacs.nix b/pkgs/applications/editors/emacs/make-emacs.nix index e203a5fd3506..bb64c30fccdc 100644 --- a/pkgs/applications/editors/emacs/make-emacs.nix +++ b/pkgs/applications/editors/emacs/make-emacs.nix @@ -538,10 +538,10 @@ mkDerivation (finalAttrs: { }; }; - meta = meta // { + meta = { broken = withNativeCompilation && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform); knownVulnerabilities = lib.optionals (lib.versionOlder version "30") [ "CVE-2024-53920 CVE-2025-1244, please use newer versions such as emacs30" ]; - }; + } // meta; }) diff --git a/pkgs/applications/editors/emacs/sources.nix b/pkgs/applications/editors/emacs/sources.nix index 23ce17d40b89..6b5816604345 100644 --- a/pkgs/applications/editors/emacs/sources.nix +++ b/pkgs/applications/editors/emacs/sources.nix @@ -13,6 +13,7 @@ let patches ? _: [ ], rev, hash, + meta ? { }, }: { inherit @@ -97,7 +98,7 @@ let } .${variant}; mainProgram = "emacs"; - }; + } // meta; }; in { From 86733544de4fa500480bf5c7207da8b8a689c058 Mon Sep 17 00:00:00 2001 From: archer-65 Date: Sat, 5 Apr 2025 21:05:49 +0200 Subject: [PATCH 2/2] emacs-macport: 29.1 -> 29.4 Additional: * Do not mark as vulnerable as CVE patches are applied --- pkgs/applications/editors/emacs/sources.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs/sources.nix b/pkgs/applications/editors/emacs/sources.nix index 6b5816604345..febe3288ff69 100644 --- a/pkgs/applications/editors/emacs/sources.nix +++ b/pkgs/applications/editors/emacs/sources.nix @@ -152,9 +152,24 @@ in emacs29-macport = import ./make-emacs.nix (mkArgs { pname = "emacs-mac"; - version = "29.1"; + version = "29.4"; variant = "macport"; - rev = "emacs-29.1-mac-10.0"; - hash = "sha256-TE829qJdPjeOQ+kD0SfyO8d5YpJjBge/g+nScwj+XVU="; + rev = "emacs-29.4-mac-10.1"; + hash = "sha256-8OQ+fon9tclbh/eUJ09uqKfMaz9M77QnLIp2R8QB6Ic="; + patches = fetchpatch: [ + # CVE-2024-53920 + (fetchpatch { + url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/29.4/07_all_trusted-content.patch?id=f24370de4de0a37304958ec1569d5c50c1745b7f"; + hash = "sha256-zUWM2HDO5MHEB5fC5TCUxzmSafMvXO5usRzCyp9Q7P4="; + }) + + # CVE-2025-1244 + (fetchpatch { + url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/29.4/06_all_man.patch?id=f24370de4de0a37304958ec1569d5c50c1745b7f"; + hash = "sha256-Vdf6GF5YmGoHTkxiD9mdYH0hgvfovZwrqYN1NQ++U1w="; + }) + ]; + + meta.knownVulnerabilities = [ ]; }); }