1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{ bctoolbox
, bzrtp
, cmake
, fetchFromGitLab
, ffmpeg_4
, glew
, gsm
, lib
, libX11
, libXext
, libopus
, libpulseaudio
, libv4l
, libvpx
, ortp
, python3
, qtbase
, qtdeclarative
, speex
, srtp
, stdenv
}:
stdenv.mkDerivation rec {
pname = "mediastreamer2";
version = "5.2.111";
dontWrapQtApps = true;
src = fetchFromGitLab {
domain = "gitlab.linphone.org";
owner = "public";
group = "BC";
repo = pname;
rev = version;
hash = "sha256-Le52tsyzOpepmvb+GOGCPwwTriPUjhYpa6GM+y/6USA=";
};
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
];
nativeBuildInputs = [
cmake
python3
qtbase
qtdeclarative
];
propagatedBuildInputs = [
# Made by BC
bctoolbox
bzrtp
ortp
ffmpeg_4
glew
libX11
libXext
libpulseaudio
libv4l
speex
srtp
# Optional
gsm # GSM audio codec
libopus # Opus audio codec
libvpx # VP8 video codec
];
strictDeps = true;
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
"-DENABLE_UNIT_TESTS=NO" # Do not build test executables
];
NIX_LDFLAGS = "-lXext";
meta = with lib; {
description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications. Part of the Linphone project";
homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ jluttine ];
};
}
|