From 7e8402ce4e67aa0bba19ed90e6be1b8c8fa65cd9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 10 Aug 2025 22:39:05 +0200 Subject: [PATCH] wlx-overlay-s: make openvr support optional, disable on aarch64-linux wlx-overlay-s uses https://github.com/galister/ovr_overlay_oyasumi/pull/2, which pulls in a version of ovr_overlay_sys with a build.rs file that doesn't build on aarch64-linux. https://github.com/galister/ovr_overlay_oyasumi is a fork of https://github.com/Raphiiko/ovr_overlay_oyasumi, which is a fork of https://github.com/TheButlah/ovr_overlay, with the latter not updated in two years. Luckily openvr is kinda discouraged, and openxr is the new kid on the block, and openvr support can be feature-flagged out. So let's do this, by adding a withOpenVr option to the derivation, that defaults to false on aarch64-linux, unbreaking it there. We still keep openvr support for x86_64-linux enabled, to not regress experience for people already using openvr on x86_64-linux. --- pkgs/by-name/wl/wlx-overlay-s/package.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wl/wlx-overlay-s/package.nix b/pkgs/by-name/wl/wlx-overlay-s/package.nix index a6a77dd7a82a..597225f104b6 100644 --- a/pkgs/by-name/wl/wlx-overlay-s/package.nix +++ b/pkgs/by-name/wl/wlx-overlay-s/package.nix @@ -22,6 +22,8 @@ testers, wayland, wlx-overlay-s, + # openvr support is broken on aarch64-linux + withOpenVr ? !stdenv.hostPlatform.isAarch64, }: rustPlatform.buildRustPackage rec { @@ -37,6 +39,17 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-em5sWSty2/pZp2jTwBnLUIBgPOcoMpwELwj984XYf+k="; + # explicitly only add openvr if withOpenVr is set to true. + buildNoDefaultFeatures = true; + buildFeatures = [ + "openxr" + "osc" + "x11" + "wayland" + "wayvr" + ] + ++ lib.optional withOpenVr "openvr"; + nativeBuildInputs = [ makeWrapper pkg-config @@ -52,11 +65,11 @@ rustPlatform.buildRustPackage rec { libXext libXrandr libxkbcommon - openvr openxr-loader pipewire wayland - ]; + ] + ++ lib.optional withOpenVr openvr; env.SHADERC_LIB_DIR = "${lib.getLib shaderc}/lib"; @@ -79,7 +92,7 @@ rustPlatform.buildRustPackage rec { license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ Scrumplex ]; platforms = lib.platforms.linux; - broken = stdenv.hostPlatform.isAarch64; + broken = stdenv.hostPlatform.isAarch64 && withOpenVr; mainProgram = "wlx-overlay-s"; }; }