about summary refs log tree commit diff
path: root/pkgs/larbs-news/default.nix
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-07 17:54:30 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2020-10-07 17:54:30 +0200
commit535af7b898f5c1d6bdf5eba76fc6a7d3c2e98e24 (patch)
treedbeca3eea812ea0493e4005e1857c0ab8d442fff /pkgs/larbs-news/default.nix
parentb0086e0c0e8ea2a2eb24810e0fda00b956325469 (diff)
downloadpnpkgs-535af7b898f5c1d6bdf5eba76fc6a7d3c2e98e24.tar.gz
pnpkgs-535af7b898f5c1d6bdf5eba76fc6a7d3c2e98e24.zip
Update larbs-news
Diffstat (limited to 'pkgs/larbs-news/default.nix')
-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" ];
+    };
+  }