Commit 887e700c authored by José Romildo's avatar José Romildo
Browse files

sfwbar: fix SVG icon rendering via wrapGAppsHook3

Add `wrapGAppsHook3` to `nativeBuildInputs` to ensure `sfwbar` can
successfully locate the `gdk-pixbuf` loaders required to render SVG symbolic
icons in default GTK widgets (such as the battery, bluez, and volume
modules).

The inclusion of this hook automatically generates a unified `loaders.cache`
and wraps the resulting binary with the correct `GDK_PIXBUF_MODULE_FILE`
environment variable. Furthermore, it automatically handles the population
of `XDG_DATA_DIRS`, rendering the previous manual `wrapProgram` execution in
`postFixup` redundant.
parent eb059e76
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
  makeWrapper,
  docutils,
  wayland-scanner,
  wrapGAppsHook3,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -47,13 +48,9 @@ stdenv.mkDerivation (finalAttrs: {
    pkg-config
    makeWrapper
    wayland-scanner
    wrapGAppsHook3
  ];

  postFixup = ''
    wrapProgram $out/bin/sfwbar \
      --suffix XDG_DATA_DIRS : $out/share
  '';

  meta = {
    homepage = "https://github.com/LBCrion/sfwbar";
    description = "Flexible taskbar application for wayland compositors, designed with a stacking layout in mind";