summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/profanity/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/profanity/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/profanity/default.nix35
1 files changed, 27 insertions, 8 deletions
diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix
index 74dc36bc7ac..327b02b2352 100644
--- a/pkgs/applications/networking/instant-messengers/profanity/default.nix
+++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix
@@ -1,5 +1,6 @@
-{ stdenv, fetchurl, pkgconfig, glib, openssl, expat, libmesode
-, ncurses, libotr, curl, readline, libuuid
+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, openssl
+, glibcLocales, expect, ncurses, libotr, curl, readline, libuuid
+, cmocka, libmicrohttpd, stabber, expat, libmesode
 
 , autoAwaySupport ? false,       libXScrnSaver ? null, libX11 ? null
 , notifySupport ? false,         libnotify ? null, gdk_pixbuf ? null
@@ -20,18 +21,22 @@ stdenv.mkDerivation rec {
   name = "profanity-${version}";
   version = "0.5.1";
 
-  src = fetchurl {
-    url = "http://www.profanity.im/profanity-${version}.tar.gz";
-    sha256 = "1f7ylw3mhhnii52mmk40hyc4kqhpvjdr3hmsplzkdhsfww9kflg3";
+  src = fetchFromGitHub {
+    owner = "boothj5";
+    repo = "profanity";
+    rev = "${version}";
+    sha256 = "1ppr02wivhlrqr62r901clnycna8zpn6kr7n5rw8y3zfw21ny17z";
   };
 
+  patches = [ ./patches/packages-osx.patch ./patches/undefined-macros.patch ];
+
   enableParallelBuilding = true;
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ autoreconfHook glibcLocales pkgconfig ];
 
   buildInputs = [
-    readline libuuid libmesode
-    glib openssl expat ncurses libotr curl
+    expect readline libuuid glib openssl expat ncurses libotr
+    curl libmesode cmocka libmicrohttpd stabber
   ] ++ optionals autoAwaySupport     [ libXScrnSaver libX11 ]
     ++ optionals notifySupport       [ libnotify gdk_pixbuf ]
     ++ optionals traySupport         [ gnome2.gtk ]
@@ -45,6 +50,20 @@ stdenv.mkDerivation rec {
     ++ optionals pgpSupport          [ "--enable-pgp" ]
     ++ optionals pythonPluginSupport [ "--enable-python-plugins" ];
 
+  preAutoreconf = ''
+    mkdir m4
+  '';
+
+  doCheck = true;
+
+  LC_ALL = "en_US.utf8";
+
+  NIX_CFLAGS_COMPILE = [ ]
+    ++ optionals pythonPluginSupport [ "-I${python}/include/${python.libPrefix}" ];
+
+  LDFLAGS = [ ]
+    ++ optionals pythonPluginSupport [ "-L${python}/lib" "-lpython${python.majorVersion}m" ];
+
   meta = {
     description = "A console based XMPP client";
     longDescription = ''