2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
2024-05-15 15:35:15 +00:00
|
|
|
, stdenv
|
|
|
|
, binutils
|
2021-09-18 10:52:07 +00:00
|
|
|
, cmake
|
|
|
|
, extra-cmake-modules
|
2024-05-15 15:35:15 +00:00
|
|
|
, patchelfUnstable
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, elfutils
|
2021-09-18 10:52:07 +00:00
|
|
|
, fetchFromGitHub
|
2024-05-15 15:35:15 +00:00
|
|
|
, fetchpatch
|
2021-09-18 10:52:07 +00:00
|
|
|
, kconfigwidgets
|
2024-05-15 15:35:15 +00:00
|
|
|
, kddockwidgets
|
2021-09-18 10:52:07 +00:00
|
|
|
, ki18n
|
|
|
|
, kio
|
|
|
|
, kitemmodels
|
|
|
|
, kitemviews
|
2023-01-11 07:51:40 +00:00
|
|
|
, kparts
|
2021-09-18 10:52:07 +00:00
|
|
|
, kwindowsystem
|
|
|
|
, libelf
|
2024-05-15 15:35:15 +00:00
|
|
|
, linuxPackages
|
2021-09-18 10:52:07 +00:00
|
|
|
, qtbase
|
2024-05-15 15:35:15 +00:00
|
|
|
, qtsvg
|
|
|
|
, rustc-demangle
|
|
|
|
, syntax-highlighting
|
2021-09-18 10:52:07 +00:00
|
|
|
, threadweaver
|
|
|
|
, zstd
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hotspot";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.5.0";
|
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}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-FJkDPWqNwoWg/15tvMnwke7PVtWVuqT0gtJBFQE0qZ4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = [
|
|
|
|
# Backport stuck UI bug fix
|
|
|
|
# FIXME: remove in next update
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/KDAB/hotspot/commit/7639dee8617dba9b88182c7ff4887e8d3714ac98.patch";
|
|
|
|
hash = "sha256-aAo9uEy+MBztMhnC5jB08moZBeRCENU22R39pqSBXOY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
extra-cmake-modules
|
2024-05-15 15:35:15 +00:00
|
|
|
# stable patchelf corrupts the binary
|
|
|
|
patchelfUnstable
|
|
|
|
wrapQtAppsHook
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
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
|
2024-05-15 15:35:15 +00:00
|
|
|
kddockwidgets
|
2020-04-24 23:36:52 +00:00
|
|
|
ki18n
|
|
|
|
kio
|
|
|
|
kitemmodels
|
|
|
|
kitemviews
|
2023-01-11 07:51:40 +00:00
|
|
|
kparts
|
2020-04-24 23:36:52 +00:00
|
|
|
kwindowsystem
|
|
|
|
libelf
|
|
|
|
qtbase
|
2024-05-15 15:35:15 +00:00
|
|
|
qtsvg
|
|
|
|
rustc-demangle
|
|
|
|
syntax-highlighting
|
2020-04-24 23:36:52 +00:00
|
|
|
threadweaver
|
2021-09-18 10:52:07 +00:00
|
|
|
zstd
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
qtWrapperArgs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
"--suffix PATH : ${lib.makeBinPath [ linuxPackages.perf binutils ]}"
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
preFixup = ''
|
|
|
|
patchelf \
|
|
|
|
--add-rpath ${lib.makeLibraryPath [ rustc-demangle ]} \
|
|
|
|
--add-needed librustc_demangle.so \
|
|
|
|
$out/libexec/hotspot-perfparser
|
|
|
|
'';
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "GUI for Linux perf";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "hotspot";
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|