2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, qmake, qtbase, perl, python, php, kcachegrind }:
|
2017-03-12 21:54:14 +01:00
|
|
|
|
2018-01-12 18:43:26 +01:00
|
|
|
let
|
|
|
|
name = stdenv.lib.replaceStrings ["kcachegrind"] ["qcachegrind"] kcachegrind.name;
|
2017-03-12 21:54:14 +01:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
in stdenv.mkDerivation {
|
2018-01-12 18:43:26 +01:00
|
|
|
inherit name;
|
|
|
|
|
|
|
|
src = kcachegrind.src;
|
2017-03-12 21:54:14 +01:00
|
|
|
|
2017-03-24 18:28:29 +01:00
|
|
|
buildInputs = [ qtbase perl python php ];
|
2017-03-12 21:54:14 +01:00
|
|
|
|
2017-05-17 21:26:11 +02:00
|
|
|
nativeBuildInputs = [ qmake ];
|
2017-03-12 21:54:14 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -p converters/dprof2calltree $out/bin/dprof2calltree
|
|
|
|
cp -p converters/hotshot2calltree.cmake $out/bin/hotshot2calltree
|
|
|
|
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"
|
2018-01-12 18:43:26 +01:00
|
|
|
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"
|
2017-03-12 21:54:14 +01:00
|
|
|
'');
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A Qt GUI to visualize profiling data";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ periklis ];
|
|
|
|
};
|
|
|
|
}
|