Unverified Commit 68b821ff authored by Sefa Eyeoglu's avatar Sefa Eyeoglu
Browse files

monado: gate tracing support behind argument

parent 9a90c6b6
Loading
Loading
Loading
Loading
+50 −46
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@
  # instead of via the monado-service program. For more information see:
  # https://gitlab.freedesktop.org/monado/monado/-/blob/master/doc/targets.md#xrt_feature_service-disabled
  serviceSupport ? true,
  tracingSupport ? false,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -89,7 +90,8 @@ stdenv.mkDerivation (finalAttrs: {
  #  - 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)
  #  - 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)

  buildInputs = [
  buildInputs =
    [
      bluez
      cjson
      dbus
@@ -123,7 +125,6 @@ stdenv.mkDerivation (finalAttrs: {
      pcre2
      SDL2
      shaderc
    tracy
      udev
      vulkan-headers
      vulkan-loader
@@ -132,6 +133,9 @@ stdenv.mkDerivation (finalAttrs: {
      wayland-scanner
      zlib
      zstd
    ]
    ++ lib.optionals tracingSupport [
      tracy
    ];

  patches = [
@@ -146,9 +150,9 @@ stdenv.mkDerivation (finalAttrs: {

  cmakeFlags = [
    (lib.cmakeBool "XRT_FEATURE_SERVICE" serviceSupport)
    (lib.cmakeBool "XRT_HAVE_TRACY" tracingSupport)
    (lib.cmakeBool "XRT_FEATURE_TRACING" tracingSupport)
    (lib.cmakeBool "XRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH" true)
    (lib.cmakeBool "XRT_HAVE_TRACY" true)
    (lib.cmakeBool "XRT_FEATURE_TRACING" true)
    (lib.cmakeBool "XRT_HAVE_STEAM" true)
    (lib.optionals enableCuda "-DCUDA_TOOLKIT_ROOT_DIR=${cudaPackages.cudatoolkit}")
  ];