2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2020-12-16 06:30:41 +01:00
|
|
|
, fetchFromGitLab
|
|
|
|
, glm
|
|
|
|
, glslang
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, openxr-loader
|
|
|
|
, pkg-config
|
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, xxd
|
2021-12-05 20:58:25 +01:00
|
|
|
, SDL2
|
|
|
|
, makeWrapper
|
|
|
|
, libGL
|
2021-12-05 20:59:04 +01:00
|
|
|
, glib
|
2020-12-16 06:30:41 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xrgears";
|
2021-12-05 20:59:04 +01:00
|
|
|
version = "unstable-2021-06-19";
|
2020-12-16 06:30:41 +01:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.freedesktop.org";
|
|
|
|
owner = "monado";
|
|
|
|
repo = "demos/xrgears";
|
2021-12-05 20:59:04 +01:00
|
|
|
rev = "6331b98e065494995c9cc4b48ccdd9d5ccaef461";
|
|
|
|
sha256 = "sha256-buw2beTPIWScq+3VQjUyF+uOwS6VF+mnAPHZ2eFGZjc=";
|
2020-12-16 06:30:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
glslang
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
xxd
|
2021-12-05 20:58:25 +01:00
|
|
|
makeWrapper
|
2020-12-16 06:30:41 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glm
|
|
|
|
openxr-loader
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
2021-12-05 20:59:04 +01:00
|
|
|
glib
|
2020-12-16 06:30:41 +01:00
|
|
|
];
|
|
|
|
|
2021-12-05 20:58:25 +01:00
|
|
|
fixupPhase = ''
|
|
|
|
wrapProgram $out/bin/xrgears \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ SDL2 libGL ]}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-12-16 06:30:41 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|