From 2d2cce7f4cb3314bc1f532d3de3d1c9eeab7c247 Mon Sep 17 00:00:00 2001 From: Defelo Date: Mon, 8 Jun 2026 16:43:44 +0200 Subject: [PATCH] fastfetch: add support for codec module --- pkgs/by-name/fa/fastfetch/package.nix | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index b1e4cc25a67b..3fc1154db9e1 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -21,6 +21,8 @@ libsepol, libsysprof-capture, libxcb, + libva, + libvdpau, makeBinaryWrapper, moltenvk, nix-update-script, @@ -48,6 +50,7 @@ # Feature flags audioSupport ? true, brightnessSupport ? true, + codecSupport ? true, dbusSupport ? true, flashfetchSupport ? false, terminalSupport ? true, @@ -92,9 +95,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = let - commonDeps = [ - yyjson - ]; + commonDeps = [ yyjson ]; # Cross-platform optional dependencies imageDeps = lib.optionals imageSupport [ @@ -111,9 +112,7 @@ stdenv.mkDerivation (finalAttrs: { ]; linuxCoreDeps = lib.optionals stdenv.hostPlatform.isLinux ( - [ - hwdata - ] + [ hwdata ] # Fallback if both `wayland` and `x11` are not available. AMD GPU properties detection ++ lib.optional (!x11Support && !waylandSupport) libdrm ); @@ -127,6 +126,11 @@ stdenv.mkDerivation (finalAttrs: { # Brightness detection of external displays ddcutil ] + ++ lib.optionals codecSupport [ + # Hardware-accelerated video codec detection + libva + libvdpau + ] ++ lib.optionals dbusSupport [ # Bluetooth, wifi, player & media detection dbus @@ -223,6 +227,9 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.cmakeBool "ENABLE_PULSE" audioSupport) + (lib.cmakeBool "ENABLE_VA" codecSupport) + (lib.cmakeBool "ENABLE_VDPAU" codecSupport) + (lib.cmakeBool "ENABLE_DDCUTIL" brightnessSupport) (lib.cmakeBool "ENABLE_DBUS" dbusSupport) @@ -281,6 +288,7 @@ stdenv.mkDerivation (finalAttrs: { minimal = fastfetch.override { audioSupport = false; brightnessSupport = false; + codecSupport = false; dbusSupport = false; enlightenmentSupport = false; flashfetchSupport = false; @@ -316,6 +324,7 @@ stdenv.mkDerivation (finalAttrs: { Feature flags (all default to 'true' except rpmSupport, flashfetchSupport and zfsSupport): * audioSupport: PulseAudio functionality * brightnessSupport: External display brightness detection via DDCUtil + * codecSupport: Hardware-accelerated video codec detection * dbusSupport: DBus functionality for Bluetooth, WiFi, player & media detection * enlightenmentSupport: Enlightenment configuration detection via EFL's Eet * flashfetchSupport: Build the flashfetch utility (default: false)