2022-05-18 14:49:53 +00:00
|
|
|
{ bctoolbox
|
2020-04-24 23:36:52 +00:00
|
|
|
, bzrtp
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitLab
|
2024-09-19 14:19:46 +00:00
|
|
|
, fetchpatch2
|
2024-10-11 05:15:48 +00:00
|
|
|
, ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
, glew
|
|
|
|
, gsm
|
2021-04-05 15:23:46 +00:00
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, libopus
|
|
|
|
, libpulseaudio
|
|
|
|
, libv4l
|
|
|
|
, libvpx
|
|
|
|
, ortp
|
2021-04-05 15:23:46 +00:00
|
|
|
, python3
|
2022-04-27 09:35:20 +00:00
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
2020-04-24 23:36:52 +00:00
|
|
|
, speex
|
|
|
|
, srtp
|
2021-04-05 15:23:46 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mediastreamer2";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.2.111";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
dontWrapQtApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.linphone.org";
|
|
|
|
owner = "public";
|
|
|
|
group = "BC";
|
|
|
|
repo = pname;
|
2020-12-09 12:39:15 +00:00
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-Le52tsyzOpepmvb+GOGCPwwTriPUjhYpa6GM+y/6USA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Plugins directory is normally fixed during compile time. This patch makes
|
|
|
|
# it possible to set the plugins directory run time with an environment
|
|
|
|
# variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a
|
|
|
|
# plugin directory with desired plugins and wrap executables so that the
|
|
|
|
# environment variable points to that directory.
|
|
|
|
./plugins_dir.patch
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# Port to ffmpeg 5.0 API
|
|
|
|
(fetchpatch2 {
|
|
|
|
url = "https://salsa.debian.org/pkg-voip-team/linphone-stack/mediastreamer2/-/raw/4e7784802d2eac57dffe210c8c23e696f40ac6ec/debian/patches/ffmpeg_5_0_fixes.patch";
|
|
|
|
hash = "sha256-5ay4iVbx8IOX952HEFaKLBGKLRYUWRntufciApUVhh0=";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2021-04-05 15:23:46 +00:00
|
|
|
python3
|
2022-04-27 09:35:20 +00:00
|
|
|
qtbase
|
|
|
|
qtdeclarative
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
# Made by BC
|
2020-04-24 23:36:52 +00:00
|
|
|
bctoolbox
|
|
|
|
bzrtp
|
2022-04-27 09:35:20 +00:00
|
|
|
ortp
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
ffmpeg
|
2020-04-24 23:36:52 +00:00
|
|
|
glew
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libpulseaudio
|
|
|
|
libv4l
|
|
|
|
speex
|
|
|
|
srtp
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
# Optional
|
|
|
|
gsm # GSM audio codec
|
|
|
|
libopus # Opus audio codec
|
|
|
|
libvpx # VP8 video codec
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_STATIC=NO" # Do not build static libraries
|
|
|
|
"-DENABLE_QT_GL=ON" # Build necessary MSQOGL plugin for Linphone desktop
|
|
|
|
"-DCMAKE_C_FLAGS=-DGIT_VERSION=\"v${version}\""
|
|
|
|
"-DENABLE_STRICT=NO" # Disable -Werror
|
2022-05-18 14:49:53 +00:00
|
|
|
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
NIX_LDFLAGS = "-lXext";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Powerful and lightweight streaming engine specialized for voice/video telephony applications. Part of the Linphone project";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
|
2021-04-05 15:23:46 +00:00
|
|
|
license = licenses.gpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ jluttine ];
|
|
|
|
};
|
|
|
|
}
|