2024-09-07 22:38:04 +01:00
|
|
|
{
|
|
|
|
SDL2,
|
|
|
|
fetchFromGitLab,
|
|
|
|
glib,
|
|
|
|
glm,
|
|
|
|
glslang,
|
|
|
|
lib,
|
|
|
|
libGL,
|
|
|
|
makeWrapper,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
openxr-loader,
|
|
|
|
pkg-config,
|
|
|
|
stdenv,
|
|
|
|
unstableGitUpdater,
|
|
|
|
vulkan-headers,
|
|
|
|
vulkan-loader,
|
|
|
|
xxd,
|
2020-12-16 05:30:41 +00:00
|
|
|
}:
|
|
|
|
|
2024-06-18 01:39:51 +01:00
|
|
|
stdenv.mkDerivation {
|
2020-12-16 05:30:41 +00:00
|
|
|
pname = "xrgears";
|
2024-06-18 01:39:51 +01:00
|
|
|
version = "1.0.1-unstable-2024-07-09";
|
2020-12-16 05:30:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "monado";
|
|
|
|
repo = "demos/xrgears";
|
2024-06-18 01:39:51 +01:00
|
|
|
rev = "9cabbd34b1f60f27402a9a50fc260f77a41b835b";
|
|
|
|
sha256 = "sha256-9VV1zAOZKkl1zzjnsQQQOINi+T+wpbltdWpJ/d66+cM=";
|
2020-12-16 05:30:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
glslang
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
xxd
|
2021-12-05 19:58:25 +00:00
|
|
|
makeWrapper
|
2020-12-16 05:30:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glm
|
|
|
|
openxr-loader
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
2021-12-05 19:59:04 +00:00
|
|
|
glib
|
2020-12-16 05:30:41 +00:00
|
|
|
];
|
|
|
|
|
2021-12-05 19:58:25 +00:00
|
|
|
fixupPhase = ''
|
|
|
|
wrapProgram $out/bin/xrgears \
|
2024-09-07 22:38:04 +01:00
|
|
|
--prefix LD_LIBRARY_PATH : ${
|
|
|
|
lib.makeLibraryPath [
|
|
|
|
SDL2
|
|
|
|
libGL
|
|
|
|
]
|
|
|
|
}
|
2021-12-05 19:58:25 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-18 01:42:47 +01:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-16 05:30:41 +00:00
|
|
|
homepage = "https://gitlab.freedesktop.org/monado/demos/xrgears";
|
|
|
|
description = "OpenXR example using Vulkan for rendering";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "xrgears";
|
2020-12-16 05:30:41 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.mit;
|
2024-11-08 04:56:36 +00:00
|
|
|
maintainers = with maintainers; [ Scrumplex ];
|
2020-12-16 05:30:41 +00:00
|
|
|
};
|
|
|
|
}
|