2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv
|
2020-12-16 08:30:41 +03:00
|
|
|
, fetchFromGitLab
|
|
|
|
, glm
|
|
|
|
, glslang
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, openxr-loader
|
|
|
|
, pkg-config
|
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, xxd
|
2021-12-05 22:58:25 +03:00
|
|
|
, SDL2
|
|
|
|
, makeWrapper
|
|
|
|
, libGL
|
2020-12-16 08:30:41 +03:00
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
2021-12-05 22:58:25 +03:00
|
|
|
makeWrapper
|
2020-12-16 08:30:41 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glm
|
|
|
|
openxr-loader
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
];
|
|
|
|
|
2021-12-05 22:58:25 +03:00
|
|
|
fixupPhase = ''
|
|
|
|
wrapProgram $out/bin/xrgears \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ SDL2 libGL ]}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2020-12-16 08:30:41 +03: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 ];
|
|
|
|
};
|
|
|
|
}
|