summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/carrier/2.5.0.nix
blob: d29ec7ab8d3b1d8763dfff1bb551481a0cb67464 (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
args @ { fetchurl, stdenv, pkgconfig, perl, perlXMLParser, libxml2, openssl, nss, nspr
, gtkspell, aspell, gettext, ncurses, avahi, dbus, dbus_glib, python
, libtool, automake, autoconf, gstreamer
, gtk, glib
, libXScrnSaver, scrnsaverproto, libX11, xproto, kbproto, ... }: with args;
/*
  arguments: all buildInputs
  optional: purple2Source: purple-2 source - place to copy libpurple from
    (to use a fresher pidgin build)
*/
let
  externalPurple2 = (lib.attrByPath ["purple2Source"] null args) != null;
in
rec {
  src = fetchurl {
    url = mirror://sourceforge/funpidgin/carrier-2.5.0.tar.bz2;
    sha256 = "0m80s7hnvz5vc2dy3xiy1zfb6incmb7p28zahzxdif2vz44riz28";
  };

  buildInputs = [gtkspell aspell
    gstreamer startupnotification
    libxml2 openssl nss nspr
    libXScrnSaver ncurses scrnsaverproto
    libX11 xproto kbproto GConf avahi
    dbus dbus_glib glib python
    autoconf libtool automake];

  propagatedBuildInputs = [
    pkgconfig gtk perl perlXMLParser gettext
  ];

  configureFlags="--with-nspr-includes=${nspr.dev}/include/nspr"
    + " --with-nspr-libs=${nspr.out}/lib --with-nss-includes=${nss.dev}/include/nss"
    + " --with-nss-libs=${nss.out}/lib --with-ncurses-headers=${ncurses.dev}/include"
    + " --enable-screensaver --disable-meanwhile --disable-nm --disable-tcl";

  preBuild = fullDepEntry (''
    export echo=echo
  '') [];

  /* doConfigure should be specified separately */
  phaseNames = ["doConfigure" "preBuild" "doMakeInstall"]
    ++ (lib.optional externalPurple2 "postInstall")
  ;

  name = "carrier-2.5.0";
  meta = {
    description = "PidginIM GUI fork with user-friendly development model";
    homepage = http://funpidgin.sf.net;
  };
} // (if externalPurple2 then {
  postInstall = fullDepEntry (''
      mkdir -p $out/lib/purple-2
      cp ${args.purple2Source}/lib/purple-2/* $out/lib/purple-2/
    '') ["minInit" "defEnsureDir"]; }
  else {})