nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix
2026-06-22 13:07:29 +02:00

83 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchurl,
meson,
ninja,
pkg-config,
python3,
gettext,
gobject-introspection,
gst-plugins-base,
gst-plugins-bad,
# Checks meson.is_cross_build(), so even canExecute isn't enough.
enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform,
hotdoc,
directoryListingUpdater,
apple-sdk_gstreamer,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "gst-rtsp-server";
version = "1.28.4";
outputs = [
"out"
"dev"
];
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/gst-rtsp-server/gst-rtsp-server-${finalAttrs.version}.tar.xz";
hash = "sha256-v7Z4BUK/DUAnNiMq6ubFoblDxEV3W/QDBby4bKcHBaA=";
};
nativeBuildInputs = [
meson
ninja
gettext
gobject-introspection
pkg-config
python3
]
++ lib.optionals enableDocumentation [
hotdoc
];
buildInputs = [
gst-plugins-base
gst-plugins-bad
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_gstreamer
];
mesonFlags = [
"-Dglib_debug=disabled" # cast checks should be disabled on stable releases
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
(lib.mesonEnable "doc" enableDocumentation)
];
postPatch = ''
patchShebangs \
scripts/extract-release-date-from-doap-file.py
'';
preFixup = ''
moveToOutput "lib/gstreamer-1.0/pkgconfig" "$dev"
'';
passthru = {
updateScript = directoryListingUpdater { odd-unstable = true; };
};
meta = {
description = "GStreamer RTSP server";
homepage = "https://gstreamer.freedesktop.org";
longDescription = ''
A library on top of GStreamer for building an RTSP server.
'';
license = lib.licenses.lgpl2Plus;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ bkchr ];
};
})