mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
wayvr: fix xwayland-satellite executable path
(cherry picked from commit 95d30c22ff)
This commit is contained in:
committed by
github-actions[bot]
parent
e59ddbc141
commit
dc86f6fbfa
@@ -18,11 +18,13 @@
|
||||
pkg-config,
|
||||
procps,
|
||||
pulseaudio,
|
||||
replaceVars,
|
||||
rustPlatform,
|
||||
shaderc,
|
||||
stdenv,
|
||||
testers,
|
||||
wayvr,
|
||||
xwayland-satellite,
|
||||
withOpenVR ? !stdenv.hostPlatform.isAarch64,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
@@ -36,6 +38,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
hash = "sha256-0llU19bFJJ4yJvA6eGzOzyW8TnnurTS9js3/r+UAVCQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./use-system-xwayland-satellite.patch {
|
||||
xwayland-satellite = lib.getExe xwayland-satellite;
|
||||
})
|
||||
];
|
||||
|
||||
cargoHash = "sha256-yUHLtB3/cBEWVAN1vuGLLlLFqJ25ucIy6qqInTGaOvA=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
25
pkgs/by-name/wa/wayvr/use-system-xwayland-satellite.patch
Normal file
25
pkgs/by-name/wa/wayvr/use-system-xwayland-satellite.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
diff --git a/wayvr/src/backend/wayvr/client.rs b/wayvr/src/backend/wayvr/client.rs
|
||||
index 734e8b68..17058705 100644
|
||||
--- a/wayvr/src/backend/wayvr/client.rs
|
||||
+++ b/wayvr/src/backend/wayvr/client.rs
|
||||
@@ -98,7 +98,7 @@ impl WayVRCompositor {
|
||||
) -> anyhow::Result<Self> {
|
||||
let (wayland_env, listener) = create_wayland_listener()?;
|
||||
|
||||
- let xwayland_satellite = Command::new(bundled_executable("xwayland-satellite"))
|
||||
+ let xwayland_satellite = Command::new("@xwayland-satellite@")
|
||||
.arg(wayland_env.display_num_string())
|
||||
.env("WAYLAND_DISPLAY", wayland_env.wayland_display_num_string())
|
||||
.spawn()
|
||||
@@ -468,11 +468,3 @@ fn accumulate_discrete_scroll(acc: &mut f32, delta_v120: i32) -> i32 {
|
||||
|
||||
steps
|
||||
}
|
||||
-
|
||||
-/// Runs executable from APPDIR, falling back to PATH
|
||||
-fn bundled_executable(name: impl AsRef<std::path::Path>) -> PathBuf {
|
||||
- match std::env::var_os("APPDIR") {
|
||||
- Some(appdir) => PathBuf::from(appdir).join("usr").join("bin").join(name),
|
||||
- None => PathBuf::from(name.as_ref()),
|
||||
- }
|
||||
-}
|
||||
Reference in New Issue
Block a user