depot/third_party/nixpkgs/pkgs/by-name/op/opencomposite/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

68 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchFromGitLab
, cmake
, glm
, libGL
, openxr-loader
, python3
, vulkan-headers
, vulkan-loader
, xorg
, unstableGitUpdater
}:
stdenv.mkDerivation {
pname = "opencomposite";
version = "0-unstable-2024-05-24";
src = fetchFromGitLab {
owner = "znixian";
repo = "OpenOVR";
rev = "762f93d91f4c23ad70c81c81486b6bcd7e9bbb5e";
hash = "sha256-Z1Is+yjyAG8X5+FWaxtCkF7paRGV9ZlNVubuVkeO7yg=";
};
nativeBuildInputs = [
cmake
];
buildInputs = [
glm
libGL
openxr-loader
python3
vulkan-headers
vulkan-loader
xorg.libX11
];
cmakeFlags = [
(lib.cmakeBool "USE_SYSTEM_OPENXR" true)
(lib.cmakeBool "USE_SYSTEM_GLM" true)
# debug logging macros cause format-security warnings
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-Wno-error=format-security")
];
installPhase = ''
runHook preInstall
mkdir -p $out/lib/opencomposite
cp -r bin/ $out/lib/opencomposite
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater {
hardcodeZeroVersion = true;
branch = "openxr";
};
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 ];
};
}