about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-17 14:22:40 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-09-17 14:22:40 +0200
commitde2c87db02753eb46e1ba5fe895f761117fdd758 (patch)
treef8202be55028b4b47b180e1f4e64269652c6fd22 /pkgs
parentff57c60416c2dc5ef51ef5ee95b097c1e2518aab (diff)
downloadpnpkgs-de2c87db02753eb46e1ba5fe895f761117fdd758.tar.gz
pnpkgs-de2c87db02753eb46e1ba5fe895f761117fdd758.zip
Add desktop entry
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/larbs-mail/default.nix27
-rw-r--r--pkgs/larbs-mail/icon.pngbin0 -> 46553 bytes
2 files changed, 25 insertions, 2 deletions
diff --git a/pkgs/larbs-mail/default.nix b/pkgs/larbs-mail/default.nix
index ef41092..66bc4a3 100644
--- a/pkgs/larbs-mail/default.nix
+++ b/pkgs/larbs-mail/default.nix
@@ -1,12 +1,27 @@
-{ stdenv, callPackage, buildEnv, isync, pass, msmtp, notmuch, libnotify }:
+{ stdenv, callPackage, buildEnv, makeDesktopItem, isync, pass, msmtp, notmuch, libnotify }:
 with stdenv.lib;
 
 let
+  pname = "larbs-mail";
+
   mutt-wizard = callPackage ./mutt-wizard.nix { };
   neomutt = callPackage ./neomutt_wrapped.nix { };
+  icon = ./icon.png;
+
+  desktopItem = makeDesktopItem {
+    name = pname;
+    genericName = "Mail Client";
+    comment = "Neomutt configuration by Luke Smith";
+    exec = "${neomutt}/bin/neomutt";
+    icon = icon;
+    desktopName = pname;
+    mimeType = "x-scheme-handler/mailto;message/rfc822";
+    categories = "Network;Email";
+    terminal = "true";
+  };
 in
 buildEnv {
-  name = "larbs-mail";
+  name = pname;
 
   paths = [
     neomutt
@@ -18,6 +33,14 @@ buildEnv {
     mutt-wizard
   ];
 
+  postBuild = ''
+    mkdir -p $out/opt/larbs-mail
+    mkdir -p $out/share/pixmaps
+    mv * $out/opt/larbs-mail
+
+    ln -s "${desktopItem}/share/applications" $out/share
+  '';
+
   meta = {
     homepage = "https://github.com/LukeSmithXYZ/mutt-wizard";
     description = "Neomutt + Mutt-Wizard: A system for automatically configuring mutt and isync with a simple interface and safe passwords";
diff --git a/pkgs/larbs-mail/icon.png b/pkgs/larbs-mail/icon.png
new file mode 100644
index 0000000..a1c90a9
--- /dev/null
+++ b/pkgs/larbs-mail/icon.png
Binary files differ