biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / servers / misc / oven-media-engine / default.nix
blobdd7bbc54ea912f04e9b9ce8a4b6d7ce779641d1e
1 { lib, stdenv
2 , fetchFromGitHub
3 , srt
4 , bc
5 , pkg-config
6 , perl
7 , openssl
8 , zlib
9 , ffmpeg
10 , libvpx
11 , libopus
12 , libuuid
13 , srtp
14 , jemalloc
15 , pcre2
16 , hiredis
19 stdenv.mkDerivation rec {
20   pname = "oven-media-engine";
21   version = "0.17.1";
23   src = fetchFromGitHub {
24     owner = "AirenSoft";
25     repo = "OvenMediaEngine";
26     rev = "v${version}";
27     sha256 = "sha256-fYvP1mk32lrnYxWdpI1WqEUxAfHsQH3Ng0JLC/GbjrY=";
28   };
30   patches = [
31     # ffmpeg 7.0 Update: Use new channel layout
32     # https://github.com/AirenSoft/OvenMediaEngine/pull/1626
33     ./support-ffmpeg-7.patch
34   ];
36   makeFlags = [ "release" "CONFIG_LIBRARY_PATHS=" "CONFIG_PKG_PATHS=" "GLOBAL_CC=$(CC)" "GLOBAL_CXX=$(CXX)" "GLOBAL_LD=$(CXX)" "SHELL=${stdenv.shell}" ];
37   enableParallelBuilding = true;
39   nativeBuildInputs = [ bc pkg-config perl ];
40   buildInputs = [ openssl srt zlib ffmpeg libvpx libopus srtp jemalloc pcre2 libuuid hiredis ];
42   preBuild = ''
43     cd src
45     patchShebangs core/colorg++
46     patchShebangs core/colorgcc
47     patchShebangs projects/main/update_git_info.sh
49     sed -i -e '/^CC =/d' -e '/^CXX =/d' -e '/^AR =/d' projects/third_party/pugixml-1.9/scripts/pugixml.make
50   '';
52   installPhase = ''
53     install -Dm0755 bin/RELEASE/OvenMediaEngine $out/bin/OvenMediaEngine
54     install -Dm0644 ../misc/conf_examples/Origin.xml $out/share/examples/origin_conf/Server.xml
55     install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/origin_conf/Logger.xml
56     install -Dm0644 ../misc/conf_examples/Edge.xml $out/share/examples/edge_conf/Server.xml
57     install -Dm0644 ../misc/conf_examples/Logger.xml $out/share/examples/edge_conf/Logger.xml
58   '';
60   meta = with lib; {
61     description = "Open-source streaming video service with sub-second latency";
62     mainProgram = "OvenMediaEngine";
63     homepage    = "https://ovenmediaengine.com";
64     license     = licenses.agpl3Only;
65     maintainers = with maintainers; [ lukegb ];
66     platforms   = platforms.linux;
67   };