about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix108
1 files changed, 35 insertions, 73 deletions
diff --git a/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix b/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
index 47ee2a68a51a..71299566dd87 100644
--- a/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
+++ b/nixpkgs/pkgs/applications/networking/instant-messengers/linphone/default.nix
@@ -1,57 +1,39 @@
-{ bcg729
-, bctoolbox
-, bcunit
+{ bctoolbox
 , belcard
 , belle-sip
 , belr
-, 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
 , minizip2
 , mkDerivation
-, openldap
-, ortp
-, pango
-, pkg-config
-, qtbase
 , qtgraphicaleffects
 , qtquickcontrols2
 , qttranslations
-, readline
-, speex
-, sqlite
-
-, udev
-, 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 +41,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,59 +61,31 @@ mkDerivation rec {
   # there might be some build inputs here that aren't needed for
   # linphone-desktop.
   buildInputs = [
-    bcg729
+    # Made by BC
     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 = [
-    bcunit
     cmake
-    gnused
-    graphviz
-    intltool
-    makeWrapper
-    pkg-config
   ];
 
   cmakeFlags = [
-    "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
     "-DMINIZIP_INCLUDE_DIRS=${minizip2}/include"
     "-DMINIZIP_LIBRARIES=minizip"
+
+    # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
+    "-DCMAKE_SKIP_BUILD_RPATH=ON"
   ];
 
   # The default install phase fails because the paths are somehow messed up in
@@ -162,18 +117,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; {