58 enableCuda ? config.cudaSupport,
59 # Set as 'false' to build monado without service support, i.e. allow VR
60 # applications linking against libopenxr_monado.so to use OpenXR standalone
61 # instead of via the monado-service program. For more information see:
62 # https://gitlab.freedesktop.org/monado/monado/-/blob/master/doc/targets.md#xrt_feature_service-disabled
63 serviceSupport ? true,
64 tracingSupport ? false,
67 stdenv.mkDerivation (finalAttrs: {
71 src = fetchFromGitLab {
72 domain = "gitlab.freedesktop.org";
75 rev = "refs/tags/v${finalAttrs.version}";
76 hash = "sha256-lFy0VvaLD4Oyu2TZJnaIWjuaJUZjGGDJS0VsRfIUpcc=";
87 # known disabled drivers/features:
88 # - DRIVER_DEPTHAI - Needs depthai-core https://github.com/luxonis/depthai-core (See https://github.com/NixOS/nixpkgs/issues/292618)
89 # - DRIVER_ILLIXR - needs ILLIXR headers https://github.com/ILLIXR/ILLIXR (See https://github.com/NixOS/nixpkgs/issues/292661)
90 # - DRIVER_ULV2 - Needs proprietary Leapmotion SDK https://api.leapmotion.com/documentation/v2/unity/devguide/Leap_SDK_Overview.html (See https://github.com/NixOS/nixpkgs/issues/292624)
91 # - DRIVER_ULV5 - Needs proprietary Leapmotion SDK https://api.leapmotion.com/documentation/v2/unity/devguide/Leap_SDK_Overview.html (See https://github.com/NixOS/nixpkgs/issues/292624)
137 ++ lib.optionals tracingSupport [
142 # Remove this patch on the next update
143 # https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2338
145 name = "improve-reproducibility.patch";
146 url = "https://gitlab.freedesktop.org/monado/monado/-/commit/9819fb6dd61d2af5b2d993ed37b976760002b055.patch";
147 hash = "sha256-qpTF1Q64jl8ZnJzMtflrpHLahCqfde2DXA9/Avlc18I=";
152 (lib.cmakeBool "XRT_FEATURE_SERVICE" serviceSupport)
153 (lib.cmakeBool "XRT_HAVE_TRACY" tracingSupport)
154 (lib.cmakeBool "XRT_FEATURE_TRACING" tracingSupport)
155 (lib.cmakeBool "XRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH" true)
156 (lib.cmakeBool "XRT_HAVE_STEAM" true)
157 (lib.optionals enableCuda "-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}")
160 # Help openxr-loader find this runtime
161 setupHook = writeText "setup-hook" ''
162 export XDG_CONFIG_DIRS=@out@/etc/xdg''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}}
166 updateScript = nix-update-script { };
167 tests.basic-service = nixosTests.monado;
171 description = "Open source XR runtime";
172 homepage = "https://monado.freedesktop.org/";
173 license = lib.licenses.boost;
174 maintainers = with lib.maintainers; [
178 platforms = lib.platforms.linux;
179 mainProgram = "monado-cli";