From ee36ef9891e1220d8875302a0886fc77f25e5515 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 17:22:47 +0000 Subject: [PATCH 01/10] libstrophe: Add new package This adds libstrophe as a dependency to the profanity XMPP client. --- .../libraries/libstrophe/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/libraries/libstrophe/default.nix diff --git a/pkgs/development/libraries/libstrophe/default.nix b/pkgs/development/libraries/libstrophe/default.nix new file mode 100644 index 00000000000..1df9342610b --- /dev/null +++ b/pkgs/development/libraries/libstrophe/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub, automake, autoconf, libtool, openssl, expat, pkgconfig, check }: + +stdenv.mkDerivation rec { + name = "libstrophe-${version}"; + version = "0.8.7"; + + src = fetchFromGitHub { + owner = "strophe"; + repo = "libstrophe"; + rev = version; + sha256 = "1iic8xbcxh21dzns8m9kkz0cj5f3ppn414gnhyh4y2wcjsz6hp8l"; + }; + + buildInputs = [ automake autoconf openssl expat libtool pkgconfig check ]; + + dontDisableStatic = true; + + preConfigure = "mkdir m4 && sh bootstrap.sh"; + + doCheck = true; + + meta = { + description = "A simple, lightweight C library for writing XMPP clients"; + longDescription = '' + libstrophe is a lightweight XMPP client library written in C. It has + minimal dependencies and is configurable for various environments. It + runs well on both Linux, Unix, and Windows based platforms. + ''; + hompeage = http://strophe.im/libstrophe/; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.devhell ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c7813320b14..14a7fb0fd49 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6164,6 +6164,8 @@ let libstartup_notification = callPackage ../development/libraries/startup-notification { }; + libstrophe = callPackage ../development/libraries/libstrophe { }; + libspatialindex = callPackage ../development/libraries/libspatialindex { }; libspatialite = callPackage ../development/libraries/libspatialite { }; From 19aa2b5b0f5f18d67919485a9fa0ae45ad9efdad Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 20:23:15 +0000 Subject: [PATCH 02/10] profanity: Add profanity, a ncurses XMPP client This adds profanity, a ncurses irssi-style XMPP client, which depends on libstrophe. --- .../instant-messengers/profanity/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/applications/networking/instant-messengers/profanity/default.nix diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix new file mode 100644 index 00000000000..8f28c572b00 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libnotify, libotr, curl, libstrophe }: + +stdenv.mkDerivation rec { + name = "profanity-${version}"; + version = "0.4.5"; + + src = fetchurl { + url = "http://www.profanity.im/profanity-${version}.tar.gz"; + sha256 = "0qzwqxcxf695z3gf94psd2x619vlp4hkkjmkrpsla1ns0f6v6dkl"; + }; + + buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libnotify libotr curl libstrophe ]; + + preConfigure = "sh bootstrap.sh"; + + meta = { + description = "A console based XMPP client"; + longDescription = '' + Profanity is a console based XMPP client written in C using ncurses and + libstrophe, inspired by Irssi. + ''; + homepage = http://profanity.im/; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.devhell ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 14a7fb0fd49..80abefbc102 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10579,6 +10579,8 @@ let # And I don't want to rewrite all rules procmail = callPackage ../applications/misc/procmail { }; + profanity = callPackage ../applications/networking/instant-messengers/profanity { }; + pstree = callPackage ../applications/misc/pstree { }; pulseview = callPackage ../applications/science/electronics/pulseview { }; From b89b6d1599bd509656246a30d451b6ff49d33693 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 22:13:36 +0000 Subject: [PATCH 03/10] libstrophe: Fix typo --- pkgs/development/libraries/libstrophe/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libstrophe/default.nix b/pkgs/development/libraries/libstrophe/default.nix index 1df9342610b..548ff7ac403 100644 --- a/pkgs/development/libraries/libstrophe/default.nix +++ b/pkgs/development/libraries/libstrophe/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { minimal dependencies and is configurable for various environments. It runs well on both Linux, Unix, and Windows based platforms. ''; - hompeage = http://strophe.im/libstrophe/; + homepage = http://strophe.im/libstrophe/; license = stdenv.lib.licenses.gpl3; maintainers = [ stdenv.lib.maintainers.devhell ]; }; From 6ba674911fb3a34f23ddde8cd54bb3c7ebfb1085 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 22:37:16 +0000 Subject: [PATCH 04/10] libstrophe: Add "platforms" meta information --- pkgs/development/libraries/libstrophe/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/libstrophe/default.nix b/pkgs/development/libraries/libstrophe/default.nix index 548ff7ac403..b4757831899 100644 --- a/pkgs/development/libraries/libstrophe/default.nix +++ b/pkgs/development/libraries/libstrophe/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation rec { ''; homepage = http://strophe.im/libstrophe/; license = stdenv.lib.licenses.gpl3; + platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.devhell ]; }; } From 799f94185fcc40353bf8deb156543dd59b092ad3 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 22:39:24 +0000 Subject: [PATCH 05/10] profanity: Add libXScrnSaver and libX11 buildInputs This adds libXScrnSaver and libX11 to the buildInputs. Thanks to @aszlig for spotting this. --- .../networking/instant-messengers/profanity/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index 8f28c572b00..c7c8612b8b6 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libnotify, libotr, curl, libstrophe }: +{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libnotify, libotr, curl, libstrophe, libXScrnSaver, libX11 }: stdenv.mkDerivation rec { name = "profanity-${version}"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0qzwqxcxf695z3gf94psd2x619vlp4hkkjmkrpsla1ns0f6v6dkl"; }; - buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libnotify libotr curl libstrophe ]; + buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libnotify libotr curl libstrophe libXScrnSaver libX11 ]; preConfigure = "sh bootstrap.sh"; From f2faa549d96da109d7c982d0e9cbad140ad4fc4b Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 22:42:58 +0000 Subject: [PATCH 06/10] profanity: Add "platforms" meta information --- .../networking/instant-messengers/profanity/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index c7c8612b8b6..b6e78eb7a00 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { ''; homepage = http://profanity.im/; license = stdenv.lib.licenses.gpl3Plus; + platforms = stdenv.lib.platforms.linux; maintainers = [ stdenv.lib.maintainers.devhell ]; }; } From bd039dd6674b520a983bf534464ff80dedeb2f28 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 23:45:24 +0000 Subject: [PATCH 07/10] all-packages: Add libnotify option to profanity This adds the option to build profanity with libnotify. --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 80abefbc102..5da42fa5338 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10579,7 +10579,9 @@ let # And I don't want to rewrite all rules procmail = callPackage ../applications/misc/procmail { }; - profanity = callPackage ../applications/networking/instant-messengers/profanity { }; + profanity = callPackage ../applications/networking/instant-messengers/profanity { + libnotifySupport = config.profanity.libnotifySupport or true; + }; pstree = callPackage ../applications/misc/pstree { }; From 429dd8e8847c87b264430a08c5275500ed104750 Mon Sep 17 00:00:00 2001 From: "dev.hell" Date: Sun, 4 Jan 2015 23:46:10 +0000 Subject: [PATCH 08/10] profanity: Add libnotifySupport config option This adds support for profanity to be optionally built with libnotify. --- .../instant-messengers/profanity/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index b6e78eb7a00..f36fd5c8130 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,5 +1,11 @@ -{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libnotify, libotr, curl, libstrophe, libXScrnSaver, libX11 }: +{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libotr, curl, libstrophe, +libnotifySupport ? false, libnotify ? null, libXScrnSaver ? null, libX11 ? null, gdk_pixbuf ? null}: +assert libnotifySupport -> (libnotify != null && libXScrnSaver != null && libX11 != null && gdk_pixbuf != null); + +let + optional = stdenv.lib.optional; +in stdenv.mkDerivation rec { name = "profanity-${version}"; version = "0.4.5"; @@ -9,7 +15,8 @@ stdenv.mkDerivation rec { sha256 = "0qzwqxcxf695z3gf94psd2x619vlp4hkkjmkrpsla1ns0f6v6dkl"; }; - buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libnotify libotr curl libstrophe libXScrnSaver libX11 ]; + buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libotr curl libstrophe ] + ++ optional libnotifySupport [ libnotify libXScrnSaver libX11 gdk_pixbuf ]; preConfigure = "sh bootstrap.sh"; From a3137802021fce00e9d7e0a38938859104d70a6b Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 5 Jan 2015 08:22:32 +0100 Subject: [PATCH 09/10] profanity: Clean up package expression file. No real changes in functionality, other than renaming libnotifySupport to just notifySupport. I've wrapped the lines to a maximum of 80 characters in width, so the file looks less cluttered up. Which includes setting apart the attribute for notifySupport and its respective dependencies from the main dependencies. Signed-off-by: aszlig --- .../instant-messengers/profanity/default.nix | 28 +++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index f36fd5c8130..2d75bf004b0 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,11 +1,15 @@ -{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat, ncurses, libotr, curl, libstrophe, -libnotifySupport ? false, libnotify ? null, libXScrnSaver ? null, libX11 ? null, gdk_pixbuf ? null}: +{ stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat +, ncurses, libotr, curl, libstrophe -assert libnotifySupport -> (libnotify != null && libXScrnSaver != null && libX11 != null && gdk_pixbuf != null); +, notifySupport ? false, libnotify ? null, libXScrnSaver ? null +, libX11 ? null, gdk_pixbuf ? null +}: + +assert notifySupport -> libnotify != null && libXScrnSaver != null + && libX11 != null && gdk_pixbuf != null; + +with stdenv.lib; -let - optional = stdenv.lib.optional; -in stdenv.mkDerivation rec { name = "profanity-${version}"; version = "0.4.5"; @@ -15,8 +19,10 @@ stdenv.mkDerivation rec { sha256 = "0qzwqxcxf695z3gf94psd2x619vlp4hkkjmkrpsla1ns0f6v6dkl"; }; - buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libotr curl libstrophe ] - ++ optional libnotifySupport [ libnotify libXScrnSaver libX11 gdk_pixbuf ]; + buildInputs = [ + automake autoconf pkgconfig + glib openssl expat ncurses libotr curl libstrophe + ] ++ optionals notifySupport [ libnotify libXScrnSaver libX11 gdk_pixbuf ]; preConfigure = "sh bootstrap.sh"; @@ -27,8 +33,8 @@ stdenv.mkDerivation rec { libstrophe, inspired by Irssi. ''; homepage = http://profanity.im/; - license = stdenv.lib.licenses.gpl3Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.devhell ]; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = [ maintainers.devhell ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5da42fa5338..9acd92092f9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10580,7 +10580,7 @@ let procmail = callPackage ../applications/misc/procmail { }; profanity = callPackage ../applications/networking/instant-messengers/profanity { - libnotifySupport = config.profanity.libnotifySupport or true; + notifySupport = config.profanity.notifySupport or true; }; pstree = callPackage ../applications/misc/pstree { }; From f1f5a7f6c5099511d7f3c2e8b590d5744f2f8b2e Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 5 Jan 2015 08:28:20 +0100 Subject: [PATCH 10/10] profanity: Add option for autoAwaySupport. Actually, two dependencies used for notifySupport are for autoAwaySupport and have nothing to do with notifications, so let's split them apart. Signed-off-by: aszlig --- .../instant-messengers/profanity/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index 2d75bf004b0..bd934b6cf73 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, automake, autoconf, pkgconfig, glib, openssl, expat , ncurses, libotr, curl, libstrophe -, notifySupport ? false, libnotify ? null, libXScrnSaver ? null -, libX11 ? null, gdk_pixbuf ? null +, autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null +, notifySupport ? false, libnotify ? null, gdk_pixbuf ? null }: -assert notifySupport -> libnotify != null && libXScrnSaver != null - && libX11 != null && gdk_pixbuf != null; +assert autoAwaySupport -> libXScrnSaver != null && libX11 != null; +assert notifySupport -> libnotify != null && gdk_pixbuf != null; with stdenv.lib; @@ -22,7 +22,8 @@ stdenv.mkDerivation rec { buildInputs = [ automake autoconf pkgconfig glib openssl expat ncurses libotr curl libstrophe - ] ++ optionals notifySupport [ libnotify libXScrnSaver libX11 gdk_pixbuf ]; + ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ] + ++ optionals notifySupport [ libnotify gdk_pixbuf ]; preConfigure = "sh bootstrap.sh"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9acd92092f9..cc75c84bbba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10580,7 +10580,8 @@ let procmail = callPackage ../applications/misc/procmail { }; profanity = callPackage ../applications/networking/instant-messengers/profanity { - notifySupport = config.profanity.notifySupport or true; + notifySupport = config.profanity.notifySupport or true; + autoAwaySupport = config.profanity.autoAwaySupport or true; }; pstree = callPackage ../applications/misc/pstree { };