From 093a5ffd972947fc30601469a73849126e5b9ccd Mon Sep 17 00:00:00 2001 From: Lily Foster Date: Sat, 20 May 2023 07:14:49 -0400 Subject: [PATCH] gst_all_1.gst-plugins-rs: enable audiofx and hotdoc I also threw in a couple of drive-by nit fixes. --- .../libraries/gstreamer/rs/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/rs/default.nix b/pkgs/development/libraries/gstreamer/rs/default.nix index 5ad11cef9dcd..b50d7d45180f 100644 --- a/pkgs/development/libraries/gstreamer/rs/default.nix +++ b/pkgs/development/libraries/gstreamer/rs/default.nix @@ -1,7 +1,6 @@ { lib , stdenv , fetchFromGitLab -, fetchpatch , writeText , rustPlatform , meson @@ -27,11 +26,14 @@ , Security , gst-plugins-good , nix-update-script +# specifies a limited subset of plugins to build (the default `null` means all plugins supported on the stdenv platform) +, plugins ? null +# Checks meson.is_cross_build(), so even canExecute isn't enough. +, enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform && plugins == null +, hotdoc # TODO: required for case-insensitivity hack below , yq , moreutils -# specify a limited set of plugins to build if not all supported plugins -, plugins ? null }: let @@ -94,7 +96,6 @@ let selectedPlugins = if plugins != null then lib.unique (lib.sort lib.lessThan plugins) else lib.subtractLists ( [ - "audiofx" # tests have race-y failure, see https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/337 "csound" # tests have weird failure on x86, does not currently work on arm or darwin ] ++ lib.optionals stdenv.isDarwin [ "reqwest" # tests hang on darwin @@ -161,6 +162,8 @@ stdenv.mkDerivation rec { cargo cargo-c nasm + ] ++ lib.optionals enableDocumentation [ + hotdoc ]; buildInputs = [ @@ -177,7 +180,7 @@ stdenv.mkDerivation rec { map (plugin: lib.mesonEnable plugin true) selectedPlugins ) ++ [ (lib.mesonOption "sodium-source" "system") - (lib.mesonEnable "doc" false) # `hotdoc` not packaged in nixpkgs as of writing + (lib.mesonEnable "doc" enableDocumentation) ] ++ (let crossFile = writeText "cross-file.conf" '' [binaries] @@ -187,7 +190,7 @@ stdenv.mkDerivation rec { "--cross-file=${crossFile}" ]); - # turn off all auto plugins if a list is specified + # turn off all auto plugins since we use a list of plugins we generate mesonAutoFeatures = "disabled"; doCheck = true;