summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/pidgin/default.nix
blob: 7e9e41ea0bfc413e798392bbd0199a2ae88798e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv, fetchurl, makeWrapper, pkgconfig, gtk, gtkspell, aspell
, gstreamer, gst_plugins_base, gst_plugins_good, startupnotification, gettext
, perl, perlXMLParser, libxml2, nss, nspr, farsight2
, libXScrnSaver, ncurses, avahi, dbus, dbus_glib, intltool, libidn
, lib, python, libICE, libXext, libSM
, openssl ? null
, gnutls ? null
, libgcrypt ? null
}:

# FIXME: clean the mess around choosing the SSL library (nss by default)

stdenv.mkDerivation rec {
  name = "pidgin-${version}";
  majorVersion = "2";
  version = "${majorVersion}.10.11";

  src = fetchurl {
    url = "mirror://sourceforge/pidgin/${name}.tar.bz2";
    sha256 = "01s0q30qrjlzj7kkz6f8lvrwsdd55a9yjh2xjjwyyxzw849j3bpj";
  };

  inherit nss ncurses;

  nativeBuildInputs = [ makeWrapper ];

  buildInputs = [
    gtkspell aspell
    gstreamer gst_plugins_base gst_plugins_good startupnotification
    libxml2 nss nspr farsight2
    libXScrnSaver ncurses python
    avahi dbus dbus_glib intltool libidn
    libICE libXext libSM
  ]
  ++ (lib.optional (openssl != null) openssl)
  ++ (lib.optional (gnutls != null) gnutls)
  ++ (lib.optional (libgcrypt != null) libgcrypt);

  propagatedBuildInputs = [
    pkgconfig gtk perl perlXMLParser gettext
  ];

  patches = [./pidgin-makefile.patch ./add-search-path.patch ];

  configureFlags = [
    "--with-nspr-includes=${nspr}/include/nspr"
    "--with-nspr-libs=${nspr}/lib"
    "--with-nss-includes=${nss}/include/nss"
    "--with-nss-libs=${nss}/lib"
    "--with-ncurses-headers=${ncurses}/include"
    "--disable-meanwhile"
    "--disable-nm"
    "--disable-tcl"
  ]
  ++ (lib.optionals (gnutls != null) ["--enable-gnutls=yes" "--enable-nss=no"]);

  enableParallelBuilding = true;

  postInstall = ''
    wrapProgram $out/bin/pidgin \
      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
  '';

  meta = with stdenv.lib; {
    description = "Multi-protocol instant messaging client";
    homepage = http://pidgin.im;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.vcunat ];
  };
}