From dff4009b3563298c046caf80908da5899df756e1 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 16 Dec 2020 23:18:13 +0800 Subject: [PATCH 1/3] libsurvive: add expipiplus1 to maintainers --- pkgs/development/libraries/libsurvive/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libsurvive/default.nix b/pkgs/development/libraries/libsurvive/default.nix index 7f326112b2f..11a5cdcf4e9 100644 --- a/pkgs/development/libraries/libsurvive/default.nix +++ b/pkgs/development/libraries/libsurvive/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { description = "Open Source Lighthouse Tracking System"; homepage = "https://github.com/cntools/libsurvive"; license = licenses.mit; - maintainers = with maintainers; [ prusnak ]; + maintainers = with maintainers; [ expipiplus1 prusnak ]; platforms = platforms.linux; }; } From b08b22d85f17f7eae74f3b3637c479771056d78b Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 16 Dec 2020 13:30:41 +0800 Subject: [PATCH 2/3] xrgears: init at unstable-2020-04-15 --- .../applications/graphics/xrgears/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/applications/graphics/xrgears/default.nix diff --git a/pkgs/applications/graphics/xrgears/default.nix b/pkgs/applications/graphics/xrgears/default.nix new file mode 100644 index 00000000000..33aa3ae3575 --- /dev/null +++ b/pkgs/applications/graphics/xrgears/default.nix @@ -0,0 +1,48 @@ +{ stdenv +, fetchFromGitLab +, glm +, glslang +, meson +, ninja +, openxr-loader +, pkg-config +, vulkan-headers +, vulkan-loader +, xxd +}: + +stdenv.mkDerivation rec { + pname = "xrgears"; + version = "unstable-2020-04-15"; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "monado"; + repo = "demos/xrgears"; + rev = "d0bee35fbf8f181e8313f1ead13d88c4fb85c154"; + sha256 = "1k0k8dkclyiav99kf0933kyd2ymz3hs1p0ap2wbciq9s62jgz29i"; + }; + + nativeBuildInputs = [ + glslang + meson + ninja + pkg-config + xxd + ]; + + buildInputs = [ + glm + openxr-loader + vulkan-headers + vulkan-loader + ]; + + meta = with stdenv.lib; { + homepage = "https://gitlab.freedesktop.org/monado/demos/xrgears"; + description = "An OpenXR example using Vulkan for rendering"; + platforms = platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ expipiplus1 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 620a4bbba43..7861a1f9c99 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25553,6 +25553,8 @@ in xrestop = callPackage ../tools/X11/xrestop { }; + xrgears = callPackage ../applications/graphics/xrgears { }; + xsd = callPackage ../development/libraries/xsd { }; xscope = callPackage ../applications/misc/xscope { }; From 42743be017ebf846435789f24877304de396d954 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Fri, 8 Jan 2021 22:55:45 +0100 Subject: [PATCH 3/3] monado: Add serviceSupport option This controls XRT_FEATURE_SERVICE. See https://gitlab.freedesktop.org/monado/monado/-/blob/master/doc/targets.md#xrt_feature_service-disabled for more info. --- pkgs/applications/graphics/monado/default.nix | 37 +++++++++++++++++-- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/monado/default.nix b/pkgs/applications/graphics/monado/default.nix index 61343b3b1b4..7502ab69c32 100644 --- a/pkgs/applications/graphics/monado/default.nix +++ b/pkgs/applications/graphics/monado/default.nix @@ -1,23 +1,29 @@ { stdenv , fetchFromGitLab , fetchpatch +, writeText , cmake +, doxygen +, glslang , pkg-config , python3 , SDL2 , dbus , eigen , ffmpeg -, glslang +, gst-plugins-base +, gstreamer , hidapi , libGL , libXau , libXdmcp , libXrandr , libffi +, libjpeg # , librealsense , libsurvive , libusb1 +, libuv , libuvc , libv4l , libxcb @@ -29,6 +35,11 @@ , wayland , wayland-protocols , zlib +# 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 }: stdenv.mkDerivation rec { @@ -51,23 +62,36 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ cmake pkg-config python3 ]; + nativeBuildInputs = [ + cmake + doxygen + glslang + pkg-config + python3 + ]; + + cmakeFlags = [ + "-DXRT_FEATURE_SERVICE=${if serviceSupport then "ON" else "OFF"}" + ]; buildInputs = [ SDL2 dbus eigen ffmpeg - glslang + gst-plugins-base + gstreamer hidapi libGL libXau libXdmcp libXrandr + libjpeg libffi # librealsense.dev - see below libsurvive libusb1 + libuv libuvc libv4l libxcb @@ -91,11 +115,16 @@ stdenv.mkDerivation rec { # for some reason cmake is trying to use ${librealsense}/include # instead of ${librealsense.dev}/include as an include directory + # Help openxr-loader find this runtime + setupHook = writeText "setup-hook" '' + export XDG_CONFIG_DIRS=@out@/etc/xdg''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}} + ''; + meta = with stdenv.lib; { description = "Open source XR runtime"; homepage = "https://monado.freedesktop.org/"; license = licenses.boost; - maintainers = with maintainers; [ prusnak ]; + maintainers = with maintainers; [ expipiplus1 prusnak ]; platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7861a1f9c99..1225baa0c6e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2492,7 +2492,9 @@ in monetdb = callPackage ../servers/sql/monetdb { }; - monado = callPackage ../applications/graphics/monado {}; + monado = callPackage ../applications/graphics/monado { + inherit (gst_all_1) gstreamer gst-plugins-base; + }; mons = callPackage ../tools/misc/mons {};