Files
nixpkgs/pkgs/by-name/us/ustreamer/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

93 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
libbsd,
libevent,
libjpeg,
libdrm,
pkg-config,
janus-gateway,
glib,
alsa-lib,
speex,
jansson,
libopus,
nixosTests,
systemdLibs,
which,
withSystemd ? true,
withJanus ? true,
}:
stdenv.mkDerivation rec {
pname = "ustreamer";
version = "6.39";
src = fetchFromGitHub {
owner = "pikvm";
repo = "ustreamer";
tag = "v${version}";
hash = "sha256-Lc0cwzt7rGfbJSLdZTDVdmkub6Z2KnTz5PRpEvtHsKM=";
};
buildInputs = [
libbsd
libevent
libjpeg
libdrm
]
++ lib.optionals withSystemd [
systemdLibs
]
++ lib.optionals withJanus [
janus-gateway
glib
alsa-lib
jansson
speex
libopus
];
nativeBuildInputs = [
pkg-config
which
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"WITH_V4P=1"
]
++ lib.optionals withSystemd [
"WITH_SYSTEMD=1"
]
++ 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"
];
enableParallelBuilding = true;
passthru.tests = { inherit (nixosTests) ustreamer; };
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;
maintainers = with maintainers; [
tfc
matthewcroughan
];
platforms = platforms.linux;
mainProgram = "ustreamer";
};
}