about summary refs log tree commit diff
path: root/pkgs/applications/video/streamlink-twitch-gui
diff options
context:
space:
mode:
authorAngus Trau <me@angus.ws>2021-08-12 11:39:53 +1000
committerAngus Trau <me@angus.ws>2021-08-13 20:59:07 +1000
commit70247ea441db776c48935ab9e0eafc9783878d20 (patch)
tree73c659862f844c831642ce7db770189b81f69719 /pkgs/applications/video/streamlink-twitch-gui
parentd9fd066b882ab6826609ccec86404cd0eac12411 (diff)
streamlink-twitch-gui-bin: fix missing player error
Diffstat (limited to 'pkgs/applications/video/streamlink-twitch-gui')
-rw-r--r--pkgs/applications/video/streamlink-twitch-gui/bin.nix18
1 files changed, 13 insertions, 5 deletions
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" ];