2020-03-27 08:31:14 +00:00
|
|
|
{ autoreconfHook
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitLab
|
|
|
|
, fetchpatch
|
|
|
|
, mediastreamer
|
|
|
|
, openh264
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2021-01-21 17:00:13 +00:00
|
|
|
, lib, stdenv
|
2016-09-06 15:40:10 +00:00
|
|
|
}:
|
2015-08-26 20:16:28 +00:00
|
|
|
|
2019-11-23 17:48:14 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-03-27 08:31:14 +00:00
|
|
|
pname = "msopenh264";
|
|
|
|
# Using master branch for linphone-desktop caused a chain reaction that many
|
|
|
|
# of its dependencies needed to use master branch too.
|
|
|
|
version = "unstable-2020-03-03";
|
2015-08-26 20:16:28 +00:00
|
|
|
|
2020-03-27 08:31:14 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.linphone.org";
|
|
|
|
owner = "public";
|
|
|
|
group = "BC";
|
|
|
|
repo = pname;
|
|
|
|
rev = "2c3abf52824ad23a4caae7565ef158ef91767704";
|
|
|
|
sha256 = "140hs5lzpshzswvl39klcypankq3v2qck41696j22my7s4wsa0hr";
|
2015-08-26 20:16:28 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook cmake pkg-config ];
|
2017-09-05 21:26:13 +00:00
|
|
|
buildInputs = [ mediastreamer openh264 ];
|
2015-08-26 20:16:28 +00:00
|
|
|
|
2020-03-27 08:31:14 +00:00
|
|
|
# Do not build static libraries
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DENABLE_STATIC=NO"
|
|
|
|
"-DCMAKE_SKIP_INSTALL_RPATH=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
# CMAKE_INSTALL_PREFIX has no effect so let's install manually. See:
|
|
|
|
# https://gitlab.linphone.org/BC/public/msopenh264/issues/1
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/lib/mediastreamer/plugins
|
|
|
|
cp src/libmsopenh264.so $out/lib/mediastreamer/plugins/
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2015-08-26 20:16:28 +00:00
|
|
|
description = "H.264 encoder/decoder plugin for mediastreamer2";
|
2019-11-23 17:48:14 +00:00
|
|
|
homepage = "https://www.linphone.org/technical-corner/mediastreamer2";
|
2015-08-26 20:16:28 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2020-03-27 08:31:14 +00:00
|
|
|
maintainers = with maintainers; [ jluttine ];
|
2015-08-26 20:16:28 +00:00
|
|
|
};
|
|
|
|
}
|