2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, bc-soci
|
2020-04-24 23:36:52 +00:00
|
|
|
, belcard
|
|
|
|
, belle-sip
|
|
|
|
, cmake
|
|
|
|
, doxygen
|
|
|
|
, fetchFromGitLab
|
2022-04-27 09:35:20 +00:00
|
|
|
, jsoncpp
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxml2
|
|
|
|
, lime
|
|
|
|
, mediastreamer
|
2021-04-05 15:23:46 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, sqlite
|
2022-04-27 09:35:20 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, xercesc
|
2023-02-02 18:25:31 +00:00
|
|
|
, zxing-cpp
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2020-12-09 12:39:15 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "liblinphone";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "5.2.98";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.linphone.org";
|
|
|
|
owner = "public";
|
|
|
|
group = "BC";
|
|
|
|
repo = pname;
|
2020-12-09 12:39:15 +00:00
|
|
|
rev = version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-kQZePMa7MTaSJLEObM8khfSFYLqhlgTcVyKfTPLwKYU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
patches = [
|
|
|
|
# zxing-cpp 2.0+ requires C++ 17
|
|
|
|
# Manual backport as upstream ran formatters in the meantime
|
|
|
|
./backport-cpp17.patch
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/CMakeLists.txt \
|
|
|
|
--replace "jsoncpp_object" "jsoncpp" \
|
|
|
|
--replace "jsoncpp_static" "jsoncpp"
|
|
|
|
'';
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_STATIC=NO" # Do not build static libraries
|
|
|
|
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
|
2023-07-15 17:15:38 +00:00
|
|
|
"-DENABLE_STRICT=NO" # Do not build with -Werror
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
# Made by BC
|
2020-04-24 23:36:52 +00:00
|
|
|
belcard
|
|
|
|
belle-sip
|
2022-04-27 09:35:20 +00:00
|
|
|
lime
|
|
|
|
mediastreamer
|
|
|
|
|
|
|
|
# Vendored by BC
|
|
|
|
bc-soci
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
jsoncpp
|
2020-04-24 23:36:52 +00:00
|
|
|
libxml2
|
2022-05-18 14:49:53 +00:00
|
|
|
(python3.withPackages (ps: [ ps.pystache ps.six ]))
|
2020-04-24 23:36:52 +00:00
|
|
|
sqlite
|
|
|
|
xercesc
|
2023-02-02 18:25:31 +00:00
|
|
|
zxing-cpp
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2020-12-09 12:39:15 +00:00
|
|
|
doxygen
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Some grammar files needed to be copied too from some dependencies. I suppose
|
|
|
|
# if one define a dependency in such a way that its share directory is found,
|
|
|
|
# then this copying would be unnecessary. Instead of actually copying these
|
|
|
|
# files, create a symlink.
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/belr/grammars
|
|
|
|
ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.linphone.org/technical-corner/liblinphone";
|
|
|
|
description = "Library for SIP calls and instant messaging";
|
2020-12-29 15:07:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|