From eb31aec16e77798619ebf7b515c4fd26da28ec9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Thu, 12 Oct 2017 21:26:33 +0200 Subject: [PATCH 1/4] profanity: enable parallel build --- .../networking/instant-messengers/profanity/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index 79fb9b5c7f92..b8cd292b6cae 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -21,7 +21,10 @@ stdenv.mkDerivation rec { sha256 = "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3"; }; + enableParallelBuilding = true; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ readline libuuid libmesode glib openssl expat ncurses libotr curl From 07e81b66f228d6d2d4ff059c6ba85a0202d31058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Thu, 12 Oct 2017 21:28:21 +0200 Subject: [PATCH 2/4] profanity: enable pgp support --- .../networking/instant-messengers/profanity/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index b8cd292b6cae..e994a9849c81 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -4,11 +4,13 @@ , autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null , notifySupport ? false, libnotify ? null, gdk_pixbuf ? null , traySupport ? false, gnome2 ? null +, pgpSupport ? true, gpgme ? null }: assert autoAwaySupport -> libXScrnSaver != null && libX11 != null; assert notifySupport -> libnotify != null && gdk_pixbuf != null; assert traySupport -> gnome2 != null; +assert pgpSupport -> gpgme != null; with stdenv.lib; @@ -30,7 +32,8 @@ stdenv.mkDerivation rec { glib openssl expat ncurses libotr curl ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ] ++ optionals notifySupport [ libnotify gdk_pixbuf ] - ++ optionals traySupport [ gnome2.gtk ]; + ++ optionals traySupport [ gnome2.gtk ] + ++ optionals pgpSupport [ gpgme ]; meta = { description = "A console based XMPP client"; From 7a82f81b84dd5e98a43719e5ee8576d65e2f7cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Thu, 12 Oct 2017 22:08:20 +0200 Subject: [PATCH 3/4] profanity: enable support for python plugins --- .../instant-messengers/profanity/default.nix | 27 ++++++++++--------- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index e994a9849c81..6c57624d28e2 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -1,16 +1,18 @@ { stdenv, fetchurl, pkgconfig, glib, openssl, expat, libmesode , ncurses, libotr, curl, readline, libuuid -, autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null -, notifySupport ? false, libnotify ? null, gdk_pixbuf ? null -, traySupport ? false, gnome2 ? null -, pgpSupport ? true, gpgme ? null +, autoAwaySupport ? false, libXScrnSaver ? null, libX11 ? null +, notifySupport ? false, libnotify ? null, gdk_pixbuf ? null +, traySupport ? false, gnome2 ? null +, pgpSupport ? true, gpgme ? null +, pythonPluginSupport ? true, python ? null }: -assert autoAwaySupport -> libXScrnSaver != null && libX11 != null; -assert notifySupport -> libnotify != null && gdk_pixbuf != null; -assert traySupport -> gnome2 != null; -assert pgpSupport -> gpgme != null; +assert autoAwaySupport -> libXScrnSaver != null && libX11 != null; +assert notifySupport -> libnotify != null && gdk_pixbuf != null; +assert traySupport -> gnome2 != null; +assert pgpSupport -> gpgme != null; +assert pythonPluginSupport -> python != null; with stdenv.lib; @@ -30,10 +32,11 @@ stdenv.mkDerivation rec { buildInputs = [ readline libuuid libmesode glib openssl expat ncurses libotr curl - ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ] - ++ optionals notifySupport [ libnotify gdk_pixbuf ] - ++ optionals traySupport [ gnome2.gtk ] - ++ optionals pgpSupport [ gpgme ]; + ] ++ optionals autoAwaySupport [ libXScrnSaver libX11 ] + ++ optionals notifySupport [ libnotify gdk_pixbuf ] + ++ optionals traySupport [ gnome2.gtk ] + ++ optionals pgpSupport [ gpgme ] + ++ optionals pythonPluginSupport [ python ]; meta = { description = "A console based XMPP client"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a9a3674ee6c1..b33c9ffe1a53 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16084,6 +16084,7 @@ with pkgs; notifySupport = config.profanity.notifySupport or true; traySupport = config.profanity.traySupport or true; autoAwaySupport = config.profanity.autoAwaySupport or true; + python = python3; }; psi = kde4.callPackage ../applications/networking/instant-messengers/psi { }; From e4cf6635abe7508537a6bc8b8691fb12a36fd207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Thu, 12 Oct 2017 22:11:15 +0200 Subject: [PATCH 4/4] profanity: explicit feature flags so build fails when libs are missing When the feature flags during configuration are not set explicitly the build will continue even when needed libs are missing, disabling the feature. To get notified of problems, we set the feature flags explicitly. --- .../networking/instant-messengers/profanity/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix index 6c57624d28e2..74dc36bc7ac0 100644 --- a/pkgs/applications/networking/instant-messengers/profanity/default.nix +++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix @@ -38,6 +38,13 @@ stdenv.mkDerivation rec { ++ optionals pgpSupport [ gpgme ] ++ optionals pythonPluginSupport [ python ]; + # Enable feature flags, so that build fail if libs are missing + configureFlags = [ "--enable-c-plugins" "--enable-otr" ] + ++ optionals notifySupport [ "--enable-notifications" ] + ++ optionals traySupport [ "--enable-icons" ] + ++ optionals pgpSupport [ "--enable-pgp" ] + ++ optionals pythonPluginSupport [ "--enable-python-plugins" ]; + meta = { description = "A console based XMPP client"; longDescription = ''