diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix | 73 |
1 files changed, 54 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix index 6d940362a21a..ccfbd892a97d 100644 --- a/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, substituteAll , meson , ninja , gettext @@ -19,9 +20,9 @@ , libkate , lrdf , ladspaH +, lcms2 , libnice , webrtc-audio-processing -, webrtc-audio-processing_1 , lilv , lv2 , serd @@ -37,7 +38,6 @@ , bluez , chromaprint , curl -, directfb , fdk_aac , flite , gsm @@ -55,7 +55,7 @@ , neon , openal , opencv4 -, openexr +, openexr_3 , openh264 , libopenmpt , pango @@ -77,36 +77,54 @@ , mjpegtools , libGLU , libGL +, addOpenGLRunpath +, gtk3 , libintl -, libgme +, game-music-emu , openssl , x265 , libxml2 , srt , vo-aacenc , libfreeaptx +, zxing-cpp +, usrsctp , VideoToolbox , AudioToolbox , AVFoundation +, Cocoa , CoreMedia , CoreVideo , Foundation , MediaToolbox , enableGplPlugins ? true , bluezSupport ? stdenv.isLinux +# Causes every application using GstDeviceMonitor to send mDNS queries every 2 seconds +, microdnsSupport ? false +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc +, guiSupport ? true, directfb }: stdenv.mkDerivation rec { pname = "gst-plugins-bad"; - version = "1.20.1"; + version = "1.22.3"; outputs = [ "out" "dev" ]; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0j1q89dl8369djibc5p27lyj8y8p4maplmdzlryvrw0ib77w5lq9"; + hash = "sha256-4XmP7i2GEn8GN0gcYH+YMpO/D9garXClx7RyBa82Idg="; }; + patches = [ + # Add fallback paths for nvidia userspace libraries + (substituteAll { + src = ./fix-paths.patch; + inherit (addOpenGLRunpath) driverLink; + }) + ]; + nativeBuildInputs = [ meson ninja @@ -116,6 +134,8 @@ stdenv.mkDerivation rec { gettext gstreamer # for gst-tester-1.0 gobject-introspection + ] ++ lib.optionals enableDocumentation [ + hotdoc ] ++ lib.optionals stdenv.isLinux [ wayland # for wayland-scanner ]; @@ -125,6 +145,7 @@ stdenv.mkDerivation rec { gst-plugins-base orc json-glib + lcms2 ldacbt libass libkate @@ -132,7 +153,6 @@ stdenv.mkDerivation rec { #webrtc-audio-processing_1 # required by isac libbs2b libmodplug - libmicrodns openjpeg libopenmpt libopus @@ -145,13 +165,14 @@ stdenv.mkDerivation rec { libde265 libdvdnav libdvdread + libnice qrencode libsndfile libusb1 neon openal opencv4 - openexr + openexr_3 openh264 rtmpdump pango @@ -162,15 +183,15 @@ stdenv.mkDerivation rec { libwebp xvidcore gnutls - libGL - libGLU - libgme + game-music-emu openssl libxml2 libintl srt vo-aacenc libfreeaptx + zxing-cpp + usrsctp ] ++ lib.optionals enableZbar [ zbar ] ++ lib.optionals faacSupport [ @@ -182,6 +203,8 @@ stdenv.mkDerivation rec { x265 ] ++ lib.optionals bluezSupport [ bluez + ] ++ lib.optionals microdnsSupport [ + libmicrodns ] ++ lib.optionals stdenv.isLinux [ libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs wayland @@ -194,11 +217,9 @@ stdenv.mkDerivation rec { mjpegtools chromaprint - directfb flite libdrm libgudev - libnice sbc spandsp @@ -212,6 +233,13 @@ stdenv.mkDerivation rec { serd sord sratom + + libGL + libGLU + ] ++ lib.optionals guiSupport [ + gtk3 + ] ++ lib.optionals (stdenv.isLinux && guiSupport) [ + directfb ] ++ lib.optionals stdenv.isDarwin [ # For unknown reasons the order is important, e.g. if # VideoToolbox is last, we get: @@ -219,6 +247,7 @@ stdenv.mkDerivation rec { VideoToolbox AudioToolbox AVFoundation + Cocoa CoreMedia CoreVideo Foundation @@ -227,10 +256,11 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users - "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing "-Dglib-asserts=disabled" # asserts should be disabled on stable releases + "-Damfcodec=disabled" # Windows-only "-Davtp=disabled" + "-Ddirectshow=disabled" # Windows-only "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development" "-Dzbar=${if enableZbar then "enabled" else "disabled"}" "-Dfaac=${if faacSupport then "enabled" else "disabled"}" @@ -250,7 +280,6 @@ stdenv.mkDerivation rec { "-Dmusepack=disabled" "-Dopenni2=disabled" # not packaged in nixpkgs as of writing "-Dopensles=disabled" # not packaged in nixpkgs as of writing - "-Dsctp=disabled" # required `usrsctp` library not packaged in nixpkgs as of writing "-Dsvthevcenc=disabled" # required `SvtHevcEnc` library not packaged in nixpkgs as of writing "-Dteletext=disabled" # required `zvbi` library not packaged in nixpkgs as of writing "-Dtinyalsa=disabled" # not packaged in nixpkgs as of writing @@ -259,19 +288,23 @@ stdenv.mkDerivation rec { "-Dwasapi=disabled" # not packaged in nixpkgs as of writing / no Windows support "-Dwasapi2=disabled" # not packaged in nixpkgs as of writing / no Windows support "-Dwpe=disabled" # required `wpe-webkit` library not packaged in nixpkgs as of writing - "-Dzxing=disabled" # required `zxing-cpp` library not packaged in nixpkgs as of writing "-Disac=disabled" # depends on `webrtc-audio-coding-1` not compatible with 0.3 "-Dgs=disabled" # depends on `google-cloud-cpp` "-Donnx=disabled" # depends on `libonnxruntime` not packaged in nixpkgs as of writing "-Dopenaptx=enabled" # since gstreamer-1.20.1 `libfreeaptx` is supported for circumventing the dubious license conflict with `libopenaptx` + "-Dmicrodns=${if microdnsSupport then "enabled" else "disabled"}" "-Dbluez=${if bluezSupport then "enabled" else "disabled"}" + (lib.mesonEnable "doc" enableDocumentation) ] ++ lib.optionals (!stdenv.isLinux) [ + "-Ddoc=disabled" # needs gstcuda to be enabled which is Linux-only + "-Dnvcodec=disabled" # Linux-only "-Dva=disabled" # see comment on `libva` in `buildInputs` + ] ++ lib.optionals (!stdenv.isLinux || !guiSupport) [ + "-Ddirectfb=disabled" ] ++ lib.optionals stdenv.isDarwin [ "-Dchromaprint=disabled" - "-Ddirectfb=disabled" "-Dflite=disabled" "-Dkms=disabled" # renders to libdrm output "-Dlv2=disabled" @@ -282,11 +315,13 @@ stdenv.mkDerivation rec { "-Duvch264=disabled" # requires gudev "-Dv4l2codecs=disabled" # requires gudev "-Dladspa=disabled" # requires lrdf - "-Dwebrtc=disabled" # requires libnice, which as of writing doesn't work on Darwin in nixpkgs "-Dwildmidi=disabled" # see dependencies above + ] ++ lib.optionals (!stdenv.isLinux || !stdenv.isx86_64) [ + "-Dqsv=disabled" # Linux (and Windows) x86 only ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ "-Dgl=disabled" ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [ + "-Dgtk3=disabled" # Wayland-based GTK sink "-Dwayland=disabled" ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, @@ -329,6 +364,6 @@ stdenv.mkDerivation rec { ''; license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus; platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ matthewbauer ]; + maintainers = with maintainers; [ matthewbauer lilyinstarlight ]; }; } |