depot/third_party/nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix
Default email a3bb8d7922 Project import generated by Copybara.
GitOrigin-RevId: 439b1605227b8adb1357b55ce8529d541abbe9eb
2021-08-06 00:33:18 +03:00

42 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb
, libXrandr, wayland, vulkan-headers, addOpenGLRunpath }:
stdenv.mkDerivation rec {
pname = "vulkan-loader";
version = "1.2.182.0";
src = (assert version == vulkan-headers.version;
fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "sdk-${version}";
sha256 = "0gmr9q3a6s8xvaa74fs9zbi9c305i2b3rx768qvl79nhbdj8nc02";
});
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libX11 libxcb libXrandr vulkan-headers wayland ];
cmakeFlags = [
"-DSYSCONFDIR=${addOpenGLRunpath.driverLink}/share"
"-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include"
];
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; {
description = "LunarG Vulkan loader";
homepage = "https://www.lunarg.com";
platforms = platforms.linux;
license = licenses.asl20;
maintainers = [ maintainers.ralith ];
};
}