From 42ffe8928cd541b4b2c5df0136b660f7790882ae Mon Sep 17 00:00:00 2001 From: Mollusk Date: Fri, 29 May 2026 02:23:25 -0400 Subject: [PATCH] fix(deps): recognise Artix and Garuda for install hints detect_distro only matched arch/cachyos/manjaro/endeavouros, so on Artix (Friend 2's box) and Garuda the missing-dependency hints fell through to the generic message instead of a pacman command. Both are pacman-based with identical package names, so add them to every Arch-family match arm. Co-Authored-By: Claude Opus 4.8 --- src/common/deps.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/common/deps.rs b/src/common/deps.rs index 1ea9932..10202e0 100644 --- a/src/common/deps.rs +++ b/src/common/deps.rs @@ -85,20 +85,20 @@ fn install_hint_for_bin(bin: &str) -> String { let distro = detect_distro(); let pkg = match bin { "gst-launch-1.0" | "gst-inspect-1.0" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gstreamer gst-plugins-base", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gstreamer gst-plugins-base", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-tools", Some("fedora" | "nobara") => "gstreamer1 gstreamer1-plugins-base-tools", _ => "gstreamer + tools", }, "pactl" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "libpulse", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "libpulse", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "pulseaudio-utils", Some("fedora" | "nobara") => "pulseaudio-utils", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "pulseaudio-utils", _ => "pulseaudio-utils (provides `pactl`)", }, "xwininfo" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "xorg-xwininfo", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "xorg-xwininfo", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "x11-utils", Some("fedora" | "nobara") => "xorg-x11-utils", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "xwininfo", @@ -113,56 +113,56 @@ fn install_hint_for_gst_element(name: &str) -> String { let distro = detect_distro(); let pkg = match name { "pipewiresrc" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugin-pipewire", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugin-pipewire", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-pipewire", Some("fedora" | "nobara") => "pipewire-gstreamer", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "pipewire-gstreamer", _ => "the GStreamer PipeWire plugin", }, "vah264enc" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugin-va", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugin-va", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-plugins-bad", Some("fedora" | "nobara") => "gstreamer1-plugins-bad-free", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-bad", _ => "the GStreamer VA-API plugin (requires an H.264-capable GPU; almost all modern GPUs)", }, "x264enc" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugins-ugly", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugins-ugly", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-plugins-ugly", Some("fedora" | "nobara") => "gstreamer1-plugins-ugly", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-ugly", _ => "the GStreamer x264 plugin (plugins-ugly)", }, "ximagesrc" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugins-good", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugins-good", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-plugins-good", Some("fedora" | "nobara") => "gstreamer1-plugins-good", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-good", _ => "the GStreamer X11 plugin (plugins-good)", }, "videoscale" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugins-base", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugins-base", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-plugins-base", Some("fedora" | "nobara") => "gstreamer1-plugins-base", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-base", _ => "the GStreamer plugins-base set", }, "h264parse" | "mpegtsmux" | "aacparse" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugins-bad", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugins-bad", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-plugins-bad", Some("fedora" | "nobara") => "gstreamer1-plugins-bad-free", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-bad", _ => "the GStreamer plugins-bad set", }, "pulsesrc" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-plugins-good", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-plugins-good", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-pulseaudio", Some("fedora" | "nobara") => "gstreamer1-plugins-good", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-plugins-good", _ => "the GStreamer PulseAudio plugin", }, "avenc_aac" => match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => "gst-libav", + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => "gst-libav", Some("debian" | "ubuntu" | "pop" | "linuxmint") => "gstreamer1.0-libav", Some("fedora" | "nobara") => "gstreamer1-libav", Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => "gstreamer-libav", @@ -175,7 +175,7 @@ fn install_hint_for_gst_element(name: &str) -> String { fn install_command(distro: &Option, pkg: &str) -> String { let cmd = match distro.as_deref() { - Some("arch" | "cachyos" | "manjaro" | "endeavouros") => format!("sudo pacman -S {pkg}"), + Some("arch" | "cachyos" | "manjaro" | "endeavouros" | "artix" | "garuda") => format!("sudo pacman -S {pkg}"), Some("debian" | "ubuntu" | "pop" | "linuxmint") => format!("sudo apt install {pkg}"), Some("fedora" | "nobara") => format!("sudo dnf install {pkg}"), Some("opensuse" | "opensuse-tumbleweed" | "opensuse-leap") => format!("sudo zypper install {pkg}"),