about summary refs log tree commit diff
path: root/pkgs/applications/video/streamlink-twitch-gui/bin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/streamlink-twitch-gui/bin.nix')
-rw-r--r--pkgs/applications/video/streamlink-twitch-gui/bin.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/video/streamlink-twitch-gui/bin.nix b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
index ac74ed748f41..543b2b524708 100644
--- a/pkgs/applications/video/streamlink-twitch-gui/bin.nix
+++ b/pkgs/applications/video/streamlink-twitch-gui/bin.nix
@@ -1,6 +1,7 @@
 { autoPatchelfHook
 , fetchurl
 , lib
+, copyDesktopItems
 , makeDesktopItem
 , makeWrapper
 , stdenv
@@ -52,6 +53,7 @@ stdenv.mkDerivation rec {
     alsa-lib
     autoPatchelfHook
     cairo
+    copyDesktopItems
     cups.lib
     dbus.lib
     expat
@@ -92,8 +94,12 @@ stdenv.mkDerivation rec {
     # Install all files, remove unnecessary ones
     cp -a . $out/opt/${basename}/
     rm -r $out/opt/${basename}/{{add,remove}-menuitem.sh,credits.html,icons/}
-    ln -s "$out/opt/${basename}/${basename}" $out/bin/
-    cp -r "${desktopItem}/share/applications" $out/share/
+    ln -s $out/opt/${basename}/${basename} $out/bin/
+    for res in 16 32 48 64 128 256; do
+      install -Dm644 \
+        icons/icon-"$res".png \
+        $out/share/icons/hicolor/"$res"x"$res"/apps/${basename}.png
+    done
     runHook postInstall
   '';
 
@@ -105,14 +111,14 @@ stdenv.mkDerivation rec {
     )
   '';
 
-  desktopItem = makeDesktopItem {
+  desktopItems = [(makeDesktopItem {
     name = basename;
     exec = basename;
     icon = basename;
     desktopName = "Streamlink Twitch GUI";
     genericName = meta.description;
     categories = [ "AudioVideo" "Network" ];
-  };
+  })];
 
   meta = with lib; {
     description = "Twitch.tv browser for Streamlink";