thunderbird, thunderbird-bin: fix desktop item

Generate appropriate desktop item for Thunderbird.

Fixes #194851.
This commit is contained in:
taku0 2022-10-30 15:24:34 +09:00
parent 84510146d4
commit aaa9a95e02

View file

@ -166,38 +166,64 @@ let
in stdenv.mkDerivation {
inherit pname version;
desktopItem = makeDesktopItem {
desktopItem = makeDesktopItem ({
name = applicationName;
exec = "${launcherName} %U";
inherit icon;
desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}";
genericName = "Web Browser";
categories = [ "Network" "WebBrowser" ];
mimeTypes = [
"text/html"
"text/xml"
"application/xhtml+xml"
"application/vnd.mozilla.xul+xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
"x-scheme-handler/ftp"
];
startupNotify = true;
startupWMClass = wmClass;
actions = {
new-window = {
name = "New Window";
exec = "${launcherName} --new-window %U";
};
new-private-window = {
name = "New Private Window";
exec = "${launcherName} --private-window %U";
};
profile-manager-window = {
name = "Profile Manager";
exec = "${launcherName} --ProfileManger";
};
};
};
terminal = false;
} // (if libName == "thunderbird"
then {
genericName = "Email Client";
comment = "Read and write e-mails or RSS feeds, or manage tasks on calendars.";
categories = [
"Network" "Chat" "Email" "Feed" "GTK" "News"
];
keywords = [
"mail" "email" "e-mail" "messages" "rss" "calendar"
"address book" "addressbook" "chat"
];
mimeTypes = [
"message/rfc822"
"x-scheme-handler/mailto"
"text/calendar"
"text/x-vcard"
];
actions = {
profile-manager-window = {
name = "Profile Manager";
exec = "${launcherName} --ProfileManger";
};
};
}
else {
genericName = "Web Browser";
categories = [ "Network" "WebBrowser" ];
mimeTypes = [
"text/html"
"text/xml"
"application/xhtml+xml"
"application/vnd.mozilla.xul+xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
];
actions = {
new-window = {
name = "New Window";
exec = "${launcherName} --new-window %U";
};
new-private-window = {
name = "New Private Window";
exec = "${launcherName} --private-window %U";
};
profile-manager-window = {
name = "Profile Manager";
exec = "${launcherName} --ProfileManger";
};
};
}));
nativeBuildInputs = [ makeWrapper lndir jq ];
buildInputs = [ browser.gtk3 ];