From d6e9df1e1ade98ed3a404c4b37421449b6b86e2f Mon Sep 17 00:00:00 2001 From: devhell <^@regexmail.net> Date: Sun, 18 Jan 2015 13:50:36 +0000 Subject: [PATCH 1/3] canto-daemon: Add a systemd service This adds a systemd service for the canto-daemon. --- nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/canto-daemon.nix | 37 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 nixos/modules/services/misc/canto-daemon.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b949fef6bab..4c0d45bc44e 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -172,6 +172,7 @@ ./services/mail/spamassassin.nix ./services/misc/apache-kafka.nix #./services/misc/autofs.nix + ./services/misc/canto-daemon.nix ./services/misc/cpuminer-cryptonight.nix ./services/misc/cgminer.nix ./services/misc/dictd.nix diff --git a/nixos/modules/services/misc/canto-daemon.nix b/nixos/modules/services/misc/canto-daemon.nix new file mode 100644 index 00000000000..ac292cd2826 --- /dev/null +++ b/nixos/modules/services/misc/canto-daemon.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + +cfg = config.services.canto-daemon; + +in { + +##### interface + + options = { + + services.canto-daemon { + enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the canto RSS daemon."; + }; + }; + + }; + +##### implementation + + config = mkIf cfg.enable { + + systemd.user.services.canto-next = { + description = "Canto RSS Daemon"; + after = [ "network.target" ]; + wantedBy = [ "default.target" ]; + serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon"; + TimeoutStopSec = 10; + }; + }; +} From 37f58c4f46df41005f2e0ac91d1bb2b15de3887a Mon Sep 17 00:00:00 2001 From: devhell <^@regexmail.net> Date: Sun, 18 Jan 2015 13:52:32 +0000 Subject: [PATCH 2/3] canto-{curses,daemon}: Add packages This adds canto-daemon, a feedparser background service, and canto-curses, a highly customizable curses-based frontend. --- .../feedreaders/canto-curses/default.nix | 32 +++++++++++++++++++ .../feedreaders/canto-daemon/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 68 insertions(+) create mode 100644 pkgs/applications/networking/feedreaders/canto-curses/default.nix create mode 100644 pkgs/applications/networking/feedreaders/canto-daemon/default.nix diff --git a/pkgs/applications/networking/feedreaders/canto-curses/default.nix b/pkgs/applications/networking/feedreaders/canto-curses/default.nix new file mode 100644 index 00000000000..ae4746a3f1e --- /dev/null +++ b/pkgs/applications/networking/feedreaders/canto-curses/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, python34Packages, readline, ncurses, canto-daemon }: + +python34Packages.buildPythonPackage rec { + version = "0.9.1"; + name = "canto-curses-${version}"; + + src = fetchFromGitHub { + owner = "themoken"; + repo = "canto-curses"; + rev = "v${version}"; + sha256 = "1vb5g0vdkp233r09qv0g4rgz7nprr2a625lf6nf6a51wpimdwgdy"; + }; + + buildInputs = [ readline ncurses canto-daemon ]; + propagatedBuildInputs = [ canto-daemon ]; + + meta = { + description = "An ncurses-based console Atom/RSS feed reader"; + longDescription = '' + Canto is an Atom/RSS feed reader for the console that is meant to be + quick, concise, and colorful. It's meant to allow you to crank through + feeds like you've never cranked before by providing a minimal, yet + information packed interface. No navigating menus. No dense blocks of + unreadable white text. An interface with almost infinite customization + and extensibility using the excellent Python programming language. + ''; + homepage = http://codezen.org/canto-ng/; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.devhell ]; + }; +} diff --git a/pkgs/applications/networking/feedreaders/canto-daemon/default.nix b/pkgs/applications/networking/feedreaders/canto-daemon/default.nix new file mode 100644 index 00000000000..bf564dd4327 --- /dev/null +++ b/pkgs/applications/networking/feedreaders/canto-daemon/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, python34Packages, }: + +python34Packages.buildPythonPackage rec { + version = "0.9.1"; + name = "canto-daemon-${version}"; + namePrefix = ""; + + src = fetchFromGitHub { + owner = "themoken"; + repo = "canto-next"; + rev = "v${version}"; + sha256 = "14lh6x0yz2asspwdi1ims01589r79q0dv77vq61gfjk5wiwfbdwa"; + }; + + propagatedBuildInputs = with python34Packages; [ feedparser ]; + + meta = { + description = "Daemon for the canto Atom/RSS feed reader"; + longDescription = '' + Canto is an Atom/RSS feed reader for the console that is meant to be + quick, concise, and colorful. It's meant to allow you to crank through + feeds like you've never cranked before by providing a minimal, yet + information packed interface. No navigating menus. No dense blocks of + unreadable white text. An interface with almost infinite customization + and extensibility using the excellent Python programming language. + ''; + homepage = http://codezen.org/canto-ng/; + license = stdenv.lib.licenses.gpl2; + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.devhell ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82e86264c5d..2ed62bfd4e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9553,6 +9553,10 @@ let camlistore = callPackage ../applications/misc/camlistore { }; + canto-curses = callPackage ../applications/networking/feedreaders/canto-curses { }; + + canto-daemon = callPackage ../applications/networking/feedreaders/canto-daemon { }; + carrier = builderDefsPackage (import ../applications/networking/instant-messengers/carrier/2.5.0.nix) { inherit fetchurl stdenv pkgconfig perl perlXMLParser libxml2 openssl nss gtkspell aspell gettext ncurses avahi dbus dbus_glib python From a9ac564f5000de9e7bf639378efd0b429857a4ea Mon Sep 17 00:00:00 2001 From: devhell <^@regexmail.net> Date: Thu, 29 Jan 2015 22:53:31 +0000 Subject: [PATCH 3/3] canto-daemon: Fix typo and remove TimeoutStopSec --- nixos/modules/services/misc/canto-daemon.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/misc/canto-daemon.nix b/nixos/modules/services/misc/canto-daemon.nix index ac292cd2826..db51a263aab 100644 --- a/nixos/modules/services/misc/canto-daemon.nix +++ b/nixos/modules/services/misc/canto-daemon.nix @@ -12,7 +12,7 @@ in { options = { - services.canto-daemon { + services.canto-daemon = { enable = mkOption { type = types.bool; default = false; @@ -26,12 +26,12 @@ in { config = mkIf cfg.enable { - systemd.user.services.canto-next = { + systemd.user.services.canto-daemon = { description = "Canto RSS Daemon"; after = [ "network.target" ]; wantedBy = [ "default.target" ]; serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon"; - TimeoutStopSec = 10; }; }; + }