1{ fetchFromGitHub
2, freetype
3, gtk3
4, lib
5, meson
6, ninja
7, pkg-config
8, SDL2
9, stdenv
10, wrapGAppsHook
11}:
12
13stdenv.mkDerivation rec {
14 pname = "gpuvis";
15 version = "20211204";
16
17 src = fetchFromGitHub {
18 owner = "mikesart";
19 repo = pname;
20 rev = "7f47419470687c7ecbdf086b81f5bafdb05d1bef";
21 sha256 = "sha256-29Bv+y0zWzn7QtpsjRV6hr19bCeyVJusPcYiAIEIluk=";
22 };
23
24 # patch dlopen path for gtk3
25 postPatch = ''
26 substituteInPlace src/hook_gtk3.h \
27 --replace "libgtk-3.so" "${lib.getLib gtk3}/lib/libgtk-3.so"
28 '';
29
30 nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook ];
31
32 buildInputs = [ SDL2 gtk3 freetype ];
33
34 meta = with lib; {
35 description = "GPU Trace Visualizer";
36 homepage = "https://github.com/mikesart/gpuvis";
37 license = licenses.mit;
38 maintainers = with maintainers; [ emantor ];
39 platforms = with platforms; linux;
40 };
41}