2018-10-13 18:54:45 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig
|
2019-05-22 17:30:05 +01:00
|
|
|
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
|
2018-10-13 18:54:45 +01:00
|
|
|
|
|
|
|
let
|
2019-04-18 19:38:57 +01:00
|
|
|
version = "1.1.106";
|
2018-10-13 18:54:45 +01:00
|
|
|
in
|
|
|
|
|
2018-06-27 04:35:34 +01:00
|
|
|
assert version == vulkan-headers.version;
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "vulkan-loader-${version}";
|
|
|
|
inherit version;
|
2016-04-02 20:35:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
2018-06-27 04:35:34 +01:00
|
|
|
repo = "Vulkan-Loader";
|
2019-02-17 07:57:14 +00:00
|
|
|
rev = "sdk-${version}";
|
2019-04-18 19:38:57 +01:00
|
|
|
sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
|
2016-04-02 20:35:14 +01:00
|
|
|
};
|
|
|
|
|
2019-05-22 17:30:05 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
|
2018-07-17 21:11:16 +01:00
|
|
|
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
2016-09-18 06:19:40 +01:00
|
|
|
enableParallelBuilding = true;
|
2016-04-02 20:35:14 +01:00
|
|
|
|
2019-06-08 19:20:31 +01:00
|
|
|
patches = [ ./system-search-path.patch ];
|
|
|
|
|
2016-08-31 21:57:37 +01:00
|
|
|
cmakeFlags = [
|
2019-06-08 19:20:31 +01:00
|
|
|
"-DSYSTEM_SEARCH_PATH=${addOpenGLRunpath.driverLink}/share"
|
2018-06-27 04:35:34 +01:00
|
|
|
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
|
2016-08-31 21:57:37 +01:00
|
|
|
];
|
|
|
|
|
2018-06-27 04:35:34 +01:00
|
|
|
outputs = [ "out" "dev" ];
|
2016-09-24 17:42:18 +01:00
|
|
|
|
2019-05-22 17:30:05 +01:00
|
|
|
# Set RUNPATH so that driver libraries in /run/opengl-driver(-32)/lib can be found.
|
|
|
|
# See the explanation in addOpenGLRunpath.
|
|
|
|
postFixup = ''
|
|
|
|
addOpenGLRunpath $out/lib/libvulkan.so
|
|
|
|
'';
|
|
|
|
|
2016-04-02 20:35:14 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "LunarG Vulkan loader";
|
2018-06-27 21:12:57 +01:00
|
|
|
homepage = https://www.lunarg.com;
|
2016-04-02 20:35:14 +01:00
|
|
|
platforms = platforms.linux;
|
2017-01-04 09:56:26 +00:00
|
|
|
license = licenses.asl20;
|
2017-04-01 20:28:59 +01:00
|
|
|
maintainers = [ maintainers.ralith ];
|
2016-04-02 20:35:14 +01:00
|
|
|
};
|
|
|
|
}
|