From 75650d79da6c841ae27cd4b1392a11d74b117c26 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 20 Jun 2023 01:59:32 +1200 Subject: [PATCH 1/4] emacs: add nativeComp passthru As reported by @terlar in https://github.com/NixOS/nixpkgs/pull/235859#issuecomment-1597012885 the removal of nativeComp in passthru breaks external tooling. This adds back `passthru.nativeComp` with a deprecation notice which sets the removal for 23.11. --- pkgs/applications/editors/emacs/generic.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 30da08920a8f..2275cacea8bd 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -386,6 +386,8 @@ mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation { inherit withTreeSitter; pkgs = recurseIntoAttrs (emacsPackagesFor finalAttrs.finalPackage); tests = { inherit (nixosTests) emacs-daemon; }; + # Backwards compatibility aliases. Remove this at some point before 23.11 release cut-off. + nativeComp = builtins.trace "emacs.passthru: nativeComp was renamed to withNativeCompilation and will be removed in 23.11" withNativeCompilation; }; meta = { From 8ce789347789e66ab213978cd341c19dab463eab Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 20 Jun 2023 02:18:21 +1200 Subject: [PATCH 2/4] emacs: add back treeSitter passthru --- pkgs/applications/editors/emacs/generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 2275cacea8bd..3d3b88e14c3d 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -388,6 +388,7 @@ mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation { tests = { inherit (nixosTests) emacs-daemon; }; # Backwards compatibility aliases. Remove this at some point before 23.11 release cut-off. nativeComp = builtins.trace "emacs.passthru: nativeComp was renamed to withNativeCompilation and will be removed in 23.11" withNativeCompilation; + treeSitter = builtins.trace "emacs.passthru: treeSitter was renamed to withTreeSitter and will be removed in 23.11" withTreeSitter; }; meta = { From 3ef5accbff272bb3b223ab89c21a9db69a43719d Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 20 Jun 2023 02:23:24 +1200 Subject: [PATCH 3/4] emacs: add back support in wrapper for using passthru.nativeComp The API was changed in https://github.com/NixOS/nixpkgs/pull/235859. --- pkgs/build-support/emacs/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 4c30a0657122..5aaf04d8b312 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -36,7 +36,7 @@ in customEmacsPackages.withPackages (epkgs: [ epkgs.evil epkgs.magit ]) self: let inherit (self) emacs; - withNativeCompilation = emacs.withNativeCompilation or false; + withNativeCompilation = emacs.withNativeCompilation or emacs.nativeComp or false; withTreeSitter = emacs.withTreeSitter or false; in packagesFun: # packages explicitly requested by the user From 5f253d2521e371b7e5cb6ee72ba885ada985118b Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 20 Jun 2023 02:26:41 +1200 Subject: [PATCH 4/4] emacs: add back support in wrapper for using passthru.treeSitter The API was changed in https://github.com/NixOS/nixpkgs/pull/235859. --- pkgs/build-support/emacs/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 5aaf04d8b312..a3842dec6997 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -37,7 +37,7 @@ self: let inherit (self) emacs; withNativeCompilation = emacs.withNativeCompilation or emacs.nativeComp or false; - withTreeSitter = emacs.withTreeSitter or false; + withTreeSitter = emacs.withTreeSitter or emacs.treeSitter or false; in packagesFun: # packages explicitly requested by the user let