1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 12:11:28 +00:00

nixos/emacs: drop custom emacsclient desktop file

This custom emacsclient desktop file was added[1] to Nixpkgs when
the upstream did not provide one.

Since an emacsclient desktop file is provided[2] by the upstream now,
we should remove our custom one from Nixpkgs to reduce maintenance
burden[3].

Fixes https://github.com/NixOS/nixpkgs/issues/245533

[1]: https://github.com/NixOS/nixpkgs/pull/35896
[2]: https://git.savannah.gnu.org/cgit/emacs.git/commit/etc/emacsclient.desktop?id=1a845a672dc73c8e98e6cb9bb734616e168e60ba
[3]: https://git.savannah.gnu.org/cgit/emacs.git/commit/etc/emacsclient.desktop?id=1500e4b4329d4d3d0141263230d74e1b314373b1
This commit is contained in:
Lin Jian 2024-01-20 08:07:06 +08:00
parent 8da872fefa
commit 20f07b4aa9
No known key found for this signature in database
GPG key ID: A6698D36434F75A5

View file

@ -15,25 +15,6 @@ let
fi
'';
desktopApplicationFile = pkgs.writeTextFile {
name = "emacsclient.desktop";
destination = "/share/applications/emacsclient.desktop";
text = ''
[Desktop Entry]
Name=Emacsclient
GenericName=Text Editor
Comment=Edit text
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=emacseditor %F
Icon=emacs
Type=Application
Terminal=false
Categories=Development;TextEditor;
StartupWMClass=Emacs
Keywords=Text;Editor;
'';
};
in
{
@ -102,7 +83,7 @@ in
wantedBy = if cfg.startWithGraphical then [ "graphical-session.target" ] else [ "default.target" ];
};
environment.systemPackages = [ cfg.package editorScript desktopApplicationFile ];
environment.systemPackages = [ cfg.package editorScript ];
environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "emacseditor");
};