2018-10-13 10:54:45 -07:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig
|
2019-05-22 09:30:05 -07:00
|
|
|
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
|
2018-10-13 10:54:45 -07:00
|
|
|
|
2020-01-28 22:27:09 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "vulkan-loader";
|
2020-12-14 19:59:22 -08:00
|
|
|
version = "1.2.162.0";
|
2016-04-02 12:35:14 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
2018-06-26 20:35:34 -07:00
|
|
|
repo = "Vulkan-Loader";
|
2019-02-16 23:57:14 -08:00
|
|
|
rev = "sdk-${version}";
|
2020-12-14 19:59:22 -08:00
|
|
|
sha256 = "0w9i2pliw4ccmjyfzff4i2f3hxwsfd54jg7ahv2v634qmx59bsbi";
|
2016-04-02 12:35:14 -07:00
|
|
|
};
|
|
|
|
|
2020-03-10 19:57:39 -07:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
|
|
|
buildInputs = [ python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
2016-09-17 22:19:40 -07:00
|
|
|
enableParallelBuilding = true;
|
2016-04-02 12:35:14 -07:00
|
|
|
|
2020-03-12 10:31:51 -07:00
|
|
|
preConfigure = ''
|
2020-09-10 08:58:54 -07: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-03-12 10:31:51 -07:00
|
|
|
'';
|
|
|
|
|
2016-08-31 13:57:37 -07:00
|
|
|
cmakeFlags = [
|
2019-08-06 15:42:10 -07:00
|
|
|
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
|
2018-06-26 20:35:34 -07:00
|
|
|
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
|
2016-08-31 13:57:37 -07:00
|
|
|
];
|
|
|
|
|
2018-06-26 20:35:34 -07:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-09-24 09:42:18 -07:00
|
|
|
|
2016-04-02 12:35:14 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LunarG Vulkan loader";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://www.lunarg.com";
|
2016-04-02 12:35:14 -07:00
|
|
|
platforms = platforms.linux;
|
2017-01-04 01:56:26 -08:00
|
|
|
license = licenses.asl20;
|
2017-04-01 12:28:59 -07:00
|
|
|
maintainers = [ maintainers.ralith ];
|
2016-04-02 12:35:14 -07:00
|
|
|
};
|
|
|
|
}
|