2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, mkDerivation
|
|
|
|
, cmake
|
|
|
|
, elfutils
|
|
|
|
, extra-cmake-modules
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kconfigwidgets
|
|
|
|
, ki18n
|
|
|
|
, kio
|
|
|
|
, kitemmodels
|
|
|
|
, kitemviews
|
2023-01-11 07:51:40 +00:00
|
|
|
, kparts
|
2021-09-18 10:52:07 +00:00
|
|
|
, kwindowsystem
|
|
|
|
, libelf
|
|
|
|
, qtbase
|
|
|
|
, threadweaver
|
|
|
|
, qtx11extras
|
|
|
|
, zstd
|
|
|
|
, kddockwidgets
|
|
|
|
, rustc-demangle
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "hotspot";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KDAB";
|
|
|
|
repo = "hotspot";
|
2023-02-16 17:41:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-DW4R7+rnonmEMbCkNS7TGodw+3mEyHl6OlFK3kbG5HM=";
|
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 = [
|
2023-01-11 07:51:40 +00:00
|
|
|
(elfutils.override { enableDebuginfod = true; }) # perfparser needs to find debuginfod.h
|
2020-04-24 23:36:52 +00:00
|
|
|
kconfigwidgets
|
|
|
|
ki18n
|
|
|
|
kio
|
|
|
|
kitemmodels
|
|
|
|
kitemviews
|
2023-01-11 07:51:40 +00:00
|
|
|
kparts
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
qtWrapperArgs = [
|
|
|
|
"--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ rustc-demangle ]}"
|
|
|
|
];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/KDAB/hotspot/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ gpl2Only gpl3Only ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ nh2 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|