11 url = "https://cdn.jsdelivr.net/npm/hls.js@v1.5.17/dist/hls.min.js";
12 hash = "sha256-SEBU6M0D0/bReB+39AK9wxjYpMUn+TOpXGJOJ8yalHA=";
17 # check for hls.js version updates in internal/servers/hls/hlsjsdownloader/VERSION
20 src = fetchFromGitHub {
24 hash = "sha256-2qFJujfnlpmiOAmDBPl3hrbbHDOZOWFy8Yh2VOU0FEI=";
27 vendorHash = "sha256-6MHtYrHZF3Oo53MV1Di0wGw9Xk+2CMei2XeoI0OcKsQ=";
30 cp ${hlsJs} internal/servers/hls/hls.min.js
31 echo "v${version}" > internal/core/VERSION
33 # disable binary-only rpi camera support
34 substituteInPlace internal/staticsources/rpicamera/camera_disabled.go \
35 --replace-fail '!linux || (!arm && !arm64)' 'linux'
36 substituteInPlace internal/staticsources/rpicamera/{component,camera,params_serialize,pipe}.go \
37 --replace-fail '(linux && arm) || (linux && arm64)' 'linux && !linux'
38 substituteInPlace internal/staticsources/rpicamera/component_32.go \
39 --replace-fail 'linux && arm' 'linux && !linux'
40 substituteInPlace internal/staticsources/rpicamera/component_64.go \
41 --replace-fail 'linux && arm64' 'linux && !linux'
44 subPackages = [ "." ];
50 inherit (nixosTests) mediamtx;
54 description = "SRT, WebRTC, RTSP, RTMP, LL-HLS media server and media proxy";
55 inherit (src.meta) homepage;
56 license = licenses.mit;
57 mainProgram = "mediamtx";
58 maintainers = with maintainers; [ fpletz ];