about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/larbs-news/default.nix67
1 files changed, 51 insertions, 16 deletions
diff --git a/pkgs/larbs-news/default.nix b/pkgs/larbs-news/default.nix
index 83c0fba..5042e11 100644
--- a/pkgs/larbs-news/default.nix
+++ b/pkgs/larbs-news/default.nix
@@ -1,27 +1,62 @@
-{ stdenv, makeWrapper, callPackage, newsboat }:
+{ stdenv, buildEnv, makeWrapper, makeDesktopItem, callPackage,
+newsboat, libnotify, entr }:
 with stdenv.lib;
 
 let
+  pname = "larbs-news";
+  version = "1.0";
   voidrice = callPackage ../voidrice.nix { };
+  task-spooler = callPackage ../task-spooler { };
   newsboatConfig = "${voidrice}/.config/newsboat/config";
-in
 
-stdenv.mkDerivation {
-  pname = "larbs-news";
-  version = "1.0";
-  unpackPhase = "true";
+  newsboatWrapped = stdenv.mkDerivation {
+    inherit pname version;
+    unpackPhase = "true";
 
-  buildInputs = [ makeWrapper ];
+    buildInputs = [ makeWrapper ];
 
-  installPhase = ''
-    makeWrapper ${newsboat}/bin/newsboat $out/bin/newsboat \
+    installPhase = ''
+      makeWrapper ${newsboat}/bin/newsboat $out/bin/newsboat \
       --add-flags "-C ${newsboatConfig}"
-  '';
+    '';
+
+  };
 
-  meta = {
-    homepage = "https://github.com/LukeSmithXYZ/voidrice";
-    description = "Newsboat RSS reader with vim bindings";
-    license = licenses.gpl3;
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  desktopItem = makeDesktopItem {
+    name = pname;
+    genericName = "RSS Reader";
+    comment = "Newsboat configuration by Luke Smith";
+    exec = "${newsboatWrapped}/bin/neomutt";
+    # icon =
+    desktopName = pname;
+    mimeType = "application/rss+xml";
+    categories = "Network";
+    terminal = "true";
   };
-}
+
+in
+  buildEnv {
+    name = pname;
+
+    paths = [
+      newsboatWrapped
+      task-spooler
+      libnotify
+      entr
+    ];
+
+    postBuild = ''
+      cp ${voidrice}/.local/bin/statusbar/news $out/bin/news
+      cp ${voidrice}/.local/bin/cron/newsup $out/bin/newsup
+      cp ${voidrice}/.local/bin/qndl $out/bin/qndl
+      cp ${voidrice}/.local/bin/queueandnotify $out/bin/queueandnotify
+      cp ${voidrice}/.local/bin/podentr $out/bin/podentr
+    '';
+
+    meta = {
+      homepage = "https://github.com/LukeSmithXYZ/voidrice";
+      description = "Newsboat RSS reader with vim bindings";
+      license = licenses.gpl3;
+      platforms = [ "x86_64-linux" "x86_64-darwin" ];
+    };
+  }