2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, python3, libX11, libXxf86vm, libXrandr, vulkan-headers, libGL }:
|
2019-08-09 01:53:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "openxr-loader";
|
2021-11-03 18:12:49 +00:00
|
|
|
version = "1.0.20";
|
2019-08-09 01:53:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "OpenXR-SDK-Source";
|
|
|
|
rev = "release-${version}";
|
2021-11-03 18:12:49 +00:00
|
|
|
sha256 = "sha256-afyAHTyW9x2KxR1q/K3t5Dpv9OzATcYiSgiDn2S924E=";
|
2019-08-09 01:53:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake python3 ];
|
2019-10-05 20:10:47 +00:00
|
|
|
buildInputs = [ libX11 libXxf86vm libXrandr vulkan-headers libGL ];
|
2019-08-09 01:53:19 +00:00
|
|
|
|
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "layers" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p "$layers/share"
|
|
|
|
mv "$out/share/openxr" "$layers/share"
|
|
|
|
# Use absolute paths in manifests so no LD_LIBRARY_PATH shenanigans are necessary
|
|
|
|
for file in "$layers/share/openxr/1/api_layers/explicit.d/"*; do
|
|
|
|
substituteInPlace "$file" --replace '"library_path": "lib' "\"library_path\": \"$layers/lib/lib"
|
|
|
|
done
|
|
|
|
mkdir -p "$layers/lib"
|
|
|
|
mv "$out/lib/libXrApiLayer"* "$layers/lib"
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2019-08-09 01:53:19 +00:00
|
|
|
description = "Khronos OpenXR loader";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.khronos.org/openxr";
|
2019-08-09 01:53:19 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|