nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkgconfig
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
let
2019-04-18 11:38:57 -07:00
version = "1.1.106";
in
2018-06-26 20:35:34 -07:00
assert version == vulkan-headers.version;
stdenv.mkDerivation rec {
pname = "vulkan-loader";
2018-06-26 20:35:34 -07:00
inherit version;
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}";
2019-04-18 11:38:57 -07:00
sha256 = "0zhrwj1gi90x2w8gaaaw5h4b969a8gfy244kn0drrplhhb1nqz3b";
2016-04-02 12:35:14 -07:00
};
nativeBuildInputs = [ pkgconfig addOpenGLRunpath ];
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
enableParallelBuilding = true;
2016-04-02 12:35:14 -07:00
patches = [ ./system-search-path.patch ];
2016-08-31 13:57:37 -07:00
cmakeFlags = [
"-DSYSTEM_SEARCH_PATH=${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" ];
# 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 12:35:14 -07:00
meta = with stdenv.lib; {
description = "LunarG Vulkan loader";
2018-06-27 13:12:57 -07:00
homepage = https://www.lunarg.com;
2016-04-02 12:35:14 -07:00
platforms = platforms.linux;
license = licenses.asl20;
2017-04-01 12:28:59 -07:00
maintainers = [ maintainers.ralith ];
2016-04-02 12:35:14 -07:00
};
}