diff --git a/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff b/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff new file mode 100644 index 00000000000..5fe87160122 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/freetalk/01_callbacks_const_fix.diff @@ -0,0 +1,25 @@ +Description: Patch to fix FTBFS due to a modified const in src/callbacks.cc +Forwarded: yes +Origin: Ubuntu, +https://bugs.launchpad.net/ubuntu/+source/freetalk/+bug/443241 +Bug-Debian: http://bugs.debian.org/560535 +Author: Jon Bernard +--- 3.2-1.orig/src/callbacks.cc 2008-11-15 10:41:22.000000000 +0000 ++++ 3.2-1/src/callbacks.cc 2009-10-21 15:50:49.000000000 +0100 +@@ -116,13 +116,13 @@ ft_msg_msg_handler (LmMessageHandler *ha + LmMessage *msg, gpointer user_data) + { + LmMessageNode *root, *body, *x; +- const char *from, *msg_str, *type; +- char *ts = NULL; ++ const char *msg_str, *type; ++ char *from, *ts = NULL; + + root = lm_message_get_node (msg); + body = lm_message_node_get_child (root, "body"); + +- from = lm_message_node_get_attribute (msg->node, "from"); ++ from = (char *) lm_message_node_get_attribute (msg->node, "from"); + + /* since the file-transfer happens in-band with messages, we can no longer + * ignore messages with no 'body' */ diff --git a/pkgs/applications/networking/instant-messengers/freetalk/default.nix b/pkgs/applications/networking/instant-messengers/freetalk/default.nix new file mode 100644 index 00000000000..cdbc4233cf4 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/freetalk/default.nix @@ -0,0 +1,51 @@ +x@{builderDefsPackage + , guile, pkgconfig, glib, loudmouth, gmp, libidn, readline, libtool + , libunwind, ncurses + , ...}: +builderDefsPackage +(a : +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ + []; + + buildInputs = map (n: builtins.getAttr n x) + (builtins.attrNames (builtins.removeAttrs x helperArgNames)); + sourceInfo = rec { + baseName="freetalk"; + version="3.2"; + name="${baseName}-${version}"; + url="mirror://savannah/${baseName}/${name}.tar.gz"; + hash="12dn7yj9k5xsrrjlnma77wzpvsdxjccwla1q0wy3lacl5l2p0jms"; + }; +in +rec { + src = a.fetchurl { + url = sourceInfo.url; + sha256 = sourceInfo.hash; + }; + + inherit (sourceInfo) name version; + inherit buildInputs; + + patches = [./01_callbacks_const_fix.diff]; + + /* doConfigure should be removed if not needed */ + phaseNames = ["doPatch" "doConfigure" "doMakeInstall"]; + + meta = { + description = "Console XMPP client"; + maintainers = with a.lib.maintainers; + [ + raskin + ]; + platforms = with a.lib.platforms; + linux; + license = a.lib.licenses.gpl3Plus; + }; + passthru = { + updateInfo = { + downloadPage = "http://www.gnu.org/software/freetalk/"; + }; + }; +}) x + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7d514b835d..a7789f1fb1f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -632,6 +632,8 @@ let withX11 = true; }; + freetalk = callPackage ../applications/networking/instant-messengers/freetalk {}; + ftgl = callPackage ../development/libraries/ftgl { }; dos2unix = callPackage ../tools/text/dos2unix { };