mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / by-name / gp / gpu-viewer / package.nix
blob7e3420a683967fc0beb076cc235a5d3824fbf3d7
2   lib,
3   python3Packages,
4   fetchFromGitHub,
6   # nativeBuildInputs
7   gobject-introspection,
8   meson,
9   ninja,
10   pkg-config,
11   wrapGAppsHook4,
13   # buildInputs
14   gdk-pixbuf,
15   gtk4,
16   libadwaita,
17   vulkan-tools,
19   # wrapper
20   python3,
21   clinfo,
22   lsb-release,
23   mesa-demos,
24   vdpauinfo,
26   # passthru
27   nix-update-script,
30 python3Packages.buildPythonApplication rec {
31   pname = "gpu-viewer";
32   version = "3.08";
34   format = "other";
36   src = fetchFromGitHub {
37     owner = "arunsivaramanneo";
38     repo = "gpu-viewer";
39     rev = "refs/tags/v${version}";
40     hash = "sha256-P1zA/sjE4w2pdRDtJ8pGi4Rf8o4EmiRo6j17BRNu0IA=";
41   };
43   nativeBuildInputs = [
44     gobject-introspection
45     meson
46     ninja
47     pkg-config
48     wrapGAppsHook4
49   ];
51   buildInputs = [
52     gdk-pixbuf
53     gtk4
54     libadwaita
55     vulkan-tools
56   ];
58   pythonPath = with python3Packages; [
59     click
60     pygobject3
61   ];
63   # Prevent double wrapping
64   dontWrapGApps = true;
66   postFixup = ''
67     makeWrapper ${python3.interpreter} $out/bin/gpu-viewer \
68       --prefix PATH : "${
69         lib.makeBinPath [
70           clinfo
71           lsb-release
72           mesa-demos
73           vdpauinfo
74           vulkan-tools
75         ]
76       }" \
77       --add-flags "$out/share/gpu-viewer/Files/GPUViewer.py" \
78       --prefix PYTHONPATH : "$PYTHONPATH" \
79       --chdir "$out/share/gpu-viewer/Files" \
80       ''${makeWrapperArgs[@]} \
81       ''${gappsWrapperArgs[@]}
82   '';
84   passthru = {
85     updateScript = nix-update-script { };
86   };
88   meta = {
89     homepage = "https://github.com/arunsivaramanneo/GPU-Viewer";
90     description = "Front-end to glxinfo, vulkaninfo, clinfo and es2_info";
91     changelog = "https://github.com/arunsivaramanneo/GPU-Viewer/releases/tag/v${version}";
92     maintainers = with lib.maintainers; [ GaetanLepage ];
93     license = lib.licenses.gpl3;
94     platforms = lib.platforms.linux;
95     mainProgram = "gpu-viewer";
96   };