Merge pull request #198608 from taku0/thunderbird-desktop-item

This commit is contained in:
Bernardo Meurer 2022-11-04 14:53:51 +00:00 committed by GitHub
commit 51ebf9d12e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 ];