mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Merge pull request #108890 from B4dM4n/vulkan-loader-include
vulkan-loader: fix pkg-config include directory
This commit is contained in:
commit
b91b91c03b
@ -15,19 +15,23 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ pkg-config cmake ];
|
||||
buildInputs = [ python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace loader/vulkan.pc.in \
|
||||
--replace 'includedir=''${prefix}/include' 'includedir=${vulkan-headers}/include' \
|
||||
--replace 'libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@' 'libdir=@CMAKE_INSTALL_LIBDIR@'
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
|
||||
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include"
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
grep -q "${vulkan-headers}/include" $dev/lib/pkgconfig/vulkan.pc || {
|
||||
echo vulkan-headers include directory not found in pkg-config file
|
||||
exit 1
|
||||
}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "LunarG Vulkan loader";
|
||||
homepage = "https://www.lunarg.com";
|
||||
|
Loading…
Reference in New Issue
Block a user