From bafc9b9ff83d7ee15181400d55d0008930f1d000 Mon Sep 17 00:00:00 2001 From: Lorenz Brun Date: Fri, 28 Jan 2022 18:57:13 +0100 Subject: linphone: 4.2.5 -> 4.4.1 Co-authored-by: Thibault Lemaire Co-authored-by: Austin Butler --- .../instant-messengers/linphone/default.nix | 51 +++++++++++++++++----- 1 file changed, 40 insertions(+), 11 deletions(-) (limited to 'pkgs/applications/networking/instant-messengers/linphone/default.nix') diff --git a/pkgs/applications/networking/instant-messengers/linphone/default.nix b/pkgs/applications/networking/instant-messengers/linphone/default.nix index 47ee2a68a51a4..5234c95bd6a87 100644 --- a/pkgs/applications/networking/instant-messengers/linphone/default.nix +++ b/pkgs/applications/networking/instant-messengers/linphone/default.nix @@ -49,9 +49,25 @@ , zlib }: +# How to update Linphone? (The Qt desktop app) +# +# Belledonne Communications (BC), the company making Linphone, has split the +# project into several sub-projects that they maintain, plus some third-party +# dependencies that they also extend with commits of their own, specific to +# Linphone and not (yet?) upstreamed. +# +# All of this is organised in a Software Development Kit (SDK) meta-repository +# with git submodules to pin all those repositories into a coherent whole. +# +# The Linphone Qt desktop app uses this SDK as submodule as well. +# +# So, in order to update the desktop app to a new release, one has to follow +# the submodule chain and update the corresponding derivations here, in nixpkgs, +# with the corresponding version number (or commit hash) + mkDerivation rec { pname = "linphone-desktop"; - version = "4.2.5"; + version = "4.4.1"; src = fetchFromGitLab { domain = "gitlab.linphone.org"; @@ -59,12 +75,13 @@ mkDerivation rec { group = "BC"; repo = pname; rev = version; - sha256 = "1gq4l9p21rbrcksa7fbkzn9fzbbynqmn6ni6lhnvzk359sb1xvbz"; + sha256 = "sha256-BBOTyKMZikkxMJSmzAuChVHpVeCvbAimn1K3REGbqEg="; }; patches = [ ./do-not-build-linphone-sdk.patch ./remove-bc_compute_full_version-usage.patch + ./no-store-path-in-autostart.patch ]; # See: https://gitlab.linphone.org/BC/public/linphone-desktop/issues/21 @@ -78,12 +95,21 @@ mkDerivation rec { # there might be some build inputs here that aren't needed for # linphone-desktop. buildInputs = [ + # Made by BC bcg729 bctoolbox belcard belle-sip belr bzrtp + liblinphone + mediastreamer + mediastreamer-openh264 + ortp + + # Vendored by BC but we use upstream, might cause problems + libmatroska + cairo cyrus_sasl ffmpeg @@ -92,19 +118,14 @@ mkDerivation rec { gtk2 libX11 libexosip - liblinphone - libmatroska libnotify libosip libsoup libupnp libxml2 mbedtls - mediastreamer - mediastreamer-openh264 minizip2 openldap - ortp pango qtbase qtgraphicaleffects @@ -118,7 +139,9 @@ mkDerivation rec { ]; nativeBuildInputs = [ + # Made by BC bcunit + cmake gnused graphviz @@ -128,7 +151,6 @@ mkDerivation rec { ]; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DMINIZIP_INCLUDE_DIRS=${minizip2}/include" "-DMINIZIP_LIBRARIES=minizip" ]; @@ -162,18 +184,25 @@ mkDerivation rec { # 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 + mkdir -p $out/bin $out/lib cp linphone-app/linphone $out/bin/ + cp linphone-app/libapp-plugin.so $out/lib/ + mkdir -p $out/lib/mediastreamer/plugins + ln -s ${mediastreamer-openh264}/lib/mediastreamer/plugins/* $out/lib/mediastreamer/plugins/ + ln -s ${mediastreamer}/lib/mediastreamer/plugins/* $out/lib/mediastreamer/plugins/ wrapProgram $out/bin/linphone \ --set MEDIASTREAMER_PLUGINS_DIR \ - ${mediastreamer-openh264}/lib/mediastreamer/plugins + $out/lib/mediastreamer/plugins mkdir -p $out/share/applications cp linphone-app/linphone.desktop $out/share/applications/ - cp -r ../linphone-app/assets/icons $out/share/ + mkdir -p $out/share/icons/hicolor/scalable/apps + cp ../linphone-app/assets/images/linphone_logo.svg $out/share/icons/hicolor/scalable/apps/linphone.svg mkdir -p $out/share/belr/grammars ln -s ${liblinphone}/share/belr/grammars/* $out/share/belr/grammars/ + ln -s ${belle-sip}/share/belr/grammars/* $out/share/belr/grammars/ mkdir -p $out/share/linphone ln -s ${liblinphone}/share/linphone/* $out/share/linphone/ + ln -s ${liblinphone}/share/sounds $out/share/sounds ''; meta = with lib; { -- cgit 1.4.1