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