2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, cmake
|
|
|
|
, elfutils
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kconfigwidgets
|
|
|
|
, ki18n
|
|
|
|
, kio
|
|
|
|
, kitemmodels
|
|
|
|
, kitemviews
|
|
|
|
, kwindowsystem
|
|
|
|
, libelf
|
|
|
|
, qtbase
|
|
|
|
, threadweaver
|
|
|
|
, qtx11extras
|
|
|
|
, zstd
|
|
|
|
, kddockwidgets
|
|
|
|
, rustc-demangle
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hotspot";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "1.3.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KDAB";
|
|
|
|
repo = "hotspot";
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1f68bssh3p387hkavfjkqcf7qf7w5caznmjfjldicxphap4riqr5";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
elfutils
|
|
|
|
kconfigwidgets
|
|
|
|
ki18n
|
|
|
|
kio
|
|
|
|
kitemmodels
|
|
|
|
kitemviews
|
|
|
|
kwindowsystem
|
|
|
|
libelf
|
|
|
|
qtbase
|
|
|
|
threadweaver
|
2021-09-18 10:52:07 +00:00
|
|
|
qtx11extras
|
|
|
|
zstd
|
|
|
|
kddockwidgets
|
|
|
|
rustc-demangle
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# hotspot checks for the presence of third party libraries'
|
|
|
|
# git directory to give a nice warning when you forgot to clone
|
|
|
|
# submodules; but Nix clones them and removes .git (for reproducibility).
|
|
|
|
# So we need to fake their existence here.
|
|
|
|
postPatch = ''
|
2021-09-18 10:52:07 +00:00
|
|
|
mkdir -p 3rdparty/{perfparser,PrefixTickLabels}/.git
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DRUSTC_DEMANGLE_INCLUDE_DIR=${rustc-demangle}/include"
|
|
|
|
"-DRUSTC_DEMANGLE_LIBRARY=${rustc-demangle}/lib/librustc_demangle.so"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
description = "A GUI for Linux perf";
|
|
|
|
longDescription = ''
|
|
|
|
hotspot is a GUI replacement for `perf report`.
|
|
|
|
It takes a perf.data file, parses and evaluates its contents and
|
|
|
|
then displays the result in a graphical way.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/KDAB/hotspot";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = with lib.licenses; [ gpl2Only gpl3Only ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ nh2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|