jami: 20220503.1550.0f35faa -> 20220726.1515.da8d1da

This commit is contained in:
linsui 2022-08-01 17:45:44 +08:00
parent 6afa4b8e62
commit 14c9d821ea
10 changed files with 118 additions and 153 deletions

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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
pjsip-jami
secp256k1
openssl
pjsip-jami
restinio
secp256k1
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 // {

View file

@ -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;
};
});
jami-libclient = qt6Packages.callPackage ./libclient.nix { inherit version src jami-meta; };
pjsip-jami = pjsip.overrideAttrs (old:
let
patch-src = src + "/daemon/contrib/src/pjproject/";
in
rec {
version = "4af5d666d18837abaac94c8ec6bfc84984dcf1e2";
jami-client-qt = qt6Packages.callPackage ./client-qt.nix { inherit version src jami-meta; };
src = fetchFromGitHub {
owner = "savoirfairelinux";
repo = "pjproject";
rev = version;
sha256 = "sha256-ENRfQh/HCXqInTV0tu8tGQO7+vTbST6XXpptERXMACE=";
};
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;
};
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;
};
}

View file

@ -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

View file

@ -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;
};
}

View file

@ -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"

View file

@ -630,6 +630,7 @@ mapAliases ({
jack2Full = jack2; # moved from top-level 2021-03-14
jami-client-gnome = throw "jami-client-gnome has been removed: abandoned upstream"; # Added 2022-05-15
jami-libclient = throw "jami-libclient has been removed: moved into jami-qt"; # Added 2022-07-29
jamomacore = throw "jamomacore has been removed: abandoned upstream"; # Added 2020-11-21
jbidwatcher = throw "jbidwatcher was discontinued in march 2021"; # Added 2021-03-15
jbuilder = throw "'jbuilder' has been renamed to/replaced by 'dune_1'"; # Converted to throw 2022-02-22

View file

@ -36204,7 +36204,7 @@ with pkgs;
udev = systemdMinimal;
jack = libjack2;
};
inherit (jami) jami-daemon jami-libclient jami-client-qt;
inherit (jami) jami-daemon jami-client-qt;
jitsi-meet-electron = callPackage ../applications/networking/instant-messengers/jitsi-meet-electron {
electron = electron_17;