From 70247ea441db776c48935ab9e0eafc9783878d20 Mon Sep 17 00:00:00 2001 From: Angus Trau Date: Thu, 12 Aug 2021 11:39:53 +1000 Subject: streamlink-twitch-gui-bin: fix missing player error --- pkgs/applications/video/streamlink-twitch-gui/bin.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'pkgs/applications/video/streamlink-twitch-gui') diff --git a/pkgs/applications/video/streamlink-twitch-gui/bin.nix b/pkgs/applications/video/streamlink-twitch-gui/bin.nix index 32a35eca92009..53e87fbb2b9d5 100644 --- a/pkgs/applications/video/streamlink-twitch-gui/bin.nix +++ b/pkgs/applications/video/streamlink-twitch-gui/bin.nix @@ -28,6 +28,7 @@ let basename = "streamlink-twitch-gui"; runtimeLibs = lib.makeLibraryPath [ libudev0-shim ]; + runtimeBins = lib.makeBinPath [ streamlink ]; arch = if stdenv.hostPlatform.system == "x86_64-linux" then @@ -90,16 +91,23 @@ stdenv.mkDerivation rec { dontConfigure = true; installPhase = '' + runHook preInstall 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/} - - wrapProgram $out/opt/${basename}/${basename} --add-flags "--no-version-check" --prefix LD_LIBRARY_PATH : ${runtimeLibs} - ln -s "$out/opt/${basename}/${basename}" $out/bin/ - ln -s "${desktopItem}/share/applications" $out/share/ + cp -r "${desktopItem}/share/applications" $out/share/ + runHook postInstall + ''; + + preFixup = '' + gappsWrapperArgs+=( + --add-flags "--no-version-check" \ + --prefix LD_LIBRARY_PATH : ${runtimeLibs} \ + --prefix PATH : ${runtimeBins} + ) ''; desktopItem = makeDesktopItem { @@ -115,7 +123,7 @@ stdenv.mkDerivation rec { 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/"; - downloadPage = https://github.com/streamlink/streamlink-twitch-gui/releases; + downloadPage = "https://github.com/streamlink/streamlink-twitch-gui/releases"; license = licenses.mit; maintainers = with maintainers; [ rileyinman ]; platforms = [ "x86_64-linux" "i686-linux" ]; -- cgit 1.4.1