From 3c884af75c45b9099f51e42ef57326235733a272 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 14 Sep 2024 15:46:40 +0200 Subject: [PATCH] vulkan-memory-allocator: Apply fix to allow specifying version constraints on CMake module --- pkgs/by-name/vu/vulkan-memory-allocator/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/vu/vulkan-memory-allocator/package.nix b/pkgs/by-name/vu/vulkan-memory-allocator/package.nix index 4ed32516210f..41489f3b9458 100644 --- a/pkgs/by-name/vu/vulkan-memory-allocator/package.nix +++ b/pkgs/by-name/vu/vulkan-memory-allocator/package.nix @@ -1,6 +1,7 @@ { lib , stdenvNoCC , fetchFromGitHub +, fetchpatch , cmake }: @@ -15,6 +16,16 @@ stdenvNoCC.mkDerivation (finalAttrs: { hash = "sha256-j0Z9OEwQx3RB2cni9eK3gYfwkhOc2ST213b6VseaVzg="; }; + patches = [ + # Allows specifying version constraints on the CMake module + # Remove when version > 3.1.0 + (fetchpatch { + name = "0001-vulkan-memory-allocator-add-cmake-package-version-file.patch"; + url = "https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator/commit/257138b8f5686ae84491a3df9f90a77d5660c3bd.patch"; + hash = "sha256-qbQhIJho/WQqzAwB2zzWgGKx4QK9zKmbaGisbNOV8mg="; + }) + ]; + # A compiler is only required for the samples. This lets us use stdenvNoCC. postPatch = '' substituteInPlace CMakeLists.txt \