From ad98e968237df5ad69df4ed5c65f0ff8024befcf Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 10 Sep 2024 08:06:04 +0000 Subject: [PATCH] gst-launch: ship default plugins --- hosts/common/programs/gst-launch.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hosts/common/programs/gst-launch.nix b/hosts/common/programs/gst-launch.nix index 785b21fda..3dfd18dcc 100644 --- a/hosts/common/programs/gst-launch.nix +++ b/hosts/common/programs/gst-launch.nix @@ -1,6 +1,23 @@ +# basic environment tests: +# - `gst-launch-1.0 audiotestsrc ! autoaudiosink` +# - `gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink` +# more usage here: { pkgs, ... }: { sane.programs.gst-launch = { - packageUnwrapped = pkgs.linkBinIntoOwnPackage pkgs.gst_all_1.gstreamer "gst-launch-1.0"; + packageUnwrapped = ( + pkgs.linkBinIntoOwnPackage pkgs.gst_all_1.gstreamer "gst-launch-1.0" + ).overrideAttrs (base: { + # XXX the binaries need `GST_PLUGIN_SYSTEM_PATH_1_0` set to function, + # but nixpkgs doesn't set those. + nativeBuildInputs = (base.nativeBuildInputs or []) ++ [ + pkgs.wrapGAppsNoGuiHook + ]; + buildInputs = (base.buildInputs or []) ++ [ + pkgs.gst_all_1.gst-plugins-base + pkgs.gst_all_1.gst-plugins-good + pkgs.pipewire + ]; + }); }; }