From 4705a06cc0fb76689167ed1d02dc3e106bfeadc4 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Tue, 18 Apr 2023 23:23:00 +0000 Subject: [PATCH] gst_all_1: re-disable docs for cross Documentation was recently enabled, which broke the cross build. Fixes: 46bf2c47f0e ("gst_all_1.gst-editing-services: 1.20.3 -> 1.22.2") Fixes: 782969f5d6e ("gst_all_1.gst-rtsp-server: 1.20.3 -> 1.22.2") Fixes: 79e42f53c26 ("gst_all_1.gst-devtools: 1.20.3 -> 1.22.2") Fixes: 50b8c274eaa ("gst_all_1.gst-vaapi: 1.20.3 -> 1.22.2") Fixes: 26a54eba11a ("gst_all_1.gst-libav: 1.20.3 -> 1.22.2") Fixes: a315e09637f ("gst_all_1.gst-plugins-ugly: 1.20.3 -> 1.22.2") Fixes: f03d8ba1e19 ("gst_all_1.gst-plugins-bad: 1.20.3 -> 1.22.2") Fixes: 3028bf5ea30 ("gst_all_1.gst-plugins-good: 1.20.3 -> 1.22.2") Fixes: 4b859ee802b ("gst_all_1.gstreamer: 1.20.3 -> 1.22.2") --- pkgs/development/libraries/gstreamer/bad/default.nix | 7 ++++--- .../development/libraries/gstreamer/base/default.nix | 12 ++++++++---- .../development/libraries/gstreamer/core/default.nix | 9 +++++---- .../libraries/gstreamer/devtools/default.nix | 10 +++++++--- pkgs/development/libraries/gstreamer/ges/default.nix | 10 +++++++--- .../development/libraries/gstreamer/good/default.nix | 7 ++++--- .../libraries/gstreamer/libav/default.nix | 10 +++++++--- .../libraries/gstreamer/rtsp-server/default.nix | 7 ++++--- .../development/libraries/gstreamer/ugly/default.nix | 7 ++++--- .../libraries/gstreamer/vaapi/default.nix | 7 ++++--- 10 files changed, 54 insertions(+), 32 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index 29e122a40155..717a61d82310 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -11,7 +11,6 @@ , orc , gstreamer , gobject-introspection -, hotdoc , enableZbar ? false , faacSupport ? false , faac @@ -101,6 +100,8 @@ , MediaToolbox , enableGplPlugins ? true , bluezSupport ? stdenv.isLinux +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation rec { @@ -131,8 +132,7 @@ stdenv.mkDerivation rec { gettext gstreamer # for gst-tester-1.0 gobject-introspection - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ] ++ lib.optionals stdenv.isLinux [ wayland # for wayland-scanner @@ -287,6 +287,7 @@ stdenv.mkDerivation rec { "-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` "-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 diff --git a/pkgs/development/libraries/gstreamer/base/default.nix b/pkgs/development/libraries/gstreamer/base/default.nix index 3bc2fe880b21..652f949f7226 100644 --- a/pkgs/development/libraries/gstreamer/base/default.nix +++ b/pkgs/development/libraries/gstreamer/base/default.nix @@ -20,7 +20,6 @@ , tremor # provides 'virbisidec' , libGL , gobject-introspection -, hotdoc , enableX11 ? stdenv.isLinux , libXext , libXi @@ -39,6 +38,9 @@ , cdparanoia , glib , testers +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform +, hotdoc }: stdenv.mkDerivation (finalAttrs: { @@ -68,10 +70,11 @@ stdenv.mkDerivation (finalAttrs: { glib gstreamer gobject-introspection - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc - ] ++ lib.optional enableWayland wayland; + ] ++ lib.optionals enableWayland [ + wayland + ]; buildInputs = [ gobject-introspection @@ -110,6 +113,7 @@ stdenv.mkDerivation (finalAttrs: { "-Dexamples=disabled" # requires many dependencies and probably not useful for our users # 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.mesonEnable "doc" enableDocumentation) ] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-Dtests=disabled" ] diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index c764ce738a95..88101ceea41d 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -8,7 +8,6 @@ , flex , python3 , glib -, hotdoc , makeWrapper , libcap , libunwind @@ -19,6 +18,8 @@ , CoreServices , gobject-introspection , testers +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation (finalAttrs: { @@ -55,11 +56,10 @@ stdenv.mkDerivation (finalAttrs: { glib bash-completion gobject-introspection - - # documentation - hotdoc ] ++ lib.optionals stdenv.isLinux [ libcap # for setcap binary + ] ++ lib.optionals enableDocumentation [ + hotdoc ]; buildInputs = [ @@ -81,6 +81,7 @@ stdenv.mkDerivation (finalAttrs: { 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 + (lib.mesonEnable "doc" enableDocumentation) ] ++ lib.optionals stdenv.isDarwin [ # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. "-Dlibunwind=disabled" diff --git a/pkgs/development/libraries/gstreamer/devtools/default.nix b/pkgs/development/libraries/gstreamer/devtools/default.nix index 6f62a49056af..471de787e197 100644 --- a/pkgs/development/libraries/gstreamer/devtools/default.nix +++ b/pkgs/development/libraries/gstreamer/devtools/default.nix @@ -10,8 +10,9 @@ , gst-rtsp-server , python3 , gobject-introspection -, hotdoc , json-glib +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation rec { @@ -37,8 +38,7 @@ stdenv.mkDerivation rec { ninja pkg-config gobject-introspection - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -56,6 +56,10 @@ stdenv.mkDerivation rec { gst-rtsp-server ]; + mesonFlags = [ + (lib.mesonEnable "doc" enableDocumentation) + ]; + meta = with lib; { description = "Integration testing infrastructure for the GStreamer framework"; homepage = "https://gstreamer.freedesktop.org"; diff --git a/pkgs/development/libraries/gstreamer/ges/default.nix b/pkgs/development/libraries/gstreamer/ges/default.nix index 5520bf70833c..8beedddeeebb 100644 --- a/pkgs/development/libraries/gstreamer/ges/default.nix +++ b/pkgs/development/libraries/gstreamer/ges/default.nix @@ -10,9 +10,10 @@ , gst-devtools , libxml2 , flex -, hotdoc , gettext , gobject-introspection +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation rec { @@ -37,8 +38,7 @@ stdenv.mkDerivation rec { gobject-introspection python3 flex - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -55,6 +55,10 @@ stdenv.mkDerivation rec { gst-plugins-bad ]; + mesonFlags = [ + (lib.mesonEnable "doc" enableDocumentation) + ]; + postPatch = '' patchShebangs \ scripts/extract-release-date-from-doap-file.py diff --git a/pkgs/development/libraries/gstreamer/good/default.nix b/pkgs/development/libraries/gstreamer/good/default.nix index 738e43fe42ca..c8efbbfd874c 100644 --- a/pkgs/development/libraries/gstreamer/good/default.nix +++ b/pkgs/development/libraries/gstreamer/good/default.nix @@ -44,7 +44,8 @@ , libgudev , wavpack , glib -, hotdoc +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch64); @@ -74,8 +75,7 @@ stdenv.mkDerivation rec { orc libshout glib - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ] ++ lib.optionals qt5Support (with qt5; [ qtbase @@ -142,6 +142,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users "-Dglib-asserts=disabled" # asserts should be disabled on stable releases + (lib.mesonEnable "doc" enableDocumentation) ] ++ lib.optionals (!qt5Support) [ "-Dqt5=disabled" ] ++ lib.optionals (!qt6Support) [ diff --git a/pkgs/development/libraries/gstreamer/libav/default.nix b/pkgs/development/libraries/gstreamer/libav/default.nix index 2ce420071942..b51a103c0855 100644 --- a/pkgs/development/libraries/gstreamer/libav/default.nix +++ b/pkgs/development/libraries/gstreamer/libav/default.nix @@ -5,11 +5,12 @@ , ninja , pkg-config , python3 -, hotdoc , gstreamer , gst-plugins-base , gettext , libav +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: # Note that since gst-libav-1.6, libav is actually ffmpeg. See @@ -32,8 +33,7 @@ stdenv.mkDerivation rec { gettext pkg-config python3 - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -43,6 +43,10 @@ stdenv.mkDerivation rec { libav ]; + mesonFlags = [ + (lib.mesonEnable "doc" enableDocumentation) + ]; + postPatch = '' patchShebangs \ scripts/extract-release-date-from-doap-file.py diff --git a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix index 47ab692c0469..0f8a2f59c577 100644 --- a/pkgs/development/libraries/gstreamer/rtsp-server/default.nix +++ b/pkgs/development/libraries/gstreamer/rtsp-server/default.nix @@ -5,11 +5,12 @@ , ninja , pkg-config , python3 -, hotdoc , 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 }: stdenv.mkDerivation rec { @@ -33,8 +34,7 @@ stdenv.mkDerivation rec { gobject-introspection pkg-config python3 - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -46,6 +46,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + (lib.mesonEnable "doc" enableDocumentation) ]; postPatch = '' diff --git a/pkgs/development/libraries/gstreamer/ugly/default.nix b/pkgs/development/libraries/gstreamer/ugly/default.nix index 061f7560b4b7..0ebc61565ba6 100644 --- a/pkgs/development/libraries/gstreamer/ugly/default.nix +++ b/pkgs/development/libraries/gstreamer/ugly/default.nix @@ -4,7 +4,6 @@ , ninja , pkg-config , python3 -, hotdoc , gst-plugins-base , orc , gettext @@ -21,6 +20,8 @@ , CoreFoundation , DiskArbitration , enableGplPlugins ? true +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation rec { @@ -40,8 +41,7 @@ stdenv.mkDerivation rec { gettext pkg-config python3 - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -65,6 +65,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dsidplay=disabled" # sidplay / sidplay/player.h isn't packaged in nixpkgs as of writing + (lib.mesonEnable "doc" enableDocumentation) ] ++ (if enableGplPlugins then [ "-Dgpl=enabled" ] else [ diff --git a/pkgs/development/libraries/gstreamer/vaapi/default.nix b/pkgs/development/libraries/gstreamer/vaapi/default.nix index 1041f59e6fb6..b34581ed3435 100644 --- a/pkgs/development/libraries/gstreamer/vaapi/default.nix +++ b/pkgs/development/libraries/gstreamer/vaapi/default.nix @@ -5,7 +5,6 @@ , pkg-config , gst-plugins-base , bzip2 -, hotdoc , libva , wayland , wayland-protocols @@ -19,6 +18,8 @@ , nasm , libvpx , python3 +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: stdenv.mkDerivation rec { @@ -42,8 +43,7 @@ stdenv.mkDerivation rec { python3 bzip2 wayland - - # documentation + ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -72,6 +72,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + (lib.mesonEnable "doc" enableDocumentation) ]; postPatch = ''