diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 946dba0af8f5..82a1d6af8329 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -53,7 +53,8 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp { NATIVE_FULL_AOT = "1"; LIBRARY_PATH = "${lib.getLib stdenv.cc.libc}/lib"; } // { - inherit pname version; + pname = pname + lib.optionalString ( !withX && !withNS && !withGTK2 && !withGTK3 ) "-nox"; + inherit version; patches = patches fetchpatch; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7628217ef7e6..97b80a197d77 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25306,12 +25306,12 @@ with pkgs; inherit (darwin) sigtool; }; - emacs27-nox = lowPrio (appendToName "nox" (emacs27.override { + emacs27-nox = lowPrio (emacs27.override { withX = false; withNS = false; withGTK2 = false; withGTK3 = false; - })); + }); emacsMacport = callPackage ../applications/editors/emacs/macport.nix { inherit (darwin.apple_sdk.frameworks)