about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/hardware/monado.nix2
-rw-r--r--pkgs/by-name/xr/xr-hardware/package.nix27
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/modules/services/hardware/monado.nix b/nixos/modules/services/hardware/monado.nix
index 55ad2c299bae..3178c46c1a83 100644
--- a/nixos/modules/services/hardware/monado.nix
+++ b/nixos/modules/services/hardware/monado.nix
@@ -25,6 +25,8 @@ in
       source = "${cfg.package}/bin/monado-service";
     };
 
+    services.udev.packages = with pkgs; [ xr-hardware ];
+
     systemd.user = {
       services.monado = {
         description = "Monado XR runtime service module";
diff --git a/pkgs/by-name/xr/xr-hardware/package.nix b/pkgs/by-name/xr/xr-hardware/package.nix
new file mode 100644
index 000000000000..b2359c2673df
--- /dev/null
+++ b/pkgs/by-name/xr/xr-hardware/package.nix
@@ -0,0 +1,27 @@
+{
+  lib,
+  stdenvNoCC,
+  fetchFromGitLab
+}: stdenvNoCC.mkDerivation {
+  pname = "xr-hardware";
+  version = "unstable-2023-11-08";
+
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "monado/utilities";
+    repo = "xr-hardware";
+    rev = "9204de323210d2a5ab8635c2ee52127100de67b1";
+    hash = "sha256-ZS15WODms/WKsPu+WbfILO2BOwnxrhCY/SoF8jzOX5Q=";
+  };
+
+  installTargets = "install_package";
+  installFlagsArray = "DESTDIR=${placeholder "out"}";
+
+  meta = with lib; {
+    description = "Hardware description for XR devices";
+    homepage = "https://gitlab.freedesktop.org/monado/utilities/xr-hardware";
+    license = licenses.boost;
+    maintainers = with maintainers; [ Scrumplex ];
+    platforms = platforms.linux;
+  };
+}