nixpkgs/pkgs/development/libraries/vulkan-loader/default.nix
Benjamin Saunders f19a3884bc vulkan: 1.2.189.1 -> 1.2.198.0
Upstream has established rigorous tagging practices, allowing us to
simplify things considerably.
2022-01-16 14:57:11 -08:00

43 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.198.0";
src = (assert version == vulkan-headers.version;
fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "sdk-${version}";
sha256 = "sha256-k3eCdZqCjFxpKa0pZ0K4XcORxdSOlr1dFa7C3Qzi04Y=";
});
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 ];
};
}