tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
mediastreamer: 2.16.1 -> unstable-2020-03-20
Jaakko Luttinen
5 years ago
d4988c7c
7c5bff54
+95
-40
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
mediastreamer
default.nix
plugins_dir.patch
+81
-20
pkgs/development/libraries/mediastreamer/default.nix
···
1
1
-
{ stdenv, pkgconfig, intltool, alsaLib, libpulseaudio, speex, gsm
2
2
-
, libopus, ffmpeg, libX11, libXv, libGLU, libGL, glew, libtheora, libvpx, SDL, libupnp
3
3
-
, ortp, libv4l, libpcap, srtp, fetchFromGitHub, cmake, bctoolbox, doxygen
4
4
-
, python, libXext, libmatroska, fetchpatch
1
1
+
{ alsaLib
2
2
+
, bctoolbox
3
3
+
, bzrtp
4
4
+
, cmake
5
5
+
, doxygen
6
6
+
, fetchFromGitLab
7
7
+
, fetchpatch
8
8
+
, ffmpeg
9
9
+
, glew
10
10
+
, gsm
11
11
+
, intltool
12
12
+
, libGL
13
13
+
, libGLU
14
14
+
, libX11
15
15
+
, libXext
16
16
+
, libXv
17
17
+
, libmatroska
18
18
+
, libopus
19
19
+
, libpcap
20
20
+
, libpulseaudio
21
21
+
, libtheora
22
22
+
, libupnp
23
23
+
, libv4l
24
24
+
, libvpx
25
25
+
, ortp
26
26
+
, pkgconfig
27
27
+
, python
28
28
+
, SDL
29
29
+
, speex
30
30
+
, srtp
31
31
+
, stdenv
5
32
}:
6
33
7
34
stdenv.mkDerivation rec {
8
35
pname = "mediastreamer2";
9
9
-
version = "2.16.1";
36
36
+
# Using master branch for linphone-desktop caused a chain reaction that many
37
37
+
# of its dependencies needed to use master branch too.
38
38
+
version = "unstable-2020-03-20";
10
39
11
11
-
src = fetchFromGitHub {
12
12
-
owner = "BelledonneCommunications";
40
40
+
src = fetchFromGitLab {
41
41
+
domain = "gitlab.linphone.org";
42
42
+
owner = "public";
43
43
+
group = "BC";
13
44
repo = pname;
14
14
-
rev = version;
15
15
-
sha256 = "02745bzl2r1jqvdqzyv94fjd4w92zr976la4c4nfvsy52waqah7j";
45
45
+
rev = "c5eecb72cb44376d142949051dd0cb7c982608fb";
46
46
+
sha256 = "1vp260jxvjlmrmjdl4p23prg4cjln20a7z6zq8dqvfh4iq3ya033";
16
47
};
17
48
18
49
patches = [
19
19
-
(fetchpatch {
20
20
-
name = "allow-build-without-git.patch";
21
21
-
url = "https://github.com/BelledonneCommunications/mediastreamer2/commit/de3a24b795d7a78e78eab6b974e7ec5abf2259ac.patch";
22
22
-
sha256 = "1zqkrab42n4dha0knfsyj4q0wc229ma125gk9grj67ps7r7ipscy";
23
23
-
})
50
50
+
# Plugins directory is normally fixed during compile time. This patch makes
51
51
+
# it possible to set the plugins directory run time with an environment
52
52
+
# variable MEDIASTREAMER_PLUGINS_DIR. This makes it possible to construct a
53
53
+
# plugin directory with desired plugins and wrap executables so that the
54
54
+
# environment variable points to that directory.
24
55
./plugins_dir.patch
25
56
];
26
57
27
27
-
nativeBuildInputs = [ pkgconfig intltool cmake doxygen python ];
58
58
+
nativeBuildInputs = [
59
59
+
cmake
60
60
+
doxygen
61
61
+
intltool
62
62
+
pkgconfig
63
63
+
python
64
64
+
];
28
65
29
66
propagatedBuildInputs = [
30
30
-
alsaLib libpulseaudio speex gsm libopus
31
31
-
ffmpeg libX11 libXv libGLU libGL glew libtheora libvpx SDL libupnp
32
32
-
ortp libv4l libpcap srtp bctoolbox libXext libmatroska
67
67
+
alsaLib
68
68
+
bctoolbox
69
69
+
bzrtp
70
70
+
ffmpeg
71
71
+
glew
72
72
+
gsm
73
73
+
libGL
74
74
+
libGLU
75
75
+
libX11
76
76
+
libXext
77
77
+
libXv
78
78
+
libmatroska
79
79
+
libopus
80
80
+
libpcap
81
81
+
libpulseaudio
82
82
+
libtheora
83
83
+
libupnp
84
84
+
libv4l
85
85
+
libvpx
86
86
+
ortp
87
87
+
SDL
88
88
+
speex
89
89
+
srtp
33
90
];
91
91
+
92
92
+
# Do not build static libraries
93
93
+
cmakeFlags = [ "-DENABLE_STATIC=NO" ];
34
94
35
95
NIX_CFLAGS_COMPILE = toString [
36
96
"-DGIT_VERSION=\"v${version}\""
···
43
103
44
104
meta = with stdenv.lib; {
45
105
description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications";
46
46
-
homepage = http://www.linphone.org/technical-corner/mediastreamer2;
47
47
-
license = licenses.gpl2;
106
106
+
homepage = "http://www.linphone.org/technical-corner/mediastreamer2";
107
107
+
license = licenses.gpl3;
48
108
platforms = platforms.linux;
109
109
+
maintainers = with maintainers; [ jluttine ];
49
110
};
50
111
}
+14
-20
pkgs/development/libraries/mediastreamer/plugins_dir.patch
···
1
1
-
diff -uNr mediastreamer2/src/base/msfactory.c mediastreamer2-new/src/base/msfactory.c
2
2
-
--- a/src/base/msfactory.c 2015-05-13 16:53:49.801113249 +0200
3
3
-
+++ b/src/base/msfactory.c 2015-08-26 21:35:44.994724647 +0200
4
4
-
@@ -630,12 +630,18 @@
1
1
+
diff --git a/src/base/msfactory.c b/src/base/msfactory.c
2
2
+
index 14f868e3..2e3445a1 100644
3
3
+
--- a/src/base/msfactory.c
4
4
+
+++ b/src/base/msfactory.c
5
5
+
@@ -770,7 +770,12 @@ void ms_factory_uninit_plugins(MSFactory *factory){
5
6
}
6
7
7
8
void ms_factory_init_plugins(MSFactory *obj) {
9
9
+
- if (obj->plugins_dir == NULL) {
8
10
+ char *package_plugins_dir;
9
9
-
if (obj->plugins_dir == NULL) {
10
10
-
+ package_plugins_dir=getenv("MEDIASTREAMER_PLUGINS_DIR");
11
11
-
+ if (package_plugins_dir!=NULL){
12
12
-
+ obj->plugins_dir = ms_strdup(package_plugins_dir);
13
13
-
+ } else {
14
14
-
#ifdef PACKAGE_PLUGINS_DIR
15
15
-
- obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR);
16
16
-
+ obj->plugins_dir = ms_strdup(PACKAGE_PLUGINS_DIR);
17
17
-
#else
18
18
-
- obj->plugins_dir = ms_strdup("");
19
19
-
+ obj->plugins_dir = ms_strdup("");
20
20
-
#endif
21
21
-
+ }
22
22
-
}
23
23
-
if (strlen(obj->plugins_dir) > 0) {
24
24
-
ms_message("Loading ms plugins from [%s]",obj->plugins_dir);
11
11
+
+ // Force plugin dir from environment variable if set
12
12
+
+ package_plugins_dir = getenv("MEDIASTREAMER_PLUGINS_DIR");
13
13
+
+ if (package_plugins_dir != NULL) {
14
14
+
+ ms_factory_set_plugins_dir(obj, package_plugins_dir);
15
15
+
+ } else if (obj->plugins_dir == NULL) {
16
16
+
#ifdef __APPLE__
17
17
+
char *dir = getPluginsDir();
18
18
+
if (dir != NULL) {