1{
2 fetchFromGitHub,
3 freetype,
4 gtk3,
5 lib,
6 meson,
7 ninja,
8 pkg-config,
9 SDL2,
10 stdenv,
11 wrapGAppsHook3,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "gpuvis";
16 version = "0.1";
17
18 src = fetchFromGitHub {
19 owner = "mikesart";
20 repo = "gpuvis";
21 rev = "v${version}";
22 hash = "sha256-a9eAYDsiwyzZc4FAPo0wANysisIT4qCHLh2PrYswJtw=";
23 };
24
25 # patch dlopen path for gtk3
26 postPatch = ''
27 substituteInPlace src/hook_gtk3.h \
28 --replace "libgtk-3.so" "${lib.getLib gtk3}/lib/libgtk-3.so"
29 '';
30
31 nativeBuildInputs = [
32 pkg-config
33 meson
34 ninja
35 wrapGAppsHook3
36 ];
37
38 buildInputs = [
39 SDL2
40 gtk3
41 freetype
42 ];
43
44 CXXFLAGS = [
45 # GCC 13: error: 'uint32_t' has not been declared
46 "-include cstdint"
47 ];
48
49 meta = with lib; {
50 description = "GPU Trace Visualizer";
51 mainProgram = "gpuvis";
52 homepage = "https://github.com/mikesart/gpuvis";
53 license = licenses.mit;
54 maintainers = with maintainers; [ emantor ];
55 platforms = platforms.linux;
56 };
57}