From 5959e69ef2a806402b50ed774770225664857d13 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Tue, 22 Jul 2025 23:26:10 +0800 Subject: [PATCH] iio-sensor-proxy: Fix on cros-ec devices (e.g. Framework 12) https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/400 has finally been merged and fixed the regression in version 3.7. Since the merging has taken a long time, I don't expect a new release soon and we should include the patches. Also see https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/411 Now monitor-sensor can show the display orientation and GNOME/KDE pick it up. Signed-off-by: Daniel Schaefer --- pkgs/by-name/ii/iio-sensor-proxy/package.nix | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/by-name/ii/iio-sensor-proxy/package.nix b/pkgs/by-name/ii/iio-sensor-proxy/package.nix index dee2b98620a6..e30fb572ea1b 100644 --- a/pkgs/by-name/ii/iio-sensor-proxy/package.nix +++ b/pkgs/by-name/ii/iio-sensor-proxy/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitLab, + fetchpatch2, glib, cmake, libxml2, @@ -26,6 +27,26 @@ stdenv.mkDerivation rec { hash = "sha256-MAfh6bgh39J5J3rlyPjyCkk5KcfWHMZLytZcBRPHaJE="; }; + # Fix devices with cros-ec-accel, like Chromebooks and Framework Laptop 12 + # https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/400 + patches = [ + (fetchpatch2 { + name = "mr400_1.patch"; + url = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/commit/f35d293e65841a3b9c0de778300c7fa58b181fd0.patch"; + hash = "sha256-Gk8Wpy+KFhHAsR3XklcsL3Eo4fHjQuFT6PCN5hz9KHk="; + }) + (fetchpatch2 { + name = "mr400_2.patch"; + url = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/commit/7416edf4da98d8e3b75f9eddb7e5c488ac4a4c54.patch"; + hash = "sha256-5UnYam6P+paBHAI0qKXDAvrFM8JYhRVTUFePRTHCp+U="; + }) + (fetchpatch2 { + name = "mr400_3.patch"; + url = "https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/commit/d00109194422a4fe3e9a7bc1235ffc492459c61a.patch"; + hash = "sha256-58KrXbdpR1eWbPmsr8b0ke67hX5J0o0gtqzrz3dc+ck="; + }) + ]; + postPatch = '' # upstream meson.build currently doesn't have an option to change the default polkit dir substituteInPlace data/meson.build \