2022-05-18 14:49:53 +00:00
|
|
|
{ lib, stdenv, qmake, qtbase, perl, php, kcachegrind, wrapQtAppsHook }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "qcachegrind";
|
|
|
|
version = kcachegrind.version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = kcachegrind.src;
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
buildInputs = [ qtbase perl php ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
nativeBuildInputs = [ qmake wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -p converters/dprof2calltree $out/bin/dprof2calltree
|
|
|
|
cp -p converters/memprof2calltree $out/bin/memprof2calltree
|
|
|
|
cp -p converters/op2calltree $out/bin/op2calltree
|
|
|
|
cp -p converters/pprof2calltree $out/bin/pprof2calltree
|
|
|
|
chmod -R +x $out/bin/
|
|
|
|
'' + (if stdenv.isDarwin then ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp cgview/cgview.app/Contents/MacOS/cgview $out/bin
|
|
|
|
cp -a qcachegrind/qcachegrind.app $out/Applications
|
|
|
|
'' else ''
|
|
|
|
install qcachegrind/qcachegrind cgview/cgview -t "$out/bin"
|
|
|
|
install -Dm644 qcachegrind/qcachegrind.desktop -t "$out/share/applications"
|
|
|
|
install -Dm644 kcachegrind/32-apps-kcachegrind.png "$out/share/icons/hicolor/32x32/apps/kcachegrind.png"
|
|
|
|
install -Dm644 kcachegrind/48-apps-kcachegrind.png "$out/share/icons/hicolor/48x48/apps/kcachegrind.png"
|
|
|
|
'');
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapQtApp "$out/bin/qcachegrind"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Qt GUI to visualize profiling data";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ periklis ];
|
|
|
|
};
|
|
|
|
}
|