Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
python3,
|
|
libX11,
|
|
libXxf86vm,
|
|
libXrandr,
|
|
vulkan-headers,
|
|
libGL,
|
|
vulkan-loader,
|
|
wayland,
|
|
pkg-config,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "openxr-loader";
|
|
version = "1.1.51";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "KhronosGroup";
|
|
repo = "OpenXR-SDK-Source";
|
|
tag = "release-${version}";
|
|
hash = "sha256-NEArzegPZNL0zRbnUHrNbNhBtj0IJP+uha1ehzwB7wA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
python3
|
|
pkg-config
|
|
];
|
|
buildInputs = [
|
|
libX11
|
|
libXxf86vm
|
|
libXrandr
|
|
vulkan-headers
|
|
libGL
|
|
vulkan-loader
|
|
wayland
|
|
];
|
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=ON" ];
|
|
|
|
outputs = [
|
|
"out"
|
|
"dev"
|
|
"layers"
|
|
];
|
|
|
|
# https://github.com/KhronosGroup/OpenXR-SDK-Source/issues/305
|
|
postPatch = ''
|
|
substituteInPlace src/loader/openxr.pc.in \
|
|
--replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@
|
|
'';
|
|
|
|
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"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Khronos OpenXR loader";
|
|
homepage = "https://www.khronos.org/openxr";
|
|
platforms = platforms.linux;
|
|
license = licenses.asl20;
|
|
maintainers = [ maintainers.ralith ];
|
|
};
|
|
}
|