From b67674e45a2a5392108487cc9c2a9afa6ce4e47f Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 17 Nov 2025 20:25:22 -0500 Subject: [PATCH] vulkan-caps-viewer: fix build on Darwin --- pkgs/tools/graphics/vulkan-caps-viewer/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/graphics/vulkan-caps-viewer/default.nix b/pkgs/tools/graphics/vulkan-caps-viewer/default.nix index 29478c872a2f..0bccbbe0a6ae 100644 --- a/pkgs/tools/graphics/vulkan-caps-viewer/default.nix +++ b/pkgs/tools/graphics/vulkan-caps-viewer/default.nix @@ -6,7 +6,7 @@ vulkan-loader, wayland, wrapQtAppsHook, - x11Support ? true, + x11Support ? !stdenv.hostPlatform.isDarwin, qtx11extras, }: @@ -32,13 +32,14 @@ stdenv.mkDerivation rec { buildInputs = [ vulkan-loader - wayland ] + ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform wayland) [ wayland ] ++ lib.lists.optionals x11Support [ qtx11extras ]; patchPhase = '' substituteInPlace vulkanCapsViewer.pro \ - --replace '/usr/' "/" + --replace-fail '/usr/' "/" \ + --replace-fail '$(VULKAN_SDK)/lib/libvulkan.dylib' '${lib.getLib vulkan-loader}/lib/libvulkan.dylib' ''; qmakeFlags = [ @@ -47,6 +48,11 @@ stdenv.mkDerivation rec { installFlags = [ "INSTALL_ROOT=$(out)" ]; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir -p "$out/Applications" + cp -r vulkanCapsViewer.app "$out/Applications" + ''; + meta = with lib; { mainProgram = "vulkanCapsViewer"; description = "Vulkan hardware capability viewer"; @@ -59,7 +65,5 @@ stdenv.mkDerivation rec { license = licenses.gpl2Only; maintainers = with maintainers; [ pedrohlc ]; changelog = "https://github.com/SaschaWillems/VulkanCapsViewer/releases/tag/${version}"; - # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs - broken = stdenv.hostPlatform.isDarwin; }; }