nixpkgs/pkgs/tools/graphics/vulkan-caps-viewer/default.nix
Rick van Schijndel 9833d56c24 treewide: mark packages broken that never built on PLATFORM
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.

I manually audited the results and removed some results that were not valid.

Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.

Some observations:

- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
  - gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
  platforms that are not x86_64-linux
2022-12-13 21:40:12 +01:00

62 lines
1.7 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, qmake
, vulkan-loader
, wrapQtAppsHook
, withX11 ? true
, qtx11extras
}:
stdenv.mkDerivation rec {
pname = "vulkan-caps-viewer";
version = "3.27";
src = fetchFromGitHub {
owner = "SaschaWillems";
repo = "VulkanCapsViewer";
rev = version;
hash = "sha256-B/FBX63JnBdshNLVMPA0qGnm0c/RGilIahX3VjJnpkI=";
# Note: this derivation strictly requires vulkan-header to be the same it was developed against.
# To help us, they've put it in a git-submodule.
# The result will work with any vulkan-loader version.
fetchSubmodules = true;
};
nativeBuildInputs = [
qmake
wrapQtAppsHook
];
buildInputs = [
vulkan-loader
] ++ lib.lists.optionals withX11 [ qtx11extras ];
patchPhase = ''
substituteInPlace vulkanCapsViewer.pro \
--replace '/usr/' "/"
'';
qmakeFlags = [
"DEFINES+=wayland"
"CONFIG+=release"
] ++ lib.lists.optionals withX11 [ "DEFINES+=X11" ];
installFlags = [ "INSTALL_ROOT=$(out)" ];
meta = with lib; {
mainProgram = "vulkanCapsViewer";
description = "Vulkan hardware capability viewer";
longDescription = ''
Client application to display hardware implementation details for GPUs supporting the Vulkan API by Khronos.
The hardware reports can be submitted to a public online database that allows comparing different devices, browsing available features, extensions, formats, etc.
'';
homepage = "https://vulkan.gpuinfo.org/";
platforms = platforms.unix;
license = licenses.gpl2Only;
maintainers = with maintainers; [ pedrohlc ];
# never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
broken = stdenv.isDarwin;
};
}