30 basename = "streamlink-twitch-gui";
31 runtimeLibs = lib.makeLibraryPath [ gtk3-x11 libudev0-shim ];
32 runtimeBins = lib.makeBinPath [ streamlink ];
35 stdenv.mkDerivation rec {
36 pname = "${basename}-bin";
40 x86_64-linux = fetchurl {
41 url = "https://github.com/streamlink/${basename}/releases/download/v${version}/${basename}-v${version}-linux64.tar.gz";
42 hash = "sha256-uzD61Q1XIthAwoJHb0H4sTdYkUj0qGeGs1h0XFeV03E=";
44 i686-linux = fetchurl {
45 url = "https://github.com/streamlink/${basename}/releases/download/v${version}/${basename}-v${version}-linux32.tar.gz";
46 hash = "sha256-akJEd94PmH9YeBud+l5+5QpbnzXAD0jDBKJM4h/t2EA=";
48 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
50 nativeBuildInputs = with xorg; [
85 buildInputs = [ streamlink ];
92 mkdir -p $out/{bin,opt/${basename},share}
94 # Install all files, remove unnecessary ones
95 cp -a . $out/opt/${basename}/
96 rm -r $out/opt/${basename}/{{add,remove}-menuitem.sh,credits.html,icons/}
97 ln -s $out/opt/${basename}/${basename} $out/bin/
98 for res in 16 32 48 64 128 256; do
100 icons/icon-"$res".png \
101 $out/share/icons/hicolor/"$res"x"$res"/apps/${basename}.png
108 --add-flags "--no-version-check" \
109 --prefix LD_LIBRARY_PATH : ${runtimeLibs} \
110 --prefix PATH : ${runtimeBins}
114 desktopItems = [(makeDesktopItem {
118 desktopName = "Streamlink Twitch GUI";
119 genericName = meta.description;
120 categories = [ "AudioVideo" "Network" ];
124 description = "Twitch.tv browser for Streamlink";
125 longDescription = "Browse Twitch.tv and watch streams in your videoplayer of choice";
126 homepage = "https://streamlink.github.io/streamlink-twitch-gui/";
127 downloadPage = "https://github.com/streamlink/streamlink-twitch-gui/releases";
128 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
129 license = licenses.mit;
130 mainProgram = "streamlink-twitch-gui";
131 maintainers = with maintainers; [ rileyinman ];
132 platforms = [ "x86_64-linux" "i686-linux" ];