summary refs log tree commit diff
path: root/pkgs/applications/networking/ekiga/default.nix
blob: d411c3b0f57c8e4a4dc5179d0d009bcae301e68d (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
x@{builderDefsPackage
  , cyrus_sasl, gettext, openldap, ptlib, opal, GConf, libXv, rarian, intltool
  , perl, perlXMLParser, evolution_data_server, gnome_doc_utils, avahi
  , libsigcxx, gtk, dbus_glib, libnotify, libXext, xextproto, automake
  , autoconf, pkgconfig, libxml2, videoproto, unixODBC, db4, nspr, nss, zlib
  , libXrandr, randrproto, which, libxslt, libtasn1
  , ...}:
builderDefsPackage
(a :  
let 
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    [];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    baseName="ekiga";
    baseVersion="3.2";
    patchlevel="7";
    version="${baseVersion}.${patchlevel}";
    name="${baseName}-${version}";
    url="mirror://gnome/sources/${baseName}/${baseVersion}/${name}.tar.bz2";
    hash="13zxwfqhp7pisadx0hq50qwnj6d8r4dldvbs1ngydbwfnq4i6npj";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["setVars" "doConfigure" "doMakeInstall"];
  configureFlags = [
    "--with-ldap-dir=${openldap}"
    "--with-libsasl2-dir=${cyrus_sasl}"
  ];

  setVars = a.noDepEntry (''
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${opal}/include/opal"
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$(echo ${evolution_data_server}/include/evolution-*)"
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libxml2}/include/libxml2"
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${GConf}/include/gconf/2"

    export NIX_LDFLAGS="$NIX_LDFLAGS -lopal"
    for i in ${evolution_data_server}/lib/lib*.so; do
      file="$(basename "$i" .so)"
      bn="''${file#lib}"
      export NIX_LDFLAGS="$NIX_LDFLAGS -l$bn"
    done
  '');

  meta = {
    description = "Ekiga SIP client";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      linux;
  };
  passthru = {
    updateInfo = {
      downloadPage = "mirror://gnome/sources/ekiga";
    };
  };
}) x