summary refs log tree commit diff
path: root/pkgs/applications/misc/yate/default.nix
blob: b2f4217afb5f37e13ef959546543626c61a19be4 (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
{ composableDerivation, fetchurl, lib, qt4, openssl, autoconf, automake, pkgconfig }:

let inherit (composableDerivation) edf wwf; in

composableDerivation.composableDerivation {} ( fixed : {
  name = "yate2";

  src = fetchurl {
    url = http://yate.null.ro/tarballs/yate2/yate2.tar.gz;
    sha256 = "1z1rvzcw6449cvczig1dkh6rlp6f8zv649sk0ldz38mwkyd07257";
  };

  # TODO zaptel ? postgres ?
  buildInputs = [ qt4 openssl autoconf automake pkgconfig ];

  # /dev/null is used when linking which is a impure path for the wrapper
  preConfigure =
    ''
      sed -i 's@,/dev/null@@' configure
    ''; 

  # --unresolved-symbols=ignore-in-shared-libs makes ld no longer find --library=yate? Why?
  preBuild =
    ''
      export NIX_LDFLAGS="-L$TMP/yate $NIX_LDFLAGS"
      find . -type f -iname Makefile | xargs sed -i \
        -e 's@-Wl,--unresolved-symbols=ignore-in-shared-libs@@' \
        -e 's@-Wl,--retain-symbols-file@@'
    '';

  meta = { 
    description = "YATE - Yet Another Telephony Engine";
    homepage = http://yate.null.ro/;
    license = ["GPL" "MPL"]; # Yate's license is GPL with an exception for linking with OpenH323 and PWlib (licensed under MPL).
    maintainers = [ lib.maintainers.marcweber ];
    platforms = lib.platforms.linux;
  };

} )