mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
704efbd9aa
OpenComposite can't work on macOS as openxr-loader doesn't work on darwin. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
{
|
|
cmake,
|
|
fetchFromGitLab,
|
|
glm,
|
|
jsoncpp,
|
|
lib,
|
|
libGL,
|
|
python3,
|
|
stdenv,
|
|
unstableGitUpdater,
|
|
vulkan-headers,
|
|
vulkan-loader,
|
|
xorg,
|
|
openxr-loader,
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "opencomposite";
|
|
version = "0-unstable-2024-10-28";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "znixian";
|
|
repo = "OpenOVR";
|
|
rev = "e162c7e9be2521a357fba4bee13af85437a1027b";
|
|
fetchSubmodules = true;
|
|
hash = "sha256-+suq0gV8zRDhF3ApnzQCC/5st59VniU6v7TcDdght6Q=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [
|
|
glm
|
|
jsoncpp
|
|
libGL
|
|
python3
|
|
vulkan-headers
|
|
vulkan-loader
|
|
xorg.libX11
|
|
];
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-Wno-error=format-security")
|
|
# See https://gitlab.com/znixian/OpenOVR/-/issues/416
|
|
(lib.cmakeBool "USE_SYSTEM_OPENXR" false)
|
|
(lib.cmakeBool "USE_SYSTEM_GLM" true)
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/lib/opencomposite
|
|
cp -r bin/ $out/lib/opencomposite
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
hardcodeZeroVersion = true;
|
|
branch = "openxr";
|
|
};
|
|
|
|
meta = {
|
|
description = "Reimplementation of OpenVR, translating calls to OpenXR";
|
|
homepage = "https://gitlab.com/znixian/OpenOVR";
|
|
license = with lib.licenses; [ gpl3Only ];
|
|
maintainers = with lib.maintainers; [ Scrumplex ];
|
|
# This can realistically only work on systems that support OpenXR Loader
|
|
inherit (openxr-loader.meta) platforms;
|
|
};
|
|
}
|