2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2020-10-16 11:03:31 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
2023-08-10 20:43:26 +02:00
|
|
|
, nixosTests
|
2020-10-16 11:03:31 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2023-04-11 17:02:48 +02:00
|
|
|
pname = "mediamtx";
|
2023-08-10 20:14:57 +02:00
|
|
|
version = "1.0.0";
|
2020-10-16 11:03:31 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-08-10 20:14:57 +02:00
|
|
|
owner = "bluenviron";
|
2020-10-16 11:03:31 +02:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-08-10 20:14:57 +02:00
|
|
|
hash = "sha256-SKNCQu5uRAxKpQbceha50K4ShV7mE0VI1PGFVAlWq4Q=";
|
2020-10-16 11:03:31 +02:00
|
|
|
};
|
|
|
|
|
2023-08-10 20:14:57 +02:00
|
|
|
vendorHash = "sha256-mPnAlFHCJKXOdmKP3Ff7cQJMStKtu4Sa7iYuot5/IKE=";
|
2020-10-16 11:03:31 +02:00
|
|
|
|
|
|
|
# Tests need docker
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-08-26 08:45:51 +02:00
|
|
|
ldflags = [
|
2023-05-22 23:19:41 +02:00
|
|
|
"-X github.com/bluenviron/mediamtx/internal/core.version=v${version}"
|
2020-10-16 11:03:31 +02:00
|
|
|
];
|
|
|
|
|
2023-08-10 20:43:26 +02:00
|
|
|
passthru.tests = { inherit (nixosTests) mediamtx; };
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-10-16 11:03:31 +02:00
|
|
|
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;
|
2023-08-10 20:14:57 +02:00
|
|
|
mainProgram = "mediamtx";
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2020-10-16 11:03:31 +02:00
|
|
|
};
|
|
|
|
}
|