diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/gstreamer')
13 files changed, 1280 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix new file mode 100644 index 000000000000..0e17e13e5818 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/bad/default.nix @@ -0,0 +1,334 @@ +{ lib +, stdenv +, fetchurl +, meson +, ninja +, gettext +, pkg-config +, python3 +, gst-plugins-base +, orc +, gstreamer +, gobject-introspection +, enableZbar ? false +, faacSupport ? false +, faac +, faad2 +, ldacbt +, libass +, libkate +, lrdf +, ladspaH +, libnice +, webrtc-audio-processing +, webrtc-audio-processing_1 +, lilv +, lv2 +, serd +, sord +, sratom +, libbs2b +, libmodplug +, libmpeg2 +, libmicrodns +, openjpeg +, libopus +, librsvg +, bluez +, chromaprint +, curl +, directfb +, fdk_aac +, flite +, gsm +, json-glib +, libaom +, libdc1394 +, libde265 +, libdrm +, libdvdnav +, libdvdread +, libgudev +, qrencode +, libsndfile +, libusb1 +, neon +, openal +, opencv4 +, openexr +, openh264 +, libopenmpt +, pango +, rtmpdump +, sbc +, soundtouch +, spandsp +, srtp +, zbar +, wayland-protocols +, wildmidi +, fluidsynth +, libva +, libvdpau +, wayland +, libwebp +, xvidcore +, gnutls +, mjpegtools +, libGLU +, libGL +, libintl +, libgme +, openssl +, x265 +, libxml2 +, srt +, vo-aacenc +, VideoToolbox +, AudioToolbox +, AVFoundation +, CoreMedia +, CoreVideo +, Foundation +, MediaToolbox +, enableGplPlugins ? true +}: + +stdenv.mkDerivation rec { + pname = "gst-plugins-bad"; + version = "1.20.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-AVuNTZo5Xr9ETUCHaGeiA03TMEs61IvDoN0MHucdwR0="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + orc # for orcc + python3 + gettext + gstreamer # for gst-tester-1.0 + gobject-introspection + ] ++ lib.optionals stdenv.isLinux [ + wayland # for wayland-scanner + ]; + + buildInputs = [ + gst-plugins-base + orc + # gobject-introspection has to be in both nativeBuildInputs and + # buildInputs. The build tries to link against libgirepository-1.0.so + gobject-introspection + json-glib + ldacbt + libass + libkate + webrtc-audio-processing # required by webrtcdsp + #webrtc-audio-processing_1 # required by isac + libbs2b + libmodplug + libmicrodns + openjpeg + libopenmpt + libopus + librsvg + curl.dev + fdk_aac + gsm + libaom + libdc1394 + libde265 + libdvdnav + libdvdread + qrencode + libsndfile + libusb1 + neon + openal + opencv4 + openexr + openh264 + rtmpdump + pango + soundtouch + srtp + fluidsynth + libvdpau + libwebp + xvidcore + gnutls + libGL + libGLU + libgme + openssl + libxml2 + libintl + srt + vo-aacenc + ] ++ lib.optionals enableZbar [ + zbar + ] ++ lib.optionals faacSupport [ + faac + ] ++ lib.optionals enableGplPlugins [ + libmpeg2 + mjpegtools + faad2 + x265 + ] ++ lib.optionals stdenv.isLinux [ + bluez + libva # vaapi requires libva -> libdrm -> libpciaccess, which is Linux-only in nixpkgs + wayland + wayland-protocols + ] ++ lib.optionals (!stdenv.isDarwin) [ + # wildmidi requires apple's OpenAL + # TODO: package apple's OpenAL, fix wildmidi, include on Darwin + wildmidi + # TODO: mjpegtools uint64_t is not compatible with guint64 on Darwin + mjpegtools + + chromaprint + directfb + flite + libdrm + libgudev + libnice + sbc + spandsp + + # ladspa plug-in + ladspaH + lrdf # TODO: make build on Darwin + + # lv2 plug-in + lilv + lv2 + serd + sord + sratom + ] ++ lib.optionals stdenv.isDarwin [ + # For unknown reasons the order is important, e.g. if + # VideoToolbox is last, we get: + # fatal error: 'VideoToolbox/VideoToolbox.h' file not found + VideoToolbox + AudioToolbox + AVFoundation + CoreMedia + CoreVideo + Foundation + MediaToolbox + ]; + + 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 + + "-Davtp=disabled" + "-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"}" + "-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing, also this is AGPL so update license when adding support + "-Dmagicleap=disabled" # required `ml_audio` library not packaged in nixpkgs as of writing + "-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support + # As of writing, with `libmpcdec` in `buildInputs` we get + # "Could not find libmpcdec header files, but Musepack was enabled via options" + # This is likely because nixpkgs has the header in libmpc/mpcdec.h + # instead of mpc/mpcdec.h, like Arch does. The situation is not trivial. + # There are apparently 2 things called `libmpcdec` from the same author: + # * http://svn.musepack.net/libmpcdec/trunk/src/ + # * http://svn.musepack.net/libmpc/trunk/include/mpc/ + # Fixing it likely requires to first figure out with upstream which one + # is needed, and then patching upstream to find it (though it probably + # already works on Arch?). + "-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 + "-Dvoamrwbenc=disabled" # required `vo-amrwbenc` library not packaged in nixpkgs as of writing + "-Dvulkan=disabled" # Linux-only, and we haven't figured out yet which of the vulkan nixpkgs it needs + "-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=disabled" # depends on older version of `libopenaptx` due to licensing conflict https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2235 + ] + ++ lib.optionals (!stdenv.isLinux) [ + "-Dva=disabled" # see comment on `libva` in `buildInputs` + ] + ++ lib.optionals stdenv.isDarwin [ + "-Dbluez=disabled" + "-Dchromaprint=disabled" + "-Ddirectfb=disabled" + "-Dflite=disabled" + "-Dkms=disabled" # renders to libdrm output + "-Dlv2=disabled" + "-Dsbc=disabled" + "-Dspandsp=disabled" + "-Ddvb=disabled" + "-Dfbdev=disabled" + "-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 (!gst-plugins-base.glEnabled) [ + "-Dgl=disabled" + ] ++ lib.optionals (!gst-plugins-base.waylandEnabled) [ + "-Dwayland=disabled" + ] ++ lib.optionals (!gst-plugins-base.glEnabled) [ + # `applemedia/videotexturecache.h` requires `gst/gl/gl.h`, + # but its meson build system does not declare the dependency. + "-Dapplemedia=disabled" + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + ] ++ (if enableGplPlugins then [ + "-Dgpl=enabled" + ] else [ + "-Ddts=disabled" + "-Dfaad=disabled" + "-Diqa=disabled" + "-Dmpeg2enc=disabled" + "-Dmplex=disabled" + "-Dresindvd=disabled" + "-Dx265=disabled" + ]); + + # Argument list too long + strictDeps = true; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; + + doCheck = false; # fails 20 out of 58 tests, expensive + + meta = with lib; { + description = "GStreamer Bad Plugins"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + a set of plug-ins that aren't up to par compared to the + rest. They might be close to being good quality, but they're missing + something - be it a good code review, some documentation, a set of tests, + a real live maintainer, or some actual wide use. + ''; + license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix new file mode 100644 index 000000000000..82d90845677c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/base/default.nix @@ -0,0 +1,153 @@ +{ stdenv +, fetchurl +, lib +, pkg-config +, meson +, ninja +, gettext +, gobject-introspection +, python3 +, gstreamer +, orc +, pango +, libtheora +, libintl +, libopus +, isocodes +, libjpeg +, libpng +, libvisual +, tremor # provides 'virbisidec' +, libGL +, enableX11 ? stdenv.isLinux +, libXv +, libXext +, enableWayland ? stdenv.isLinux +, wayland +, wayland-protocols +, enableAlsa ? stdenv.isLinux +, alsa-lib +# Enabling Cocoa seems to currently not work, giving compile +# errors. Suspected is that a newer version than clang +# is needed than 5.0 but it is not clear. +, enableCocoa ? false +, Cocoa +, OpenGL +, enableGl ? (enableX11 || enableWayland || enableCocoa) +, enableCdparanoia ? (!stdenv.isDarwin) +, cdparanoia +, glib +}: + +stdenv.mkDerivation rec { + pname = "gst-plugins-base"; + version = "1.20.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-TLZvzPcwsQN+ZTOGLCEomQkSpttOW70U4O+RRFDrTHw="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + python3 + gettext + orc + glib + gobject-introspection + + # docs + # TODO add hotdoc here + ] ++ lib.optional enableWayland wayland; + + buildInputs = [ + orc + libtheora + libintl + libopus + isocodes + libpng + libjpeg + tremor + libGL + ] ++ lib.optional (!stdenv.isDarwin) [ + libvisual + ] ++ lib.optionals stdenv.isDarwin [ + pango + OpenGL + ] ++ lib.optionals enableAlsa [ + alsa-lib + ] ++ lib.optionals enableX11 [ + libXext + libXv + pango + ] ++ lib.optionals enableWayland [ + wayland + wayland-protocols + ] ++ lib.optional enableCocoa Cocoa + ++ lib.optional enableCdparanoia cdparanoia; + + propagatedBuildInputs = [ + gstreamer + ]; + + mesonFlags = [ + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + "-Dgl-graphene=disabled" # not packaged in nixpkgs as of writing + # See https://github.com/GStreamer/gst-plugins-base/blob/d64a4b7a69c3462851ff4dcfa97cc6f94cd64aef/meson_options.txt#L15 for a list of choices + "-Dgl_winsys=${lib.concatStringsSep "," (lib.optional enableX11 "x11" ++ lib.optional enableWayland "wayland" ++ lib.optional enableCocoa "cocoa")}" + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + "-Dtests=disabled" + ] + ++ lib.optional (!enableX11) "-Dx11=disabled" + # TODO How to disable Wayland? + ++ lib.optional (!enableGl) "-Dgl=disabled" + ++ lib.optional (!enableAlsa) "-Dalsa=disabled" + ++ lib.optional (!enableCdparanoia) "-Dcdparanoia=disabled" + ++ lib.optionals stdenv.isDarwin [ + "-Dlibvisual=disabled" + ]; + + postPatch = '' + patchShebangs \ + scripts/meson-pkg-config-file-fixup.py \ + scripts/extract-release-date-from-doap-file.py + ''; + + # This package has some `_("string literal")` string formats + # that trip up clang with format security enabled. + hardeningDisable = [ "format" ]; + + doCheck = false; # fails, wants DRI access for OpenGL + + passthru = { + # Downstream `gst-*` packages depending on `gst-plugins-base` + # have meson build options like 'gl' etc. that depend + # on these features being built in `-base`. + # If they are not built here, then the downstream builds + # will fail, as they, too, use `-Dauto_features=enabled` + # which would enable these options unconditionally. + # That means we must communicate to these downstream packages + # if the `-base` enabled these options or not, so that + # the can enable/disable those features accordingly. + # The naming `*Enabled` vs `enable*` is intentional to + # distinguish inputs from outputs (what is to be built + # vs what was built) and to make them easier to search for. + glEnabled = enableGl; + waylandEnabled = enableWayland; + }; + + meta = with lib; { + description = "Base GStreamer plug-ins and helper libraries"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix new file mode 100644 index 000000000000..fa1188347731 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/default.nix @@ -0,0 +1,112 @@ +{ stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gettext +, gobject-introspection +, bison +, flex +, python3 +, glib +, makeWrapper +, libcap +, libunwind +, darwin +, elfutils # for libdw +, bash-completion +, lib +, CoreServices +}: + +stdenv.mkDerivation rec { + pname = "gstreamer"; + version = "1.20.0"; + + outputs = [ + "bin" + "out" + "dev" + # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs, see: + # - https://github.com/NixOS/nixpkgs/pull/98767 + # - https://github.com/NixOS/nixpkgs/issues/98769#issuecomment-702296551 + ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-7fS///hVkdT/97Ibue1/D+q8EjrEpO/ynnPLzkVPnbc="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + bison + flex + python3 + makeWrapper + glib + gobject-introspection + bash-completion + + # documentation + # TODO add hotdoc here + ]; + + buildInputs = [ + bash-completion + ] ++ lib.optionals stdenv.isLinux [ + libcap + libunwind + elfutils + ] ++ lib.optionals stdenv.isDarwin [ + CoreServices + ]; + + propagatedBuildInputs = [ + glib + ]; + + mesonFlags = [ + "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + ] ++ lib.optionals stdenv.isDarwin [ + # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. + "-Dlibunwind=disabled" + "-Dlibdw=disabled" + ]; + + postPatch = '' + patchShebangs \ + gst/parse/get_flex_version.py \ + gst/parse/gen_grammar.py.in \ + gst/parse/gen_lex.py.in \ + libs/gst/helpers/ptp_helper_post_install.sh \ + scripts/extract-release-date-from-doap-file.py + ''; + + postInstall = '' + for prog in "$bin/bin/"*; do + # We can't use --suffix here due to quoting so we craft the export command by hand + wrapProgram "$prog" --run 'export GST_PLUGIN_SYSTEM_PATH_1_0=$GST_PLUGIN_SYSTEM_PATH_1_0''${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$(unset _tmp; for profile in $NIX_PROFILES; do _tmp="$profile/lib/gstreamer-1.0''${_tmp:+:}$_tmp"; done; printf '%s' "$_tmp")' + done + ''; + + preFixup = '' + moveToOutput "share/bash-completion" "$bin" + ''; + + setupHook = ./setup-hook.sh; + + meta = with lib ;{ + description = "Open source multimedia framework"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ ttuegel matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh new file mode 100644 index 000000000000..026a4e5f55a0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/core/setup-hook.sh @@ -0,0 +1,9 @@ +addGstreamer1LibPath () { + if test -d "$1/lib/gstreamer-1.0" + then + export GST_PLUGIN_SYSTEM_PATH_1_0="${GST_PLUGIN_SYSTEM_PATH_1_0-}${GST_PLUGIN_SYSTEM_PATH_1_0:+:}$1/lib/gstreamer-1.0" + fi +} + +addEnvHooks "$hostOffset" addGstreamer1LibPath + diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/default.nix new file mode 100644 index 000000000000..d1c7233f0d48 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/default.nix @@ -0,0 +1,27 @@ +{ callPackage, AudioToolbox, AVFoundation, Cocoa, CoreFoundation, CoreMedia, CoreServices, CoreVideo, DiskArbitration, Foundation, IOKit, MediaToolbox, OpenGL, VideoToolbox }: + +{ + gstreamer = callPackage ./core { inherit CoreServices; }; + + gstreamermm = callPackage ./gstreamermm { }; + + gst-plugins-base = callPackage ./base { inherit Cocoa OpenGL; }; + + gst-plugins-good = callPackage ./good { inherit Cocoa; }; + + gst-plugins-bad = callPackage ./bad { inherit AudioToolbox AVFoundation CoreMedia CoreVideo Foundation MediaToolbox VideoToolbox; }; + + gst-plugins-ugly = callPackage ./ugly { inherit CoreFoundation DiskArbitration IOKit; }; + + gst-rtsp-server = callPackage ./rtsp-server { }; + + gst-libav = callPackage ./libav { }; + + gst-devtools = callPackage ./devtools { }; + + gst-editing-services = callPackage ./ges { }; + + gst-vaapi = callPackage ./vaapi { }; + + # note: gst-python is in ./python/default.nix - called under pythonPackages +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix new file mode 100644 index 000000000000..aa92410e0e48 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/devtools/default.nix @@ -0,0 +1,62 @@ +{ lib, stdenv +, fetchurl +, cairo +, meson +, ninja +, pkg-config +, gstreamer +, gst-plugins-base +, python3 +, gobject-introspection +, json-glib +}: + +stdenv.mkDerivation rec { + pname = "gst-devtools"; + version = "1.20.0"; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-afyHVuydk+XFJYyZCIQ08gPpH9vFryjR8sWD/YGbeh0="; + }; + + outputs = [ + "out" + "dev" + # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gobject-introspection + + # documentation + # TODO add hotdoc here + ]; + + buildInputs = [ + cairo + python3 + json-glib + ]; + + propagatedBuildInputs = [ + gstreamer + gst-plugins-base + ]; + + mesonFlags = [ + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + ]; + + meta = with lib; { + description = "Integration testing infrastructure for the GStreamer framework"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix new file mode 100644 index 000000000000..4630ce6d0ce4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/ges/default.nix @@ -0,0 +1,73 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, python3 +, bash-completion +, gst-plugins-base +, gst-plugins-bad +, gst-devtools +, libxml2 +, flex +, gettext +, gobject-introspection +}: + +stdenv.mkDerivation rec { + pname = "gst-editing-services"; + version = "1.20.0"; + + outputs = [ + "out" + "dev" + # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs + ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-+Detz0Bz0ZpZCJhOh5zQOfQZLKNo5x056MzYpWuf7t8="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + gettext + gobject-introspection + gst-devtools + python3 + flex + + # documentation + # TODO add hotdoc here + ]; + + buildInputs = [ + bash-completion + libxml2 + ]; + + propagatedBuildInputs = [ + gst-plugins-base + gst-plugins-bad + ]; + + mesonFlags = [ + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + ]; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + meta = with lib; { + description = "Library for creation of audio/video non-linear editors"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix new file mode 100644 index 000000000000..3b686e4c7f59 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/good/default.nix @@ -0,0 +1,171 @@ +{ lib, stdenv +, fetchurl +, meson +, nasm +, ninja +, pkg-config +, python3 +, gst-plugins-base +, orc +, bzip2 +, gettext +, libv4l +, libdv +, libavc1394 +, libiec61883 +, libvpx +, speex +, flac +, taglib +, libshout +, cairo +, gdk-pixbuf +, aalib +, libcaca +, libsoup +, libpulseaudio +, libintl +, Cocoa +, lame +, mpg123 +, twolame +, gtkSupport ? false, gtk3 +, qt5Support ? false, qt5 +, raspiCameraSupport ? false, libraspberrypi +, enableJack ? true, libjack2 +, libXdamage +, libXext +, libXfixes +, ncurses +, wayland +, wayland-protocols +, xorg +, libgudev +, wavpack +}: + +assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch64); + +stdenv.mkDerivation rec { + pname = "gst-plugins-good"; + version = "1.20.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-LRGcFauMnnn4zTxr9YL/egULKMyuUqtIZeGhRkmRZZw="; + }; + + nativeBuildInputs = [ + pkg-config + python3 + meson + ninja + gettext + nasm + ] ++ lib.optionals stdenv.isLinux [ + wayland-protocols + ]; + + buildInputs = [ + gst-plugins-base + orc + bzip2 + libdv + libvpx + speex + flac + taglib + cairo + gdk-pixbuf + aalib + libcaca + libsoup + libshout + lame + mpg123 + twolame + libintl + libXdamage + libXext + libXfixes + ncurses + xorg.libXfixes + xorg.libXdamage + wavpack + ] ++ lib.optionals raspiCameraSupport [ + libraspberrypi + ] ++ lib.optionals gtkSupport [ + # for gtksink + gtk3 + ] ++ lib.optionals qt5Support (with qt5; [ + qtbase + qtdeclarative + qtwayland + qtx11extras + ]) ++ lib.optionals stdenv.isDarwin [ + Cocoa + ] ++ lib.optionals stdenv.isLinux [ + libv4l + libpulseaudio + libavc1394 + libiec61883 + libgudev + wayland + ] ++ lib.optionals enableJack [ + libjack2 + ]; + + 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 + ] ++ lib.optionals (!qt5Support) [ + "-Dqt5=disabled" + ] ++ lib.optionals (!gtkSupport) [ + "-Dgtk3=disabled" + ] ++ lib.optionals (!enableJack) [ + "-Djack=disabled" + ] ++ lib.optionals (!stdenv.isLinux) [ + "-Ddv1394=disabled" # Linux only + "-Doss4=disabled" # Linux only + "-Doss=disabled" # Linux only + "-Dpulse=disabled" # TODO check if we can keep this enabled + "-Dv4l2-gudev=disabled" # Linux-only + "-Dv4l2=disabled" # Linux-only + "-Dximagesrc=disabled" # Linux-only + ] ++ lib.optionals (!raspiCameraSupport) [ + "-Drpicamsrc=disabled" + ]; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + NIX_LDFLAGS = [ + # linking error on Darwin + # https://github.com/NixOS/nixpkgs/pull/70690#issuecomment-553694896 + "-lncurses" + ]; + + # fails 1 tests with "Unexpected critical/warning: g_object_set_is_valid_property: object class 'GstRtpStorage' has no property named ''" + doCheck = false; + + # must be explicitely set since 5590e365 + dontWrapQtApps = true; + + meta = with lib; { + description = "GStreamer Good Plugins"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + a set of plug-ins that we consider to have good quality code, + correct functionality, our preferred license (LGPL for the plug-in + code, LGPL or LGPL-compatible for the supporting library). + ''; + license = licenses.lgpl2Plus; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix new file mode 100644 index 000000000000..76adcc1fae33 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/gstreamermm/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, pkg-config, file, glibmm, gst_all_1, gnome }: +stdenv.mkDerivation rec { + pname = "gstreamermm"; + version = "1.10.0"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0q4dx9sncqbwgpzma0zvj6zssc279yl80pn8irb95qypyyggwn5y"; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ pkg-config file ]; + + propagatedBuildInputs = [ glibmm gst_all_1.gst-plugins-base ]; + + enableParallelBuilding = true; + + passthru = { + updateScript = gnome.updateScript { + attrPath = "gst_all_1.gstreamermm"; + packageName = "gstreamermm"; + versionPolicy = "odd-unstable"; + }; + }; + + meta = with lib; { + description = "C++ interface for GStreamer"; + homepage = "https://gstreamer.freedesktop.org/bindings/cplusplus.html"; + license = licenses.lgpl21Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ romildo ]; + }; + +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix new file mode 100644 index 000000000000..0d9f22d7d65f --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/libav/default.nix @@ -0,0 +1,57 @@ +{ stdenv +, lib +, fetchurl +, meson +, ninja +, pkg-config +, python3 +, gstreamer +, gst-plugins-base +, gettext +, libav +}: + +# Note that since gst-libav-1.6, libav is actually ffmpeg. See +# https://gstreamer.freedesktop.org/releases/1.6/ for more info. + +stdenv.mkDerivation rec { + pname = "gst-libav"; + version = "1.20.0"; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-Xu5e2NUIKjG1AESOQVNcci7jDNX4Ik8ymCu6ui7t7xc="; + }; + + outputs = [ "out" "dev" ]; + + nativeBuildInputs = [ + meson + ninja + gettext + pkg-config + python3 + ]; + + buildInputs = [ + gstreamer + gst-plugins-base + libav + ]; + + mesonFlags = [ + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ]; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + meta = with lib; { + description = "FFmpeg/libav plugin for GStreamer"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix new file mode 100644 index 000000000000..80190200c26c --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -0,0 +1,68 @@ +{ stdenv +, lib +, fetchurl +, meson +, ninja +, pkg-config +, python3 +, gettext +, gobject-introspection +, gst-plugins-base +, gst-plugins-bad +}: + +stdenv.mkDerivation rec { + pname = "gst-rtsp-server"; + version = "1.20.0"; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-wgn17ZBtpxP91EqIROkJqmyK89+2MCWbCSz7d6d1WEM="; + }; + + outputs = [ + "out" + "dev" + # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs + ]; + + nativeBuildInputs = [ + meson + ninja + gettext + gobject-introspection + pkg-config + python3 + + # documentation + # TODO add hotdoc here + ]; + + buildInputs = [ + gst-plugins-base + gst-plugins-bad + ]; + + mesonFlags = [ + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ + "-Dintrospection=disabled" + ]; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + meta = with lib; { + description = "GStreamer RTSP server"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + A library on top of GStreamer for building an RTSP server. + ''; + license = licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ bkchr ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix new file mode 100644 index 000000000000..05133271f846 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -0,0 +1,94 @@ +{ stdenv +, fetchurl +, meson +, ninja +, pkg-config +, python3 +, gst-plugins-base +, orc +, gettext +, a52dec +, libcdio +, libdvdread +, libmad +, libmpeg2 +, x264 +, libintl +, lib +, opencore-amr +, IOKit +, CoreFoundation +, DiskArbitration +, enableGplPlugins ? true +}: + +stdenv.mkDerivation rec { + pname = "gst-plugins-ugly"; + version = "1.20.0"; + + outputs = [ "out" "dev" ]; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-To3LXSZVLwpJN/a8Ynm9kHD1XKauDqoy1y0mTEQAHC4="; + }; + + nativeBuildInputs = [ + meson + ninja + gettext + pkg-config + python3 + ]; + + buildInputs = [ + gst-plugins-base + orc + libintl + opencore-amr + ] ++ lib.optionals enableGplPlugins [ + a52dec + libcdio + libdvdread + libmad + libmpeg2 + x264 + ] ++ lib.optionals stdenv.isDarwin [ + IOKit + CoreFoundation + DiskArbitration + ]; + + mesonFlags = [ + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + "-Dsidplay=disabled" # sidplay / sidplay/player.h isn't packaged in nixpkgs as of writing + ] ++ (if enableGplPlugins then [ + "-Dgpl=enabled" + ] else [ + "-Da52dec=disabled" + "-Dcdio=disabled" + "-Ddvdread=disabled" + "-Dmpeg2dec=disabled" + "-Dsidplay=disabled" + "-Dx264=disabled" + ]); + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + meta = with lib; { + description = "Gstreamer Ugly Plugins"; + homepage = "https://gstreamer.freedesktop.org"; + longDescription = '' + a set of plug-ins that have good quality and correct functionality, + but distributing them might pose problems. The license on either + the plug-ins or the supporting libraries might not be how we'd + like. The code might be widely known to present patent problems. + ''; + license = if enableGplPlugins then licenses.gpl2Plus else licenses.lgpl2Plus; + platforms = platforms.unix; + maintainers = with maintainers; [ matthewbauer ]; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix b/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix new file mode 100644 index 000000000000..c8b6230cd595 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -0,0 +1,85 @@ +{ lib, stdenv +, fetchurl +, meson +, ninja +, pkg-config +, gst-plugins-base +, bzip2 +, libva +, wayland +, libdrm +, udev +, xorg +, libGLU +, libGL +, gstreamer +, gst-plugins-bad +, nasm +, libvpx +, python3 +}: + +stdenv.mkDerivation rec { + pname = "gstreamer-vaapi"; + version = "1.20.0"; + + src = fetchurl { + url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz"; + sha256 = "sha256-95pHNG39XlheBj53B45fxJiwbe6JW/y/R9iGP8rJ6jI="; + }; + + outputs = [ + "out" + "dev" + # "devdoc" # disabled until `hotdoc` is packaged in nixpkgs + ]; + + nativeBuildInputs = [ + meson + ninja + pkg-config + bzip2 + + # documentation + # TODO add hotdoc here + ]; + + buildInputs = [ + gstreamer + gst-plugins-base + gst-plugins-bad + libva + wayland + libdrm + udev + xorg.libX11 + xorg.libXext + xorg.libXv + xorg.libXrandr + xorg.libSM + xorg.libICE + libGL + libGLU + nasm + libvpx + python3 + ]; + + mesonFlags = [ + "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + "-Ddoc=disabled" # `hotdoc` not packaged in nixpkgs as of writing + ]; + + postPatch = '' + patchShebangs \ + scripts/extract-release-date-from-doap-file.py + ''; + + meta = with lib; { + description = "Set of VAAPI GStreamer Plug-ins"; + homepage = "https://gstreamer.freedesktop.org"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ tstrobel ]; + platforms = platforms.linux; + }; +} |