2021-01-09 10:05:03 +00:00
|
|
|
{ autoPatchelfHook
|
|
|
|
, fetchurl
|
|
|
|
, lib
|
|
|
|
, makeDesktopItem
|
|
|
|
, makeWrapper
|
|
|
|
, stdenv
|
|
|
|
, wrapGAppsHook
|
|
|
|
, at-spi2-core
|
|
|
|
, atk
|
2021-06-28 23:13:55 +00:00
|
|
|
, alsa-lib
|
2021-01-09 10:05:03 +00:00
|
|
|
, cairo
|
|
|
|
, cups
|
|
|
|
, dbus
|
|
|
|
, expat
|
|
|
|
, gcc-unwrapped
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, pango
|
|
|
|
, gtk3-x11
|
|
|
|
, libudev0-shim
|
|
|
|
, libuuid
|
2021-04-26 19:14:03 +00:00
|
|
|
, mesa
|
2021-01-09 10:05:03 +00:00
|
|
|
, nss
|
|
|
|
, nspr
|
|
|
|
, xorg
|
|
|
|
, streamlink
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
let
|
|
|
|
basename = "streamlink-twitch-gui";
|
2022-03-10 19:12:11 +00:00
|
|
|
runtimeLibs = lib.makeLibraryPath [ gtk3-x11 libudev0-shim ];
|
2021-08-22 07:53:02 +00:00
|
|
|
runtimeBins = lib.makeBinPath [ streamlink ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "${basename}-bin";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.4.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
src = {
|
|
|
|
x86_64-linux = fetchurl {
|
|
|
|
url = "https://github.com/streamlink/${basename}/releases/download/v${version}/${basename}-v${version}-linux64.tar.gz";
|
|
|
|
hash = "sha256-uzD61Q1XIthAwoJHb0H4sTdYkUj0qGeGs1h0XFeV03E=";
|
|
|
|
};
|
|
|
|
i686-linux = fetchurl {
|
|
|
|
url = "https://github.com/streamlink/${basename}/releases/download/v${version}/${basename}-v${version}-linux32.tar.gz";
|
|
|
|
hash = "sha256-akJEd94PmH9YeBud+l5+5QpbnzXAD0jDBKJM4h/t2EA=";
|
|
|
|
};
|
|
|
|
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = with xorg; [
|
|
|
|
at-spi2-core
|
|
|
|
atk
|
2021-06-28 23:13:55 +00:00
|
|
|
alsa-lib
|
2020-09-25 04:45:31 +00:00
|
|
|
autoPatchelfHook
|
|
|
|
cairo
|
|
|
|
cups.lib
|
2022-12-02 08:20:57 +00:00
|
|
|
dbus.lib
|
2020-09-25 04:45:31 +00:00
|
|
|
expat
|
|
|
|
gcc-unwrapped
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
2020-10-27 00:29:36 +00:00
|
|
|
pango
|
2020-09-25 04:45:31 +00:00
|
|
|
gtk3-x11
|
2021-04-26 19:14:03 +00:00
|
|
|
mesa
|
2020-09-25 04:45:31 +00:00
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
libuuid
|
|
|
|
libX11
|
|
|
|
libxcb
|
|
|
|
libXcomposite
|
|
|
|
libXcursor
|
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
|
|
|
libXScrnSaver
|
|
|
|
libXtst
|
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ streamlink ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-22 07:53:02 +00:00
|
|
|
runHook preInstall
|
2020-09-25 04:45:31 +00:00
|
|
|
mkdir -p $out/{bin,opt/${basename},share}
|
|
|
|
|
|
|
|
# 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/
|
2021-08-22 07:53:02 +00:00
|
|
|
cp -r "${desktopItem}/share/applications" $out/share/
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--add-flags "--no-version-check" \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${runtimeLibs} \
|
|
|
|
--prefix PATH : ${runtimeBins}
|
|
|
|
)
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = basename;
|
|
|
|
exec = basename;
|
|
|
|
icon = basename;
|
|
|
|
desktopName = "Streamlink Twitch GUI";
|
|
|
|
genericName = meta.description;
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "AudioVideo" "Network" ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Twitch.tv browser for Streamlink";
|
|
|
|
longDescription = "Browse Twitch.tv and watch streams in your videoplayer of choice";
|
|
|
|
homepage = "https://streamlink.github.io/streamlink-twitch-gui/";
|
2021-08-22 07:53:02 +00:00
|
|
|
downloadPage = "https://github.com/streamlink/streamlink-twitch-gui/releases";
|
2022-06-26 10:26:21 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rileyinman ];
|
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
};
|
|
|
|
}
|