From e1ee11557dcacb1e66032748cb1b0feb60d48d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joosep=20J=C3=A4=C3=A4ger?= Date: Sat, 27 May 2023 20:35:26 +0300 Subject: [PATCH] Fixed 'which' not found error in kodi steam-launcher --- .../video/kodi/addons/steam-launcher/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/video/kodi/addons/steam-launcher/default.nix b/pkgs/applications/video/kodi/addons/steam-launcher/default.nix index c4a695b8f813..ef6b866e7e33 100644 --- a/pkgs/applications/video/kodi/addons/steam-launcher/default.nix +++ b/pkgs/applications/video/kodi/addons/steam-launcher/default.nix @@ -1,4 +1,4 @@ -{ lib, buildKodiAddon, fetchFromGitHub, steam }: +{ lib, buildKodiAddon, fetchFromGitHub, steam, which, xdotool, dos2unix, wmctrl }: buildKodiAddon { pname = "steam-launcher"; namespace = "script.steam.launcher"; @@ -7,11 +7,19 @@ buildKodiAddon { src = fetchFromGitHub rec { owner = "teeedubb"; repo = owner + "-xbmc-repo"; - rev = "8260bf9b464846a1f1965da495d2f2b7ceb81d55"; - sha256 = "1fj3ry5s44nf1jzxk4bmnpa4b9p23nrpmpj2a4i6xf94h7jl7p5k"; + rev = "d5cea4b590b0ff08ac169b757946b7cb5145b983"; + sha256 = "sha256-arBMMOoHQuHRcJ7eXD1jvA45Svei7c0srcBZkdAzqY0="; }; - propagatedBuildInputs = [ steam ]; + propagatedBuildInputs = [ steam which xdotool ]; + + postInstall = '' + substituteInPlace $out/share/kodi/addons/script.steam.launcher/resources/main.py \ + --replace "\"which\"" "\"${which}/bin/which\"" \ + --replace "\"xdotool\"" "\"${xdotool}/bin/xdotool\"" \ + --replace "\"wmctrl\"" "\"${wmctrl}/bin/wmctrl\"" + ${dos2unix}/bin/dos2unix $out/share/kodi/addons/script.steam.launcher/resources/scripts/steam-launcher.sh + ''; meta = with lib; { homepage = "https://forum.kodi.tv/showthread.php?tid=157499";