mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
emacs: remove use of makeDesktopItem
Can generate the file directly to avoid the dependency on the `makeDesktopItem` API.
This commit is contained in:
parent
77913ff17e
commit
18429f1d1d
2 changed files with 26 additions and 27 deletions
|
@ -10,24 +10,24 @@ let
|
||||||
emacsVersion = getVersion emacsCfg.finalPackage;
|
emacsVersion = getVersion emacsCfg.finalPackage;
|
||||||
|
|
||||||
# Adapted from upstream emacs.desktop
|
# Adapted from upstream emacs.desktop
|
||||||
clientDesktopItem = pkgs.makeDesktopItem rec {
|
clientDesktopItem = pkgs.writeTextDir "share/applications/emacsclient.desktop"
|
||||||
name = "emacsclient";
|
(generators.toINI { } {
|
||||||
desktopName = "Emacs Client";
|
"Desktop Entry" = {
|
||||||
genericName = "Text Editor";
|
Type = "Application";
|
||||||
comment = "Edit text";
|
Exec = "${emacsBinPath}/emacsclient ${
|
||||||
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 = "${emacsBinPath}/emacsclient ${
|
|
||||||
concatStringsSep " " cfg.client.arguments
|
concatStringsSep " " cfg.client.arguments
|
||||||
} %F";
|
} %F";
|
||||||
icon = "emacs";
|
Terminal = false;
|
||||||
type = "Application";
|
Name = "Emacs Client";
|
||||||
terminal = "false";
|
Icon = "emacs";
|
||||||
categories = "Utility;TextEditor;";
|
Comment = "Edit text";
|
||||||
extraEntries = ''
|
GenericName = "Text Editor";
|
||||||
StartupWMClass=Emacs
|
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++;";
|
||||||
|
Categories = "Utility;TextEditor;";
|
||||||
|
StartupWMClass = "Emacs";
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
# Match the default socket path for the Emacs version so emacsclient continues
|
# Match the default socket path for the Emacs version so emacsclient continues
|
||||||
# to work without wrapping it. It might be worthwhile to allow customizing the
|
# to work without wrapping it. It might be worthwhile to allow customizing the
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
|
||||||
Exec=@emacs@/bin/emacsclient -c %F
|
|
||||||
Terminal=false
|
|
||||||
Name=Emacs Client
|
|
||||||
Icon=emacs
|
|
||||||
Comment=Edit text
|
|
||||||
GenericName=Text Editor
|
|
||||||
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++;
|
|
||||||
Categories=Utility;TextEditor;
|
Categories=Utility;TextEditor;
|
||||||
|
Comment=Edit text
|
||||||
|
Exec=@emacs@/bin/emacsclient -c %F
|
||||||
|
GenericName=Text Editor
|
||||||
|
Icon=emacs
|
||||||
|
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++;
|
||||||
|
Name=Emacs Client
|
||||||
StartupWMClass=Emacs
|
StartupWMClass=Emacs
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
|
Loading…
Reference in a new issue