2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-07-18 16:06:22 +00:00
|
|
|
, fetchFromGitHub
|
2021-01-05 17:05:55 +00:00
|
|
|
, fetchpatch
|
2020-07-18 16:06:22 +00:00
|
|
|
, srt
|
|
|
|
, bc
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-07-18 16:06:22 +00:00
|
|
|
, perl
|
2022-09-14 18:05:37 +00:00
|
|
|
, openssl
|
2020-07-18 16:06:22 +00:00
|
|
|
, zlib
|
|
|
|
, ffmpeg
|
|
|
|
, libvpx
|
|
|
|
, libopus
|
2022-01-19 23:45:15 +00:00
|
|
|
, libuuid
|
2020-07-18 16:06:22 +00:00
|
|
|
, srtp
|
|
|
|
, jemalloc
|
2021-01-05 17:05:55 +00:00
|
|
|
, pcre2
|
2022-09-30 11:47:45 +00:00
|
|
|
, hiredis
|
2020-11-30 08:33:03 +00:00
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "oven-media-engine";
|
2023-03-08 16:32:21 +00:00
|
|
|
version = "0.15.1";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AirenSoft";
|
|
|
|
repo = "OvenMediaEngine";
|
|
|
|
rev = "v${version}";
|
2023-03-08 16:32:21 +00:00
|
|
|
sha256 = "sha256-Ob+0Ak0ELyHrZfeCiACX2IHsp+6jE//iqPoW6je6GfQ=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "source/src";
|
2022-10-30 15:09:59 +00:00
|
|
|
makeFlags = [ "release" "CONFIG_LIBRARY_PATHS=" "CONFIG_PKG_PATHS=" "GLOBAL_CC=$(CC)" "GLOBAL_CXX=$(CXX)" "GLOBAL_LD=$(CXX)" "SHELL=${stdenv.shell}" ];
|
2020-07-18 16:06:22 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ bc pkg-config perl ];
|
2022-09-30 11:47:45 +00:00
|
|
|
buildInputs = [ openssl srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 libuuid hiredis ];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
patchShebangs core/colorg++
|
|
|
|
patchShebangs core/colorgcc
|
|
|
|
patchShebangs projects/main/update_git_info.sh
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
sed -i -e 's/const AVOutputFormat /AVOutputFormat /g' \
|
|
|
|
projects/modules/mpegts/mpegts_writer.cpp \
|
|
|
|
projects/modules/file/file_writer.cpp \
|
|
|
|
projects/modules/rtmp/rtmp_writer.cpp
|
2020-07-18 16:06:22 +00:00
|
|
|
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-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "Open-source streaming video service with sub-second latency";
|
|
|
|
homepage = "https://ovenmediaengine.com";
|
2022-04-15 01:41:22 +00:00
|
|
|
license = licenses.agpl3Only;
|
2020-07-18 16:06:22 +00:00
|
|
|
maintainers = with maintainers; [ lukegb ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|