about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/twinkle/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/twinkle/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/twinkle/default.nix33
1 files changed, 22 insertions, 11 deletions
diff --git a/pkgs/applications/networking/instant-messengers/twinkle/default.nix b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
index 060c844980bb2..830e4715f159b 100644
--- a/pkgs/applications/networking/instant-messengers/twinkle/default.nix
+++ b/pkgs/applications/networking/instant-messengers/twinkle/default.nix
@@ -1,29 +1,40 @@
-{ stdenv, fetchurl, pkgconfig, commoncpp2, ccrtp, openssl, boost
+{ stdenv, fetchurl, pkgconfig, autoreconfHook, commoncpp2, ccrtp, openssl, boost
 , libsndfile, libxml2, libjpeg, readline, qt3, perl, file
 , alsaLib, speex, libzrtpcpp, xorg }:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   name = "twinkle-1.4.2";
 
   src = fetchurl {
-    url = http://www.xs4all.nl/~mfnboer/twinkle/download/twinkle-1.4.2.tar.gz;
+    url = "http://www.xs4all.nl/~mfnboer/twinkle/download/${name}.tar.gz";
     sha256 = "19c9gqam78srsgv0463g7lfnv4mn5lvbxx3zl87bnm0vmk3qcxl0";
   };
 
+  patches = [ # all from Debian
+    ./newer-libccrtp.diff
+    ./libgsm.patch
+    ./localetime_r_conflict.diff
+    ./boost_regex.patch # modified not to use "-mt" suffix
+  ];
+
   configureFlags = "--with-extra-includes=${libjpeg}/include";
 
   buildInputs =
-    [ pkgconfig commoncpp2 ccrtp openssl boost libsndfile
+    [ pkgconfig autoreconfHook commoncpp2 openssl boost libsndfile
       libxml2 libjpeg readline qt3 perl file
       # optional ? :
-      alsaLib
-      speex libzrtpcpp xorg.libX11 xorg.libXaw xorg.libICE xorg.libXext
+      alsaLib speex
+      libzrtpcpp xorg.libX11 xorg.libXaw xorg.libICE xorg.libXext
     ];
 
-  meta = {
-    homepage = http://www.xs4all.nl/~mfnboer/twinkle/index.html;
-    license = "GPL";
-    maintainers = [ stdenv.lib.maintainers.marcweber ];
-    platforms = stdenv.lib.platforms.linux;
+  NIX_CFLAGS_LINK = "-Wl,--as-needed -lboost_regex -lasound -lzrtpcpp -lspeex -lspeexdsp";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.twinklephone.com/;
+    license = licenses.gpl2Plus;
+    maintainers = [ lib.maintainers.marcweber ];
+    platforms = platforms.linux;
   };
 }