1{ bctoolbox
2, belcard
3, belle-sip
4, belr
5, cmake
6, doxygen
7, fetchFromGitLab
8, jsoncpp
9, libxml2
10, lime
11, mediastreamer
12, python3
13, bc-soci
14, sqlite
15, lib
16, stdenv
17, xercesc
18}:
19
20stdenv.mkDerivation rec {
21 pname = "liblinphone";
22 version = "5.1.22";
23
24 src = fetchFromGitLab {
25 domain = "gitlab.linphone.org";
26 owner = "public";
27 group = "BC";
28 repo = pname;
29 rev = version;
30 sha256 = "sha256-hTyp/fUA1+7J1MtqX33kH8Vn1XNjx51Wy5REvrpdJTY=";
31 };
32
33 patches = [ ./use-normal-jsoncpp.patch ];
34
35 cmakeFlags = [
36 "-DENABLE_STATIC=NO" # Do not build static libraries
37 "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
38 ];
39
40 buildInputs = [
41 # Made by BC
42 belcard
43 belle-sip
44 lime
45 mediastreamer
46
47 # Vendored by BC
48 bc-soci
49
50 jsoncpp
51 libxml2
52 (python3.withPackages (ps: [ ps.pystache ps.six ]))
53 sqlite
54 xercesc
55 ];
56
57 nativeBuildInputs = [
58 cmake
59 doxygen
60 ];
61
62 strictDeps = true;
63
64 # Some grammar files needed to be copied too from some dependencies. I suppose
65 # if one define a dependency in such a way that its share directory is found,
66 # then this copying would be unnecessary. Instead of actually copying these
67 # files, create a symlink.
68 postInstall = ''
69 mkdir -p $out/share/belr/grammars
70 ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
71 '';
72
73 meta = with lib; {
74 homepage = "https://www.linphone.org/technical-corner/liblinphone";
75 description = "Library for SIP calls and instant messaging";
76 license = licenses.gpl3Plus;
77 platforms = platforms.linux;
78 maintainers = with maintainers; [ jluttine ];
79 };
80}