diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2024-04-13 12:42:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-13 12:42:29 +0200 |
commit | 26e5c05a146f54dac3871e9f6a6d5f21520b3b7d (patch) | |
tree | 6f02ba40b780cdfbf79c9b55fce4be465591dbb7 /pkgs/applications/video | |
parent | c62e6165da458d1de847b2fc10ad47d61a5e76fb (diff) | |
parent | 4c7b61ce7918eb8d0cae28e0f7fff571593327d5 (diff) |
Merge pull request #303275 from RoGreat/streamlink-twitch-gui-icons
streamlink-twitch-gui-bin: desktop icons
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/streamlink-twitch-gui/bin.nix | 14 |
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 ac74ed748f41c..543b2b524708f 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"; |