15 enableX11 ? stdenv.hostPlatform.isLinux,
19 stdenv.mkDerivation (finalAttrs: {
20 pname = "vulkan-loader";
21 version = "1.3.296.0";
23 src = fetchFromGitHub {
24 owner = "KhronosGroup";
25 repo = "Vulkan-Loader";
26 rev = "vulkan-sdk-${finalAttrs.version}";
27 hash = "sha256-6GHZUiYL3gDWN61SaLiD/3xXSoQb1rx6U5eu1cl8ZwM=";
31 [ ./fix-pkgconfig.patch ]
32 ++ lib.optionals stdenv.hostPlatform.is32bit [
33 # Backport patch to support 64-bit inodes on 32-bit systems
34 # FIXME: remove in next update
36 url = "https://github.com/KhronosGroup/Vulkan-Loader/commit/ecd88b5c6b1e4c072c55c8652d76513d74c5ad4e.patch";
37 hash = "sha256-Ea+v+RfmVl8fRbkr2ETM3/7R4vp+jw7hvTq2hnw4V/0=";
47 ++ lib.optionals enableX11 [
52 ++ lib.optionals stdenv.hostPlatform.isLinux [
58 "-DCMAKE_INSTALL_INCLUDEDIR=${vulkan-headers}/include"
59 (lib.cmakeBool "BUILD_WSI_XCB_SUPPORT" enableX11)
60 (lib.cmakeBool "BUILD_WSI_XLIB_SUPPORT" enableX11)
62 ++ lib.optional stdenv.hostPlatform.isDarwin "-DSYSCONFDIR=${moltenvk}/share"
63 ++ lib.optional stdenv.hostPlatform.isLinux "-DSYSCONFDIR=${addDriverRunpath.driverLink}/share"
64 ++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "-DUSE_GAS=OFF";
71 doInstallCheck = true;
73 installCheckPhase = ''
74 grep -q "${vulkan-headers}/include" $dev/lib/pkgconfig/vulkan.pc || {
75 echo vulkan-headers include directory not found in pkg-config file
81 tests.pkg-config = testers.hasPkgConfigModules {
82 package = finalAttrs.finalPackage;
87 description = "LunarG Vulkan loader";
88 homepage = "https://www.lunarg.com";
89 platforms = platforms.unix ++ platforms.windows;
90 license = licenses.asl20;
91 maintainers = [ maintainers.ralith ];
92 broken = finalAttrs.version != vulkan-headers.version;
93 pkgConfigModules = [ "vulkan" ];