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

43 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, cmake, python3, vulkan-headers, pkg-config
, xlibsWrapper, libxcb, libXrandr, libXext, wayland, addOpenGLRunpath }:
2020-01-29 06:27:09 +00:00
stdenv.mkDerivation rec {
pname = "vulkan-loader";
version = "1.2.162.0";
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}";
sha256 = "0w9i2pliw4ccmjyfzff4i2f3hxwsfd54jg7ahv2v634qmx59bsbi";
2016-04-02 20:35:14 +01:00
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ python3 xlibsWrapper libxcb libXrandr libXext wayland ];
2016-04-02 20:35:14 +01:00
2016-08-31 21:57:37 +01:00
cmakeFlags = [
2019-08-06 23:42:10 +01:00
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
2018-06-27 04:35:34 +01:00
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
"-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include"
2016-08-31 21:57:37 +01:00
];
2018-06-27 04:35:34 +01:00
outputs = [ "out" "dev" ];
doInstallCheck = true;
installCheckPhase = ''
grep -q "${vulkan-headers}/include" $dev/lib/pkgconfig/vulkan.pc || {
echo vulkan-headers include directory not found in pkg-config file
exit 1
}
'';
meta = with lib; {
2016-04-02 20:35:14 +01:00
description = "LunarG Vulkan loader";
homepage = "https://www.lunarg.com";
2016-04-02 20:35:14 +01:00
platforms = platforms.linux;
license = licenses.asl20;
2017-04-01 20:28:59 +01:00
maintainers = [ maintainers.ralith ];
2016-04-02 20:35:14 +01:00
};
}