2024-06-24 18:47:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libbsd
|
|
|
|
, libevent
|
|
|
|
, libjpeg
|
|
|
|
, libdrm
|
|
|
|
, pkg-config
|
|
|
|
, janus-gateway
|
|
|
|
, glib
|
|
|
|
, alsa-lib
|
|
|
|
, speex
|
|
|
|
, jansson
|
|
|
|
, libopus
|
|
|
|
, withJanus ? true
|
|
|
|
}:
|
2021-06-04 09:07:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ustreamer";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "6.12";
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pikvm";
|
|
|
|
repo = "ustreamer";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-iaCgPHgklk7tbhJhQmyjKggb1bMWBD+Zurgfk9sCQ3E=";
|
2021-06-04 09:07:49 +00:00
|
|
|
};
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
buildInputs = [
|
|
|
|
libbsd
|
|
|
|
libevent
|
|
|
|
libjpeg
|
|
|
|
libdrm
|
|
|
|
] ++ lib.optionals withJanus [
|
|
|
|
janus-gateway
|
|
|
|
glib
|
|
|
|
alsa-lib
|
|
|
|
jansson
|
|
|
|
speex
|
|
|
|
libopus
|
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"WITH_V4P=1"
|
2024-06-24 18:47:55 +00:00
|
|
|
] ++ lib.optionals withJanus [
|
|
|
|
"WITH_JANUS=1"
|
|
|
|
# Workaround issues with Janus C Headers
|
|
|
|
# https://github.com/pikvm/ustreamer/blob/793f24c4/docs/h264.md#fixing-janus-c-headers
|
|
|
|
"CFLAGS=-I${lib.getDev janus-gateway}/include/janus"
|
2024-06-05 15:53:02 +00:00
|
|
|
];
|
2021-06-04 09:07:49 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
enableParallelBuilding = true;
|
2021-06-04 09:07:49 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/pikvm/ustreamer";
|
|
|
|
description = "Lightweight and fast MJPG-HTTP streamer";
|
|
|
|
longDescription = ''
|
|
|
|
µStreamer is a lightweight and very quick server to stream MJPG video from
|
|
|
|
any V4L2 device to the net. All new browsers have native support of this
|
|
|
|
video format, as well as most video players such as mplayer, VLC etc.
|
|
|
|
µStreamer is a part of the Pi-KVM project designed to stream VGA and HDMI
|
|
|
|
screencast hardware data with the highest resolution and FPS possible.
|
|
|
|
'';
|
|
|
|
license = licenses.gpl3Plus;
|
2024-06-24 18:47:55 +00:00
|
|
|
maintainers = with maintainers; [ tfc matthewcroughan ];
|
2021-06-04 09:07:49 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|