summary refs log tree commit diff
path: root/pkgs/development/libraries/gstreamer/bad/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gstreamer/bad/default.nix')
-rw-r--r--pkgs/development/libraries/gstreamer/bad/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix
index 29e122a4015..717a61d8231 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