nixpkgs/pkgs/servers/mediamtx/default.nix
2023-08-10 20:43:26 +02:00

39 lines
846 B
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, nixosTests
}:
buildGoModule rec {
pname = "mediamtx";
version = "1.0.0";
src = fetchFromGitHub {
owner = "bluenviron";
repo = pname;
rev = "v${version}";
hash = "sha256-SKNCQu5uRAxKpQbceha50K4ShV7mE0VI1PGFVAlWq4Q=";
};
vendorHash = "sha256-mPnAlFHCJKXOdmKP3Ff7cQJMStKtu4Sa7iYuot5/IKE=";
# Tests need docker
doCheck = false;
ldflags = [
"-X github.com/bluenviron/mediamtx/internal/core.version=v${version}"
];
passthru.tests = { inherit (nixosTests) mediamtx; };
meta = with lib; {
description =
"Ready-to-use RTSP server and RTSP proxy that allows to read and publish video and audio streams"
;
inherit (src.meta) homepage;
license = licenses.mit;
mainProgram = "mediamtx";
maintainers = with maintainers; [ fpletz ];
};
}