2021-02-24 18:30:23 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, freetype
|
|
|
|
, gtk3
|
|
|
|
, lib
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, SDL2
|
|
|
|
, stdenv
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2021-02-24 18:30:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gpuvis";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.1";
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mikesart";
|
|
|
|
repo = pname;
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-a9eAYDsiwyzZc4FAPo0wANysisIT4qCHLh2PrYswJtw=";
|
2021-02-24 18:30:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# patch dlopen path for gtk3
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/hook_gtk3.h \
|
|
|
|
--replace "libgtk-3.so" "${lib.getLib gtk3}/lib/libgtk-3.so"
|
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config meson ninja wrapGAppsHook3 ];
|
2021-02-24 18:30:23 +00:00
|
|
|
|
|
|
|
buildInputs = [ SDL2 gtk3 freetype ];
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
CXXFLAGS = [
|
|
|
|
# GCC 13: error: 'uint32_t' has not been declared
|
|
|
|
"-include cstdint"
|
|
|
|
];
|
|
|
|
|
2021-02-24 18:30:23 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "GPU Trace Visualizer";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gpuvis";
|
2021-02-24 18:30:23 +00:00
|
|
|
homepage = "https://github.com/mikesart/gpuvis";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ emantor ];
|
2024-01-02 11:29:13 +00:00
|
|
|
platforms = platforms.linux;
|
2021-02-24 18:30:23 +00:00
|
|
|
};
|
|
|
|
}
|