astroterm: 1.0.4 -> 1.0.6 (#378908)
[NixPkgs.git] / pkgs / by-name / li / liblinphone / package.nix
blobf22403a79cb35f3ec79bfb5544774c39aeac2e1f
2   lib,
3   bc-soci,
4   belcard,
5   belle-sip,
6   cmake,
7   doxygen,
8   fetchFromGitLab,
9   jsoncpp,
10   libxml2,
11   lime,
12   mediastreamer,
13   python3,
14   sqlite,
15   stdenv,
16   xercesc,
17   zxing-cpp,
20 stdenv.mkDerivation rec {
21   pname = "liblinphone";
22   version = "5.2.98";
24   src = fetchFromGitLab {
25     domain = "gitlab.linphone.org";
26     owner = "public";
27     group = "BC";
28     repo = pname;
29     rev = version;
30     hash = "sha256-kQZePMa7MTaSJLEObM8khfSFYLqhlgTcVyKfTPLwKYU=";
31   };
33   patches = [
34     # zxing-cpp 2.0+ requires C++ 17
35     # Manual backport as upstream ran formatters in the meantime
36     ./backport-cpp17.patch
37   ];
39   postPatch = ''
40     substituteInPlace src/CMakeLists.txt \
41       --replace "jsoncpp_object" "jsoncpp" \
42       --replace "jsoncpp_static" "jsoncpp"
43   '';
45   cmakeFlags = [
46     "-DENABLE_STATIC=NO" # Do not build static libraries
47     "-DENABLE_UNIT_TESTS=NO" # Do not build test executables
48     "-DENABLE_STRICT=NO" # Do not build with -Werror
49   ];
51   buildInputs = [
52     # Made by BC
53     belcard
54     belle-sip
55     lime
56     mediastreamer
58     # Vendored by BC
59     bc-soci
61     jsoncpp
62     libxml2
63     sqlite
64     xercesc
65     zxing-cpp
66   ];
68   nativeBuildInputs = [
69     cmake
70     doxygen
71     (python3.withPackages (ps: [
72       ps.pystache
73       ps.six
74     ]))
75   ];
77   strictDeps = true;
79   # Some grammar files needed to be copied too from some dependencies. I suppose
80   # if one define a dependency in such a way that its share directory is found,
81   # then this copying would be unnecessary. Instead of actually copying these
82   # files, create a symlink.
83   postInstall = ''
84     mkdir -p $out/share/belr/grammars
85     ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
86   '';
88   meta = with lib; {
89     homepage = "https://www.linphone.org/technical-corner/liblinphone";
90     description = "Library for SIP calls and instant messaging";
91     license = licenses.gpl3Plus;
92     platforms = platforms.linux;
93     maintainers = with maintainers; [ jluttine ];
94   };