From 5a10173ba37f1c8dfe2d382b53072bf46843c2b1 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 15 Apr 2024 02:07:20 +0000 Subject: [PATCH] schlock: fix to run on modern sway --- pkgs/additional/schlock/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/additional/schlock/default.nix b/pkgs/additional/schlock/default.nix index aef581b9..b0860460 100644 --- a/pkgs/additional/schlock/default.nix +++ b/pkgs/additional/schlock/default.nix @@ -30,6 +30,20 @@ stdenv.mkDerivation rec { hash = "sha256-Ot86vALt1kkzbBocwh9drCycbRIw2jMKJU4ODe9PYQM="; }; + # wlroots (and thereby sway) no longer supports the outdated zwlr_input_inhibit_manager_v1 protocol. + # it was removed 2023/11: + # in favor of ext-session-lock-v1 + # - see: + # + # schlock errors if the compositor doesn't support that (for security reasons), but + # schlock's approach is fundamentally flawed to begin with: so just patch out that check + # until i have a longer-term solution. + postPatch = '' + substituteInPlace main.c \ + --replace-fail 'if (!state.input_inhibit_manager)' 'if (false)' \ + --replace-fail 'zwlr_input_inhibit_manager_v1_get_inhibitor' '// ' + ''; + nativeBuildInputs = [ copyDesktopItems meson