2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitLab
|
|
|
|
|
|
|
|
, cmake
|
|
|
|
|
|
|
|
, glm
|
|
|
|
, libGL
|
|
|
|
, openxr-loader
|
|
|
|
, python3
|
|
|
|
, vulkan-headers
|
|
|
|
, vulkan-loader
|
|
|
|
, xorg
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
, nix-update-script
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "opencomposite";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "unstable-2024-03-04";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "znixian";
|
|
|
|
repo = "OpenOVR";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "1bfdf67358add5f573efedbec1fa65d18b790e0e";
|
|
|
|
hash = "sha256-qF5oMI9B5a1oE2gQb/scbom/39Efccja0pTPHHaHMA8=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glm
|
|
|
|
libGL
|
|
|
|
openxr-loader
|
|
|
|
python3
|
|
|
|
vulkan-headers
|
|
|
|
vulkan-loader
|
|
|
|
xorg.libX11
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUSE_SYSTEM_OPENXR=ON"
|
|
|
|
"-DUSE_SYSTEM_GLM=ON"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/lib/opencomposite
|
|
|
|
cp -r bin/ $out/lib/opencomposite
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru.updateScript = nix-update-script {
|
|
|
|
extraArgs = [ "--version=branch=openxr" ];
|
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reimplementation of OpenVR, translating calls to OpenXR";
|
|
|
|
homepage = "https://gitlab.com/znixian/OpenOVR";
|
|
|
|
license = with licenses; [ gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ Scrumplex ];
|
|
|
|
};
|
|
|
|
}
|