From b2c770b9934842892392f805300c785af517ea95 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sat, 1 Oct 2022 14:44:25 -0600 Subject: [PATCH] tidal-hifi: generate hicolor icon set and use it in .desktop file (#193186) Co-authored-by: Sandro --- pkgs/applications/audio/tidal-hifi/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/tidal-hifi/default.nix b/pkgs/applications/audio/tidal-hifi/default.nix index 048367703f02..8b6d50917219 100644 --- a/pkgs/applications/audio/tidal-hifi/default.nix +++ b/pkgs/applications/audio/tidal-hifi/default.nix @@ -18,6 +18,7 @@ , gdk-pixbuf , glib , gtk3 +, imagemagick , libappindicator-gtk3 , libdbusmenu , libdrm @@ -60,6 +61,7 @@ stdenv.mkDerivation rec { gdk-pixbuf glib gtk3 + imagemagick pango systemd mesa # for libgbm @@ -106,8 +108,15 @@ stdenv.mkDerivation rec { makeWrapper $out/opt/tidal-hifi/tidal-hifi $out/bin/tidal-hifi \ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \ "''${gappsWrapperArgs[@]}" - substituteInPlace $out/share/applications/tidal-hifi.desktop --replace \ - "/opt/tidal-hifi/tidal-hifi" "tidal-hifi" + substituteInPlace $out/share/applications/tidal-hifi.desktop \ + --replace \ "/opt/tidal-hifi/tidal-hifi" "tidal-hifi" \ + --replace "/usr/share/icons/hicolor/0x0/apps/tidal-hifi.png" "tidal-hifi.png" + + for size in 48 64 128 256 512; do + mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps/ + convert $out/share/icons/hicolor/0x0/apps/tidal-hifi.png \ + -resize ''${size}x''${size} $out/share/icons/hicolor/''${size}x''${size}/apps/tidal-hifi.png + done ''; meta = with lib; {