nixpkgs/pkgs/servers/misc/oven-media-engine/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
2.0 KiB
Nix
Raw Normal View History

{ lib, stdenv
2020-07-12 17:31:57 +01:00
, fetchFromGitHub
, fetchpatch
2020-07-12 17:31:57 +01:00
, srt
, bc
, pkg-config
2020-07-12 17:31:57 +01:00
, perl
, openssl
2020-07-12 17:31:57 +01:00
, zlib
, ffmpeg_4
2020-07-12 17:31:57 +01:00
, libvpx
, libopus
, libuuid
2020-07-12 17:31:57 +01:00
, srtp
, jemalloc
, pcre2
, hiredis
2020-11-05 14:17:10 +00:00
}:
2020-07-12 17:31:57 +01:00
stdenv.mkDerivation rec {
pname = "oven-media-engine";
2023-08-02 05:44:00 +01:00
version = "0.15.14";
2020-07-12 17:31:57 +01:00
src = fetchFromGitHub {
owner = "AirenSoft";
repo = "OvenMediaEngine";
rev = "v${version}";
2023-08-02 05:44:00 +01:00
sha256 = "sha256-pLLnk0FXJ6gb0WSdWGEzJSEbKdOpjdWECIRzrHvi8HQ=";
2020-07-12 17:31:57 +01:00
};
sourceRoot = "${src.name}/src";
makeFlags = [ "release" "CONFIG_LIBRARY_PATHS=" "CONFIG_PKG_PATHS=" "GLOBAL_CC=$(CC)" "GLOBAL_CXX=$(CXX)" "GLOBAL_LD=$(CXX)" "SHELL=${stdenv.shell}" ];
2020-07-12 17:31:57 +01:00
enableParallelBuilding = true;
nativeBuildInputs = [ bc pkg-config perl ];
buildInputs = [ openssl srt zlib ffmpeg_4 libvpx libopus srtp jemalloc pcre2 libuuid hiredis ];
2020-07-12 17:31:57 +01:00
preBuild = ''
patchShebangs core/colorg++
patchShebangs core/colorgcc
patchShebangs projects/main/update_git_info.sh
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-12 17:31:57 +01: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
'';
meta = with lib; {
2020-07-12 17:31:57 +01:00
description = "Open-source streaming video service with sub-second latency";
homepage = "https://ovenmediaengine.com";
license = licenses.agpl3Only;
2020-07-12 17:31:57 +01:00
maintainers = with maintainers; [ lukegb ];
2023-05-20 15:48:53 +01:00
platforms = platforms.linux;
2020-07-12 17:31:57 +01:00
};
}