2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-07-12 18:31:57 +02:00
|
|
|
, fetchFromGitHub
|
2021-01-07 11:37:28 +01:00
|
|
|
, fetchpatch
|
2020-07-12 18:31:57 +02:00
|
|
|
, srt
|
|
|
|
, bc
|
2021-01-19 07:50:56 +01:00
|
|
|
, pkg-config
|
2020-07-12 18:31:57 +02:00
|
|
|
, perl
|
2021-12-18 02:57:06 +01:00
|
|
|
, openssl_3_0
|
2020-07-12 18:31:57 +02:00
|
|
|
, zlib
|
|
|
|
, ffmpeg
|
|
|
|
, libvpx
|
|
|
|
, libopus
|
2021-12-18 02:57:06 +01:00
|
|
|
, libuuid
|
2020-07-12 18:31:57 +02:00
|
|
|
, srtp
|
|
|
|
, jemalloc
|
2021-01-07 11:37:28 +01:00
|
|
|
, pcre2
|
2020-11-05 15:17:10 +01:00
|
|
|
}:
|
2020-07-12 18:31:57 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "oven-media-engine";
|
2022-02-27 15:41:01 +01:00
|
|
|
version = "0.13.1";
|
2020-07-12 18:31:57 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AirenSoft";
|
|
|
|
repo = "OvenMediaEngine";
|
|
|
|
rev = "v${version}";
|
2022-02-27 15:41:01 +01:00
|
|
|
sha256 = "sha256-oWZ+o19bNR7/QuYTquRa3l7GfRLMEdyPtBUOwb2p3jA=";
|
2020-07-12 18:31:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
makeFlags = "release CONFIG_LIBRARY_PATHS= CONFIG_PKG_PATHS= GLOBAL_CC=$(CC) GLOBAL_CXX=$(CXX) GLOBAL_LD=$(CXX) SHELL=${stdenv.shell}";
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ bc pkg-config perl ];
|
2021-12-18 02:57:06 +01:00
|
|
|
buildInputs = [ openssl_3_0 srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 libuuid ];
|
2020-07-12 18:31:57 +02:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs core/colorg++
|
|
|
|
patchShebangs core/colorgcc
|
|
|
|
patchShebangs projects/main/update_git_info.sh
|
|
|
|
|
|
|
|
sed -i -e '/^CC =/d' -e '/^CXX =/d' -e '/^AR =/d' projects/third_party/pugixml-1.9/scripts/pugixml.make
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm0755 bin/RELEASE/OvenMediaEngine $out/bin/OvenMediaEngine
|
|
|
|
install -Dm0644 ../misc/conf_examples/Origin.xml $out/share/examples/origin_conf/Server.xml
|
|
|
|
install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/origin_conf/Logger.xml
|
|
|
|
install -Dm0644 ../misc/conf_examples/Edge.xml $out/share/examples/edge_conf/Server.xml
|
|
|
|
install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/edge_conf/Logger.xml
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-07-12 18:31:57 +02:00
|
|
|
description = "Open-source streaming video service with sub-second latency";
|
|
|
|
homepage = "https://ovenmediaengine.com";
|
2021-01-07 11:37:28 +01:00
|
|
|
license = licenses.gpl2Only;
|
2020-07-12 18:31:57 +02:00
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|