2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig
|
|
|
|
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "vulkan-loader";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "1.2.141.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "Vulkan-Loader";
|
|
|
|
rev = "sdk-${version}";
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "10fyg71dza6qakz5zdchccfn0zcr8b1zpfi2rqir6jpzcbi28kcj";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
|
|
|
buildInputs = [ python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
preConfigure = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
substituteInPlace loader/vulkan.pc.in \
|
|
|
|
--replace 'includedir=''${prefix}/include' 'includedir=${vulkan-headers}/include' \
|
|
|
|
--replace 'libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@' 'libdir=@CMAKE_INSTALL_LIBDIR@'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
|
|
|
|
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
|
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LunarG Vulkan loader";
|
|
|
|
homepage = "https://www.lunarg.com";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.ralith ];
|
|
|
|
};
|
|
|
|
}
|