2021-05-06 17:44:49 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, libX11, libxcb
|
|
|
|
, libXrandr, wayland, vulkan-headers, addOpenGLRunpath }:
|
2018-10-13 18:54:45 +01:00
|
|
|
|
2020-01-29 06:27:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "vulkan-loader";
|
2021-07-24 04:08:32 +01:00
|
|
|
version = "1.2.182.0";
|
|
|
|
|
|
|
|
src = (assert version == vulkan-headers.version;
|
|
|
|
fetchFromGitHub {
|
|
|
|
owner = "KhronosGroup";
|
|
|
|
repo = "Vulkan-Loader";
|
|
|
|
rev = "sdk-${version}";
|
|
|
|
sha256 = "0gmr9q3a6s8xvaa74fs9zbi9c305i2b3rx768qvl79nhbdj8nc02";
|
|
|
|
});
|
2016-04-02 20:35:14 +01:00
|
|
|
|
2021-05-06 17:44:49 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ libX11 libxcb libXrandr vulkan-headers 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"
|
2021-01-09 22:24:44 +00:00
|
|
|
"-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" ];
|
2016-09-24 17:42:18 +01:00
|
|
|
|
2021-01-09 22:24:44 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-04-02 20:35:14 +01:00
|
|
|
description = "LunarG Vulkan loader";
|
2020-04-01 02:11:51 +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
|
|
|
};
|
|
|
|
}
|