Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenv
3, fetchFromGitHub
4, qmake
5, vulkan-loader
6, wayland
7, wrapQtAppsHook
8, x11Support ? true
9, qtx11extras
10}:
11
12stdenv.mkDerivation rec {
13 pname = "vulkan-caps-viewer";
14 version = "3.31";
15
16 src = fetchFromGitHub {
17 owner = "SaschaWillems";
18 repo = "VulkanCapsViewer";
19 rev = version;
20 hash = "sha256-+cJtJPpEFHyy+CbPm0IB2nDa7FM1JY8NOsqGB/WIY2A=";
21 # Note: this derivation strictly requires vulkan-header to be the same it was developed against.
22 # To help us, they've put it in a git-submodule.
23 # The result will work with any vulkan-loader version.
24 fetchSubmodules = true;
25 };
26
27 nativeBuildInputs = [
28 qmake
29 wrapQtAppsHook
30 ];
31
32 buildInputs = [
33 vulkan-loader
34 wayland
35 ] ++ lib.lists.optionals x11Support [ qtx11extras ];
36
37 patchPhase = ''
38 substituteInPlace vulkanCapsViewer.pro \
39 --replace '/usr/' "/"
40 '';
41
42 qmakeFlags = [
43 "CONFIG+=release"
44 ];
45
46 installFlags = [ "INSTALL_ROOT=$(out)" ];
47
48 meta = with lib; {
49 mainProgram = "vulkanCapsViewer";
50 description = "Vulkan hardware capability viewer";
51 longDescription = ''
52 Client application to display hardware implementation details for GPUs supporting the Vulkan API by Khronos.
53 The hardware reports can be submitted to a public online database that allows comparing different devices, browsing available features, extensions, formats, etc.
54 '';
55 homepage = "https://vulkan.gpuinfo.org/";
56 platforms = platforms.unix;
57 license = licenses.gpl2Only;
58 maintainers = with maintainers; [ pedrohlc ];
59 changelog = "https://github.com/SaschaWillems/VulkanCapsViewer/releases/tag/${version}";
60 # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
61 broken = stdenv.isDarwin;
62 };
63}