nixos/monado: install monado-vulkan-layers (#301044)

This commit is contained in:
Sefa Eyeoglu 2024-10-31 19:21:38 +01:00 committed by GitHub
commit 17313151da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 0 deletions

View File

@ -93,6 +93,8 @@ in
environment.systemPackages = [ cfg.package ];
environment.pathsToLink = [ "/share/openxr" ];
hardware.opengl.extraPackages = [ pkgs.monado-vulkan-layers ];
environment.etc."xdg/openxr/1/active_runtime.json" = mkIf cfg.defaultRuntime {
source = "${cfg.package}/share/openxr/1/openxr_monado.json";
};

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9a1b56..9a07e69 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ generate_vulkan_api_layer_manifest_at_install(
RELATIVE_LAYER_DIR ${LAYER_INSTALLDIR}
DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan/implicit_layer.d
COMPONENT vulkan_layer
+ ABSOLUTE_LAYER_PATH
)
set(CPACK_COMPONENT_vulkan_layer_DISPLAY_NAME "Timeline Semaphore Vulkan Implicit Layer")

View File

@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
vulkan-headers,
vulkan-loader,
}:
stdenv.mkDerivation {
pname = "monado-vulkan-layers";
version = "0-unstable-2024-02-21";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "monado";
repo = "utilities/vulkan-layers";
rev = "ae43cdcbd25c56e3481bbc8a0ce2bfcebba9f7c2";
sha256 = "sha256-QabYVKcenW+LQ+QSjUoQOLOQAVHdjE0YXd+1WsdzNPc=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
vulkan-headers
vulkan-loader
];
patches = [
./absolute-layer-path.patch
];
meta = with lib; {
description = "Vulkan Layers for Monado";
homepage = "https://gitlab.freedesktop.org/monado/utilities/vulkan-layers";
platforms = platforms.linux;
license = licenses.boost;
maintainers = with maintainers; [
Scrumplex
passivelemon
];
};
}