diff options
Diffstat (limited to 'pkgs/applications/networking/instant-messengers')
9 files changed, 118 insertions, 154 deletions
diff --git a/pkgs/applications/networking/instant-messengers/gotktrix/default.nix b/pkgs/applications/networking/instant-messengers/gotktrix/default.nix index bd0da749e0961..d0f9f3d9e52ea 100644 --- a/pkgs/applications/networking/instant-messengers/gotktrix/default.nix +++ b/pkgs/applications/networking/instant-messengers/gotktrix/default.nix @@ -10,16 +10,16 @@ buildGoModule rec { pname = "gotktrix"; - version = "0.1.3"; + version = "0.1.4"; src = fetchFromGitHub { owner = "diamondburned"; repo = pname; rev = "v${version}"; - sha256 = "sha256-/UDXqN7FnFvbiXp3pID1WbNfCuKDsMrFQvL1101xxOo="; + sha256 = "sha256-ZaE7L43fA9L5WbTAsBiIxlwYgjl1hMrtfrraAROz+7k="; }; - vendorSha256 = "sha256-xA2DW4v6aT4fEW2WSa96oRr5Yrb2HoR054V1+BiWSvk="; + vendorSha256 = "sha256-k6T44aH1NogyrbUnflfEHkp0zpOOH1YFly/X2kwbMzs="; buildInputs = [ gtk4 diff --git a/pkgs/applications/networking/instant-messengers/jami/client-qt.nix b/pkgs/applications/networking/instant-messengers/jami/client-qt.nix index 74bfbc600689e..840606bf19a92 100644 --- a/pkgs/applications/networking/instant-messengers/jami/client-qt.nix +++ b/pkgs/applications/networking/instant-messengers/jami/client-qt.nix @@ -9,6 +9,8 @@ , python3 , qttools # for translations , wrapQtAppsHook +, ffmpeg-jami +, jami-daemon , libnotify , qt5compat , qtbase @@ -19,7 +21,7 @@ , qtsvg , qtwebengine , qtwebchannel -, jami-libclient +, withWebengine ? false }: stdenv.mkDerivation { @@ -42,9 +44,10 @@ stdenv.mkDerivation { ]; buildInputs = [ - jami-libclient - networkmanager + ffmpeg-jami + jami-daemon libnotify + networkmanager qtbase qt5compat qrencode @@ -53,9 +56,17 @@ stdenv.mkDerivation { qtmultimedia qtsvg qtwebchannel + ] ++ lib.optionals withWebengine [ qtwebengine ]; + cmakeFlags = [ + "-DRING_BUILD_DIR=${jami-daemon}/include" + "-DRING_XML_INTERFACES_DIR=${jami-daemon}/share/dbus-1/interfaces" + ] ++ lib.optionals (!withWebengine) [ + "-DWITH_WEBENGINE=false" + ]; + qtWrapperArgs = [ # With wayland the titlebar is not themed and the wmclass is wrong. "--set-default QT_QPA_PLATFORM xcb" diff --git a/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_args_common b/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_args_common index 9376a38b18749..0aac24e24bb67 100644 --- a/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_args_common +++ b/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_args_common @@ -19,6 +19,9 @@ --disable-muxers --enable-muxer=rtp --enable-muxer=g722 +--enable-muxer=g723_1 +--enable-muxer=g726 +--enable-muxer=g726le --enable-muxer=h263 --enable-muxer=h264 --enable-muxer=hevc @@ -43,6 +46,9 @@ --enable-demuxer=wav --enable-demuxer=ac3 --enable-demuxer=g722 +--enable-demuxer=g723_1 +--enable-demuxer=g726 +--enable-demuxer=g726le --enable-demuxer=pcm_mulaw --enable-demuxer=pcm_alaw --enable-demuxer=pcm_s16be @@ -59,6 +65,13 @@ --enable-parser=opus --enable-encoder=adpcm_g722 --enable-decoder=adpcm_g722 +--enable-encoder=adpcm_g726 +--enable-decoder=adpcm_g726 +--enable-encoder=adpcm_g726le +--enable-decoder=adpcm_g726le +--enable-decoder=g729 +--enable-encoder=g723_1 +--enable-decoder=g723_1 --enable-encoder=rawvideo --enable-decoder=rawvideo --enable-encoder=libx264 diff --git a/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_patches b/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_patches index 2422192c09f52..28f884e66769d 100644 --- a/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_patches +++ b/pkgs/applications/networking/instant-messengers/jami/config/ffmpeg_patches @@ -2,5 +2,6 @@ remove-mjpeg-log.patch change-RTCP-ratio.patch rtp_ext_abs_send_time.patch libopusdec-enable-FEC.patch -libopusenc-enable-FEC.patch +libopusenc-reload-packet-loss-at-encode.patch +ios-disable-b-frames.patch screen-sharing-x11-fix.patch diff --git a/pkgs/applications/networking/instant-messengers/jami/daemon.nix b/pkgs/applications/networking/instant-messengers/jami/daemon.nix index f23b22022ebbd..131ca7b913c06 100644 --- a/pkgs/applications/networking/instant-messengers/jami/daemon.nix +++ b/pkgs/applications/networking/instant-messengers/jami/daemon.nix @@ -2,86 +2,38 @@ , version , jami-meta , stdenv -, lib -, fetchFromGitHub , autoreconfHook , pkg-config , perl # for pod2man -, ffmpeg_4 -, pjsip , alsa-lib , asio , dbus , dbus_cplusplus +, ffmpeg-jami , fmt , gmp +, gnutls +, http-parser +, jack +, jsoncpp , libarchive , libgit2 , libnatpmp -, secp256k1 -, openssl -, opendht -, speex -, webrtc-audio-processing -, jsoncpp -, gnutls -, zlib -, libyamlcpp , libpulseaudio -, jack -, udev , libupnp +, libyamlcpp , msgpack +, opendht-jami +, openssl +, pjsip-jami , restinio -, http-parser +, secp256k1 +, speex +, udev +, webrtc-audio-processing +, zlib }: -let - readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file)); - - ffmpeg-jami = ffmpeg_4.overrideAttrs (old: - let - patch-src = src + "/daemon/contrib/src/ffmpeg/"; - in - { - patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches)); - configureFlags = old.configureFlags - ++ (readLinesToList ./config/ffmpeg_args_common) - ++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux) - ++ lib.optionals stdenv.hostPlatform.isx86 (readLinesToList ./config/ffmpeg_args_x86); - outputs = [ "out" "doc" ]; - meta = old.meta // { - # undefined reference to `ff_nlmeans_init_aarch64' - broken = stdenv.isAarch64; - }; - }); - - pjsip-jami = pjsip.overrideAttrs (old: - let - patch-src = src + "/daemon/contrib/src/pjproject/"; - in - rec { - version = "e1f389d0b905011e0cb62cbdf7a8b37fc1bcde1a"; - - src = fetchFromGitHub { - owner = "savoirfairelinux"; - repo = "pjproject"; - rev = version; - sha256 = "sha256-6t+3b7pvvwi+VD05vxtujabEJmWmJTAeyD/Dapav10Y="; - }; - - patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches)); - - configureFlags = (readLinesToList ./config/pjsip_args_common) - ++ lib.optionals stdenv.isLinux (readLinesToList ./config/pjsip_args_linux); - }); - - opendht-jami = opendht.override { - enableProxyServerAndClient = true; - enablePushNotifications = true; - }; - -in stdenv.mkDerivation { pname = "jami-daemon"; inherit src version; @@ -102,26 +54,25 @@ stdenv.mkDerivation { ffmpeg-jami gmp gnutls + http-parser + jack + jsoncpp libarchive libgit2 libnatpmp + libpulseaudio + libupnp + libyamlcpp + msgpack opendht-jami + openssl pjsip-jami + restinio secp256k1 - openssl speex + udev webrtc-audio-processing zlib - libyamlcpp - jsoncpp - libpulseaudio - jack - opendht - libupnp - udev - msgpack - restinio - http-parser ]; doCheck = false; # The tests fail to compile due to missing headers. @@ -130,9 +81,6 @@ stdenv.mkDerivation { passthru = { updateScript = ./update.sh; - ffmpeg = ffmpeg-jami; - pjsip = pjsip-jami; - opendht = opendht-jami; }; meta = jami-meta // { diff --git a/pkgs/applications/networking/instant-messengers/jami/default.nix b/pkgs/applications/networking/instant-messengers/jami/default.nix index 32b5a26638988..690f6534e9389 100644 --- a/pkgs/applications/networking/instant-messengers/jami/default.nix +++ b/pkgs/applications/networking/instant-messengers/jami/default.nix @@ -1,24 +1,30 @@ { stdenv , lib , callPackage +, fetchFromGitHub , fetchzip +, ffmpeg_4 +, pjsip +, opendht , jack , udev , qt6Packages }: let - version = "20220503.1550.0f35faa"; + version = "20220726.1515.da8d1da"; src = fetchzip { url = "https://dl.jami.net/release/tarballs/jami_${version}.tar.gz"; - hash = "sha256-iCmsgjgGogNjj1k0sYRqx59ZEwFZcJOeVGBNyBlcy1M="; + hash = "sha256-yK+xo+YpNYmmWyNAE31hiL6HLvDdEFkm8FO6LQmPCL0="; stripRoot = false; postFetch = '' cd $out - mv jami-project/* ./ - rm -r jami-project.rst jami-project client-android client-ios client-macosx client-uwp + mv jami-project/daemon ./ + mv jami-project/client-qt ./ + mv jami-project/COPYING ./ + rm -r jami-project.rst jami-project rm daemon/contrib/tarballs/* ''; }; @@ -30,11 +36,57 @@ let platforms = platforms.linux; maintainers = [ maintainers.linsui ]; }; + + readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file)); in rec { - jami-daemon = callPackage ./daemon.nix { inherit version src udev jack jami-meta; }; + ffmpeg-jami = ffmpeg_4.overrideAttrs (old: + let + patch-src = src + "/daemon/contrib/src/ffmpeg/"; + in + { + patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches)); + configureFlags = old.configureFlags + ++ (readLinesToList ./config/ffmpeg_args_common) + ++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux) + ++ lib.optionals (stdenv.isx86_32 || stdenv.isx86_64) (readLinesToList ./config/ffmpeg_args_x86); + outputs = [ "out" "doc" ]; + meta = old.meta // { + # undefined reference to `ff_nlmeans_init_aarch64' + broken = stdenv.isAarch64; + }; + }); + + pjsip-jami = pjsip.overrideAttrs (old: + let + patch-src = src + "/daemon/contrib/src/pjproject/"; + in + rec { + version = "4af5d666d18837abaac94c8ec6bfc84984dcf1e2"; + + src = fetchFromGitHub { + owner = "savoirfairelinux"; + repo = "pjproject"; + rev = version; + sha256 = "sha256-ENRfQh/HCXqInTV0tu8tGQO7+vTbST6XXpptERXMACE="; + }; - jami-libclient = qt6Packages.callPackage ./libclient.nix { inherit version src jami-meta; }; + patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches)); - jami-client-qt = qt6Packages.callPackage ./client-qt.nix { inherit version src jami-meta; }; + configureFlags = (readLinesToList ./config/pjsip_args_common) + ++ lib.optionals stdenv.isLinux (readLinesToList ./config/pjsip_args_linux); + }); + + opendht-jami = opendht.override { + enableProxyServerAndClient = true; + enablePushNotifications = true; + }; + + jami-daemon = callPackage ./daemon.nix { + inherit version src udev jack jami-meta ffmpeg-jami pjsip-jami opendht-jami; + }; + + jami-client-qt = qt6Packages.callPackage ./client-qt.nix { + inherit version src jami-meta ffmpeg-jami; + }; } diff --git a/pkgs/applications/networking/instant-messengers/jami/libclient-include-path.patch b/pkgs/applications/networking/instant-messengers/jami/libclient-include-path.patch deleted file mode 100644 index 3ae017eb458bd..0000000000000 --- a/pkgs/applications/networking/instant-messengers/jami/libclient-include-path.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git i/CMakeLists.txt w/CMakeLists.txt -index 0ee77dba..767e19df 100644 ---- i/CMakeLists.txt -+++ w/CMakeLists.txt -@@ -635,7 +635,7 @@ if(ENABLE_SHARED) - ) - endif() - --SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include) -+SET(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_FULL_INCLUDEDIR}) - - INSTALL( FILES ${libringclient_LIB_HDRS} ${libringclient_extra_LIB_HDRS} - DESTINATION ${INCLUDE_INSTALL_DIR}/libringclient diff --git a/pkgs/applications/networking/instant-messengers/jami/libclient.nix b/pkgs/applications/networking/instant-messengers/jami/libclient.nix deleted file mode 100644 index d998fe7a0612a..0000000000000 --- a/pkgs/applications/networking/instant-messengers/jami/libclient.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ version -, src -, jami-meta -, stdenv -, lib -, pkg-config -, cmake -, qtbase -, jami-daemon -}: - -stdenv.mkDerivation { - pname = "jami-libclient"; - inherit version src; - - sourceRoot = "source/lrc"; - - nativeBuildInputs = [ - cmake - pkg-config - ]; - - buildInputs = [ - jami-daemon - jami-daemon.ffmpeg - ]; - - patches = [ - # Fix path to include dir when using split outputs - ./libclient-include-path.patch - ]; - - propagatedBuildInputs = [ - qtbase - ]; - outputs = [ "out" "dev" ]; - - cmakeFlags = [ - "-DRING_BUILD_DIR=${jami-daemon}/include" - "-DRING_XML_INTERFACES_DIR=${jami-daemon}/share/dbus-1/interfaces" - ]; - - dontWrapQtApps = true; - - meta = jami-meta // { - description = "The client library" + jami-meta.description; - license = lib.licenses.lgpl21Plus; - }; -} diff --git a/pkgs/applications/networking/instant-messengers/jami/update.sh b/pkgs/applications/networking/instant-messengers/jami/update.sh index ecf14e25ddaf4..abc7728e0703f 100755 --- a/pkgs/applications/networking/instant-messengers/jami/update.sh +++ b/pkgs/applications/networking/instant-messengers/jami/update.sh @@ -9,8 +9,9 @@ cd $jami_dir/../../../../.. # Update src version and hash version=$(curl -s 'https://dl.jami.net/release/tarballs/?C=M;O=D' | sed -n -E 's/^.*jami_([0-9.a-f]+)\.tar\.gz.*$/\1/p' | head -n 1) +echo "Latest version: ${version}" -update-source-version jami-libclient "$version" --file=$jami_dir/default.nix +update-source-version jami-daemon "$version" --file=$jami_dir/default.nix src=$(nix-build --no-out-link -A jami-libclient.src) @@ -20,7 +21,7 @@ mkdir -p $config_dir ffmpeg_rules="${src}/daemon/contrib/src/ffmpeg/rules.mak" # Update FFmpeg patches -ffmpeg_patches=$(sed -n '/.sum-ffmpeg:/,/HAVE_IOS/p' ${ffmpeg_rules} | sed -n -E 's/.*ffmpeg\/(.*patch).*/\1/p') +ffmpeg_patches=$(sed -n '/^ffmpeg:/,/^$/p' ${ffmpeg_rules} | sed -n -E 's/.*ffmpeg\/(.*patch).*/\1/p') echo -e "Patches for FFmpeg:\n${ffmpeg_patches}\n" echo "${ffmpeg_patches}" > "$config_dir/ffmpeg_patches" |