2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, writeText
|
2023-10-09 19:29:22 +00:00
|
|
|
, bluez
|
2024-04-21 15:54:59 +00:00
|
|
|
, cjson
|
|
|
|
, cmake
|
2021-01-09 10:05:03 +00:00
|
|
|
, dbus
|
2024-04-21 15:54:59 +00:00
|
|
|
, doxygen
|
2021-01-09 10:05:03 +00:00
|
|
|
, eigen
|
2024-04-21 15:54:59 +00:00
|
|
|
, elfutils
|
2021-01-09 10:05:03 +00:00
|
|
|
, ffmpeg
|
2024-04-21 15:54:59 +00:00
|
|
|
, glslang
|
2021-01-09 10:05:03 +00:00
|
|
|
, gst-plugins-base
|
|
|
|
, gstreamer
|
|
|
|
, hidapi
|
2021-12-06 16:07:01 +00:00
|
|
|
, libbsd
|
2024-04-21 15:54:59 +00:00
|
|
|
, libdrm
|
2021-01-09 10:05:03 +00:00
|
|
|
, libffi
|
2024-04-21 15:54:59 +00:00
|
|
|
, libGL
|
2021-01-09 10:05:03 +00:00
|
|
|
, libjpeg
|
2024-04-21 15:54:59 +00:00
|
|
|
, librealsense
|
2021-01-09 10:05:03 +00:00
|
|
|
, libsurvive
|
2024-04-21 15:54:59 +00:00
|
|
|
, libunwind
|
2021-01-09 10:05:03 +00:00
|
|
|
, libusb1
|
|
|
|
, libuv
|
|
|
|
, libuvc
|
|
|
|
, libv4l
|
2024-04-21 15:54:59 +00:00
|
|
|
, libXau
|
2021-01-09 10:05:03 +00:00
|
|
|
, libxcb
|
2024-04-21 15:54:59 +00:00
|
|
|
, libXdmcp
|
|
|
|
, libXext
|
|
|
|
, libXrandr
|
2023-10-09 19:29:22 +00:00
|
|
|
, onnxruntime
|
2021-01-09 10:05:03 +00:00
|
|
|
, opencv4
|
|
|
|
, openhmd
|
2023-10-09 19:29:22 +00:00
|
|
|
, openvr
|
2024-04-21 15:54:59 +00:00
|
|
|
, orc
|
|
|
|
, pcre2
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, SDL2
|
|
|
|
, shaderc
|
2024-06-24 18:47:55 +00:00
|
|
|
, tracy
|
2021-01-09 10:05:03 +00:00
|
|
|
, udev
|
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
2022-06-16 17:23:12 +00:00
|
|
|
, wayland-scanner
|
2021-01-09 10:05:03 +00:00
|
|
|
, zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
, zstd
|
2024-02-29 20:09:43 +00:00
|
|
|
, nixosTests
|
2021-01-09 10:05:03 +00:00
|
|
|
# Set as 'false' to build monado without service support, i.e. allow VR
|
|
|
|
# applications linking against libopenxr_monado.so to use OpenXR standalone
|
|
|
|
# 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
|
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
stdenv.mkDerivation {
|
2021-01-09 10:05:03 +00:00
|
|
|
pname = "monado";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "unstable-2024-01-02";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
2022-06-16 17:23:12 +00:00
|
|
|
owner = "monado";
|
|
|
|
repo = "monado";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "bfa1c16ff9fc759327ca251a5d086b958b1a3b8a";
|
|
|
|
hash = "sha256-wXRwOs9MkDre/VeW686DzmvKjX0qCSS13MILbYQD6OY=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
doxygen
|
|
|
|
glslang
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DXRT_FEATURE_SERVICE=${if serviceSupport then "ON" else "OFF"}"
|
2022-06-16 17:23:12 +00:00
|
|
|
"-DXRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH=ON"
|
2024-06-24 18:47:55 +00:00
|
|
|
"-DXRT_HAVE_TRACY=ON"
|
|
|
|
"-DXRT_FEATURE_TRACING=ON"
|
|
|
|
"-DXRT_HAVE_STEAM=ON"
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
bluez
|
2024-04-21 15:54:59 +00:00
|
|
|
cjson
|
2021-01-09 10:05:03 +00:00
|
|
|
dbus
|
|
|
|
eigen
|
2024-04-21 15:54:59 +00:00
|
|
|
elfutils
|
2021-01-09 10:05:03 +00:00
|
|
|
ffmpeg
|
|
|
|
gst-plugins-base
|
|
|
|
gstreamer
|
|
|
|
hidapi
|
2021-12-06 16:07:01 +00:00
|
|
|
libbsd
|
2024-04-21 15:54:59 +00:00
|
|
|
libdrm
|
2021-01-09 10:05:03 +00:00
|
|
|
libffi
|
2024-04-21 15:54:59 +00:00
|
|
|
libGL
|
|
|
|
libjpeg
|
|
|
|
librealsense
|
2021-01-09 10:05:03 +00:00
|
|
|
libsurvive
|
2024-04-21 15:54:59 +00:00
|
|
|
libunwind
|
2021-01-09 10:05:03 +00:00
|
|
|
libusb1
|
|
|
|
libuv
|
|
|
|
libuvc
|
|
|
|
libv4l
|
2024-04-21 15:54:59 +00:00
|
|
|
libXau
|
2021-01-09 10:05:03 +00:00
|
|
|
libxcb
|
2024-04-21 15:54:59 +00:00
|
|
|
libXdmcp
|
|
|
|
libXext
|
|
|
|
libXrandr
|
2023-10-09 19:29:22 +00:00
|
|
|
onnxruntime
|
2021-01-09 10:05:03 +00:00
|
|
|
opencv4
|
|
|
|
openhmd
|
2023-10-09 19:29:22 +00:00
|
|
|
openvr
|
2024-04-21 15:54:59 +00:00
|
|
|
orc
|
|
|
|
pcre2
|
|
|
|
SDL2
|
|
|
|
shaderc
|
2024-06-24 18:47:55 +00:00
|
|
|
tracy
|
2021-01-09 10:05:03 +00:00
|
|
|
udev
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
2024-04-21 15:54:59 +00:00
|
|
|
wayland-scanner
|
2021-01-09 10:05:03 +00:00
|
|
|
zlib
|
2024-04-21 15:54:59 +00:00
|
|
|
zstd
|
2021-01-09 10:05:03 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# known disabled drivers/features:
|
|
|
|
# - DRIVER_DEPTHAI - Needs depthai-core https://github.com/luxonis/depthai-core (See https://github.com/NixOS/nixpkgs/issues/292618)
|
|
|
|
# - DRIVER_ILLIXR - needs ILLIXR headers https://github.com/ILLIXR/ILLIXR (See https://github.com/NixOS/nixpkgs/issues/292661)
|
|
|
|
# - 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)
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
# Help openxr-loader find this runtime
|
|
|
|
setupHook = writeText "setup-hook" ''
|
|
|
|
export XDG_CONFIG_DIRS=@out@/etc/xdg''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}}
|
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.tests = {
|
|
|
|
basic-service = nixosTests.monado;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Open source XR runtime";
|
|
|
|
homepage = "https://monado.freedesktop.org/";
|
|
|
|
license = licenses.boost;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ Scrumplex expipiplus1 prusnak ];
|
2021-01-09 10:05:03 +00:00
|
|
|
platforms = platforms.linux;
|
2022-06-16 17:23:12 +00:00
|
|
|
mainProgram = "monado-cli";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
}
|