about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/opencomposite/helper.nix
blob: f19f5e8681393461067300bb03ac766792ab0c74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ writeShellApplication

, monado
, opencomposite
}:
writeShellApplication {
  name = "opencomposite-helper";
  text = ''
    # Tell Proton to use OpenComposite instead of OpenVR
    export VR_OVERRIDE=${opencomposite}/lib/opencomposite
    # Help OpenComposite find the OpenXR runtime
    export XR_RUNTIME_JSON=${monado}/share/openxr/1/openxr_monado.json
    # Tell Steam Pressure Vessel to allow access to Monado
    export PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/monado_comp_ipc
    exec "$@"
  '';
}