treewide: remove jovian-steam-protocol-handler, just call normal Steam

Our bootstrap script can handle this now.
This commit is contained in:
K900
2024-10-16 11:32:50 +03:00
parent 23170582b0
commit eda0daea9d
9 changed files with 11 additions and 51 deletions

View File

@@ -52,7 +52,6 @@ rec {
jovian-stubs = final.callPackage ./pkgs/jovian-stubs { };
jovian-greeter = final.callPackage ./pkgs/jovian-greeter { };
jovian-steam-protocol-handler = final.callPackage ./pkgs/jovian-steam-protocol-handler { };
jovian-documentation = final.callPackage ./support/docs {
pagefind = final.callPackage ./pkgs/pagefind { };

View File

@@ -84,7 +84,8 @@ let
prologue = "${writeText "gamescope-session-prologue" ''
# Don't resholve gamescope so we can use the cap_sys_nice wrapper when available
# mangohud is not picked up by resholve due to loop_background
export PATH=/run/wrappers/bin:${gamescope}/bin:${mangohud}/bin:$PATH
# Steam needs to be on PATH for powerbuttond and steam_notif_daemon
export PATH=/run/wrappers/bin:${gamescope}/bin:${mangohud}/bin:${steamPackages.steam}/bin:$PATH
# Make gamescope discover the Steam cursor theme
export XCURSOR_PATH=${plasma5Packages.breeze-qt5}/share/icons:${steamdeck-hw-theme}/share/icons

View File

@@ -1,9 +0,0 @@
{
writeShellScript,
steamPackages,
}:
# FIXME: this is a hack, replace with a better implementation
# Investigate magic socket?
writeShellScript "jovian-steam-protocol-handler" ''
exec ${steamPackages.steam-fhsenv.run}/bin/steam-run ~/.steam/root/ubuntu12_32/steam "$@"
''

View File

@@ -7,7 +7,7 @@ index 386f4d8..cf79351 100755
# TODO use -ifrunning and check return value - if there was a steam process and it returns -1, the message wasn't sent
# need to retry until either steam process is gone or -ifrunning returns 0, or timeout i guess
- systemd-run -M ${DECK_UID}@ --user --collect --wait sh -c "./.steam/root/ubuntu12_32/steam steam://${command}/${encoded@Q}"
+ @systemd@/bin/systemd-run -M ${DECK_UID}@ --user --collect --wait @handler@ "steam://${command}/${encoded@Q}"
+ @systemd@/bin/systemd-run -M ${DECK_UID}@ --user --collect --wait @steam@ "steam://${command}/${encoded@Q}"
echo "Sent URL to steam: steam://${command}/${arg} (steam://${command}/${encoded})"
else
echo "Could not send steam URL steam://${command}/${arg} (steam://${command}/${encoded}) -- steam not running"

View File

@@ -1,8 +1,9 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchFromGitHub,
steamPackages,
substituteAll,
jovian-steam-protocol-handler,
systemd,
}:
@@ -19,8 +20,8 @@ stdenv.mkDerivation rec {
patches = [
(substituteAll {
handler = jovian-steam-protocol-handler;
systemd = systemd;
steam = lib.getExe steamPackages.steam;
src = ./automount-fix-system-paths.patch;
})
# Fix controller updates with python-hid >= 1.0.6

View File

@@ -2,10 +2,8 @@
lib,
stdenv,
fetchFromGitHub,
substituteAll,
pkg-config,
libevdev,
jovian-steam-protocol-handler,
}:
stdenv.mkDerivation {
pname = "powerbuttond";
@@ -14,17 +12,10 @@ stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "powerbuttond";
rev = "ef6d214295a38f186bba9a80cc6f48c055700e3a"; # jovian/multi
hash = "sha256-SD8NpiBIIvI59/HtV19lsJ8/SdBOoyO2rH1OVmDX5Q8=";
rev = "3d3b41afb181bf7cdc2ee3b36f84934cf2bd379d"; # jovian/multi
hash = "sha256-4Q/brmwl3mb8WJYkMejM2IorwVlIb7L2RnIMWczfb8A=";
};
patches = [
(substituteAll {
handler = jovian-steam-protocol-handler;
src = ./jovian.patch;
})
];
postPatch = ''
substituteInPlace Makefile \
--replace '/usr/lib/hwsupport/powerbuttond' '/usr/bin/powerbuttond' \

View File

@@ -1,18 +0,0 @@
diff --git a/powerbuttond.c b/powerbuttond.c
index 722ba77..b8c3c97 100644
--- a/powerbuttond.c
+++ b/powerbuttond.c
@@ -31,12 +31,9 @@ struct libevdev* find_dev(void) {
}
void do_press(const char* type) {
- char steam[PATH_MAX];
+ char* steam = "@handler@";
char press[32];
- char* home = getenv("HOME");
char* const args[] = {steam, "-ifrunning", press, NULL};
-
- snprintf(steam, sizeof(steam), "%s/.steam/root/ubuntu12_32/steam", home);
snprintf(press, sizeof(press), "steam://%spowerpress", type);
pid_t pid = vfork();

View File

@@ -2,13 +2,11 @@
lib,
stdenv,
fetchFromGitHub,
substituteAll,
meson,
ninja,
pkg-config,
systemd,
curl,
jovian-steam-protocol-handler,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "steam_notif_daemon";
@@ -22,10 +20,7 @@ stdenv.mkDerivation (finalAttrs: {
};
patches = [
(substituteAll {
handler = jovian-steam-protocol-handler;
src = ./jovian.patch;
})
./jovian.patch
];
mesonFlags = ["-Dsd-bus-provider=libsystemd"];

View File

@@ -23,7 +23,7 @@ index 97bad39..657ea2b 100644
- snprintf(state->steam_path, sizeof(state->steam_path),
- "%s/.steam/root/ubuntu12_32/steam",
- homedir);
+ state->steam_path = "@handler@";
+ state->steam_path = "steam";
}
static bool init_dbus(struct sfd_state *state) {