linphone: 3.12.0 -> unstable-2020-03-06
This commit is contained in:
parent
1e51592037
commit
8b2abbbcb5
@ -1,61 +1,239 @@
|
|||||||
{ stdenv, intltool, pkgconfig, readline, openldap, cyrus_sasl, libupnp
|
{ bcg729
|
||||||
, zlib, libxml2, gtk2, libnotify, speex, ffmpeg, libX11, libsoup, udev
|
, bctoolbox
|
||||||
, ortp, mediastreamer, sqlite, belle-sip, libosip, libexosip, bzrtp
|
, bcunit
|
||||||
, mediastreamer-openh264, bctoolbox, makeWrapper, fetchFromGitHub, cmake
|
, belcard
|
||||||
, libmatroska, bcunit, doxygen, gdk-pixbuf, glib, cairo, pango, mbedtls
|
, belle-sip
|
||||||
, python, graphviz, belcard, bcg729
|
, belr
|
||||||
, withGui ? true
|
, bzrtp
|
||||||
|
, cairo
|
||||||
|
, cmake
|
||||||
|
, cyrus_sasl
|
||||||
|
, fetchFromGitLab
|
||||||
|
, fetchurl
|
||||||
|
, ffmpeg
|
||||||
|
, gdk-pixbuf
|
||||||
|
, glib
|
||||||
|
, gnused
|
||||||
|
, graphviz
|
||||||
|
, gtk2
|
||||||
|
, intltool
|
||||||
|
, lib
|
||||||
|
, libexosip
|
||||||
|
, liblinphone
|
||||||
|
, libmatroska
|
||||||
|
, libnotify
|
||||||
|
, libosip
|
||||||
|
, libsoup
|
||||||
|
, libupnp
|
||||||
|
, libX11
|
||||||
|
, libxml2
|
||||||
|
, makeWrapper
|
||||||
|
, mbedtls
|
||||||
|
, mediastreamer
|
||||||
|
, mediastreamer-openh264
|
||||||
|
, mkDerivation
|
||||||
|
, openldap
|
||||||
|
, ortp
|
||||||
|
, pango
|
||||||
|
, pkgconfig
|
||||||
|
, python
|
||||||
|
, qtbase
|
||||||
|
, qtgraphicaleffects
|
||||||
|
, qtquickcontrols2
|
||||||
|
, qttranslations
|
||||||
|
, readline
|
||||||
|
, speex
|
||||||
|
, sqlite
|
||||||
|
, stdenv
|
||||||
|
, udev
|
||||||
|
, zlib
|
||||||
|
# For Minizip 2.2.7:
|
||||||
|
, fetchFromGitHub
|
||||||
|
, libbsd
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
# Linphone Desktop requires Minizip 2.2.7. Nixpkgs contains a very old version
|
||||||
|
# from the time when it was part of zlib. The most recent release of Minizip
|
||||||
|
# is currently 2.9.2 but Linphone Desktop didn't work with that. So, even if
|
||||||
|
# we added most recent Minizip version to nixpkgs, probably Minizip 2.2.7 is
|
||||||
|
# only needed here and we shouldn't add this semi-old version to
|
||||||
|
# all-packages.nix. Therefore, just define it here locally.
|
||||||
|
minizip2 = stdenv.mkDerivation rec {
|
||||||
|
pname = "minizip";
|
||||||
|
version = "2.2.7";
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
disabled = stdenv.isAarch32;
|
||||||
pname = "linphone";
|
|
||||||
version = "3.12.0";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "BelledonneCommunications";
|
owner = "nmoinvaz";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0az2ywrpx11sqfb4s4r2v726avcjf4k15bvrqj7xvhz7hdndmh0j";
|
sha256 = "1a88v1gjlflsd17mlrgxh420rpa38q0d17yh9q8j1zzqfrd1azch";
|
||||||
};
|
};
|
||||||
|
|
||||||
cmakeFlags = stdenv.lib.optional withGui [ "-DENABLE_GTK_UI=ON" ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
postPatch = ''
|
cmakeFlags = [
|
||||||
touch coreapi/liblinphone_gitversion.h
|
"-DBUILD_SHARED_LIBS=YES"
|
||||||
'';
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
readline openldap cyrus_sasl libupnp zlib libxml2 gtk2 libnotify speex ffmpeg libX11
|
zlib
|
||||||
mbedtls libsoup udev ortp mediastreamer sqlite belle-sip libosip libexosip
|
libbsd # required in 2.2.7 but not in 2.9.2?
|
||||||
bctoolbox libmatroska gdk-pixbuf glib cairo pango bzrtp belcard bcg729
|
];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Compression library implementing the deflate compression method found in gzip and PKZIP";
|
||||||
|
homepage = "https://github.com/nmoinvaz/minizip";
|
||||||
|
license = licenses.zlib;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
mkDerivation rec {
|
||||||
|
pname = "linphone-desktop";
|
||||||
|
# Latest release is 4.1.1 old and doesn't build with the latest releases of
|
||||||
|
# some of the dependencies so let's use the latest commit.
|
||||||
|
version = "unstable-2020-03-06";
|
||||||
|
|
||||||
|
src = fetchFromGitLab {
|
||||||
|
domain = "gitlab.linphone.org";
|
||||||
|
owner = "public";
|
||||||
|
group = "BC";
|
||||||
|
repo = pname;
|
||||||
|
rev = "971997e162558d37051f89c9c34bbc240135f704";
|
||||||
|
sha256 = "02ji4r8bpcm2kyisn9d3054m026l33g2574i1ag1cmb2dz2p8i1c";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Without this patch, the build fails with:
|
||||||
|
#
|
||||||
|
# No rule to make target
|
||||||
|
# 'minizip_OUTPUT/nix/store/...linphone-desktop.../lib/libminizip.so',
|
||||||
|
#
|
||||||
|
# So, the makefile tries to use a full absolute path to the library but does
|
||||||
|
# it incorrectly. As we have installed Minizip properly, it's sufficient to
|
||||||
|
# just use "minizip" and the library is found automatically. If this patched
|
||||||
|
# target_link_libraries line was removed entirely, the build would fail at the
|
||||||
|
# very end when linking minizip.
|
||||||
|
patches = [
|
||||||
|
./fix_minizip_linking.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
# See: https://gitlab.linphone.org/BC/public/linphone-desktop/issues/21
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/app/AppController.cpp \
|
||||||
|
--replace "LINPHONE_QT_GIT_VERSION" "\"${version}\""
|
||||||
|
'';
|
||||||
|
|
||||||
|
# TODO: After linphone-desktop and liblinphone split into separate packages,
|
||||||
|
# there might be some build inputs here that aren't needed for
|
||||||
|
# linphone-desktop.
|
||||||
|
buildInputs = [
|
||||||
|
bcg729
|
||||||
|
bctoolbox
|
||||||
|
belcard
|
||||||
|
belle-sip
|
||||||
|
belr
|
||||||
|
bzrtp
|
||||||
|
cairo
|
||||||
|
cyrus_sasl
|
||||||
|
ffmpeg
|
||||||
|
gdk-pixbuf
|
||||||
|
glib
|
||||||
|
gtk2
|
||||||
|
libX11
|
||||||
|
libexosip
|
||||||
|
liblinphone
|
||||||
|
libmatroska
|
||||||
|
libnotify
|
||||||
|
libosip
|
||||||
|
libsoup
|
||||||
|
libupnp
|
||||||
|
libxml2
|
||||||
|
mbedtls
|
||||||
|
mediastreamer
|
||||||
|
mediastreamer-openh264
|
||||||
|
minizip2
|
||||||
|
openldap
|
||||||
|
ortp
|
||||||
|
pango
|
||||||
|
qtbase
|
||||||
|
qtgraphicaleffects
|
||||||
|
qtquickcontrols2
|
||||||
|
qttranslations
|
||||||
|
readline
|
||||||
|
speex
|
||||||
|
sqlite
|
||||||
|
udev
|
||||||
|
zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
intltool pkgconfig makeWrapper cmake bcunit doxygen graphviz
|
bcunit
|
||||||
(python.withPackages (ps: [ ps.pystache ps.six ]))
|
cmake
|
||||||
|
gnused
|
||||||
|
graphviz
|
||||||
|
intltool
|
||||||
|
makeWrapper
|
||||||
|
pkgconfig
|
||||||
];
|
];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = [
|
cmakeFlags = [
|
||||||
"-Wno-error"
|
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
|
||||||
"-I${glib.dev}/include/glib-2.0"
|
"-DMINIZIP_INCLUDE_DIRS=${minizip2}/include"
|
||||||
"-I${glib.out}/lib/glib-2.0/include"
|
"-DMINIZIP_LIBRARIES=minizip"
|
||||||
"-I${gtk2.dev}/include/gtk-2.0/"
|
|
||||||
"-I${cairo.dev}/include/cairo"
|
|
||||||
"-I${pango.dev}/include/pango-1.0"
|
|
||||||
"-I${gtk2}/lib/gtk-2.0/include"
|
|
||||||
"-DLIBLINPHONE_GIT_VERSION=\"v${version}\""
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
# The default install phase fails because the paths are somehow messed up in
|
||||||
for i in $(cd $out/bin && ls); do
|
# the makefiles. The errors were like:
|
||||||
wrapProgram $out/bin/$i --set MEDIASTREAMER_PLUGINS_DIR ${mediastreamer-openh264}/lib/mediastreamer/plugins
|
#
|
||||||
done
|
# CMake Error at cmake_builder/linphone_package/cmake_install.cmake:49 (file):
|
||||||
|
# file INSTALL cannot find
|
||||||
|
# "/build/linphone-desktop-.../build/linphone-sdk/desktop//nix/store/.../bin":
|
||||||
|
# No such file or directory.
|
||||||
|
#
|
||||||
|
# If someone is able to figure out how to fix that, great. For now, just
|
||||||
|
# trying to pick all the relevant files to the output.
|
||||||
|
#
|
||||||
|
# Also, the exec path in linphone.desktop file remains invalid, pointing to
|
||||||
|
# the build directory, after the whole nix build process. So, let's use sed to
|
||||||
|
# manually fix that path.
|
||||||
|
#
|
||||||
|
# In order to find mediastreamer plugins, mediastreamer package was patched to
|
||||||
|
# support an environment variable pointing to the plugin directory. Set that
|
||||||
|
# environment variable by wrapping the Linphone executable.
|
||||||
|
#
|
||||||
|
# Also, 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. These missing grammar files
|
||||||
|
# were discovered when linphone crashed at startup and it was run with
|
||||||
|
# --verbose flag. Instead of actually copying these files, create symlinks.
|
||||||
|
#
|
||||||
|
# It is quite likely that there are some other files still missing and
|
||||||
|
# Linphone will randomly crash when it tries to access those files. Then,
|
||||||
|
# those just need to be copied manually below.
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp linphone $out/bin/
|
||||||
|
wrapProgram $out/bin/linphone \
|
||||||
|
--set MEDIASTREAMER_PLUGINS_DIR \
|
||||||
|
${mediastreamer-openh264}/lib/mediastreamer/plugins
|
||||||
|
mkdir -p $out/share/applications
|
||||||
|
sed -i "s@/build/.*/OUTPUT/bin@$out/bin@" linphone.desktop
|
||||||
|
cp linphone.desktop $out/share/applications/
|
||||||
|
cp -r ../assets/icons $out/share/
|
||||||
|
mkdir -p $out/share/belr/grammars
|
||||||
|
ln -s ${belcard}/share/belr/grammars/* $out/share/belr/grammars/
|
||||||
|
ln -s ${liblinphone}/share/belr/grammars/* $out/share/belr/grammars/
|
||||||
|
mkdir -p $out/share/linphone
|
||||||
|
ln -s ${liblinphone}/share/linphone/* $out/share/linphone/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with lib; {
|
||||||
homepage = https://www.linphone.org/;
|
homepage = https://www.linphone.org/;
|
||||||
description = "Open source SIP phone for voice/video calls and instant messaging";
|
description = "Open source SIP phone for voice/video calls and instant messaging";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ jluttine ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 3ee77441..18ea5c27 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -517,7 +517,7 @@ else()
|
||||||
|
target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
||||||
|
execute_process(COMMAND install_name_tool -id "@executable_path/../Frameworks/libminizip.dylib" "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.dylib")
|
||||||
|
elseif(NOT WIN32)
|
||||||
|
- target_link_libraries(${TARGET_NAME} "${MINIZIP_OUTPUT_DIR}/${CMAKE_INSTALL_LIBDIR}/libminizip.so")
|
||||||
|
+ target_link_libraries(${TARGET_NAME} "minizip")
|
||||||
|
endif()
|
||||||
|
endif()#If (LinphoneCxx_FOUND AND Minizip_FOUND)
|
||||||
|
endif()#If (LinphoneCxx_FOUND)
|
@ -20566,7 +20566,7 @@ in
|
|||||||
|
|
||||||
links2 = callPackage ../applications/networking/browsers/links2 { };
|
links2 = callPackage ../applications/networking/browsers/links2 { };
|
||||||
|
|
||||||
linphone = callPackage ../applications/networking/instant-messengers/linphone { };
|
linphone = libsForQt5.callPackage ../applications/networking/instant-messengers/linphone { };
|
||||||
|
|
||||||
linuxsampler = callPackage ../applications/audio/linuxsampler { };
|
linuxsampler = callPackage ../applications/audio/linuxsampler { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user