Files
nixpkgs/pkgs/by-name/ho/hotspot/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

111 lines
2.2 KiB
Nix

{
lib,
stdenv,
binutils,
cmake,
patchelfUnstable,
elfutils,
fetchFromGitHub,
fetchpatch,
kddockwidgets,
kdePackages,
libelf,
perf,
qt6,
rustc-demangle,
zstd,
}:
stdenv.mkDerivation rec {
pname = "hotspot";
version = "1.5.1";
src = fetchFromGitHub {
owner = "KDAB";
repo = "hotspot";
tag = "v${version}";
hash = "sha256-O2wp19scyHIwIY2AzKmPmorGXDH249/OhSg+KtzOYhI=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
kdePackages.extra-cmake-modules
# stable patchelf corrupts the binary
patchelfUnstable
qt6.wrapQtAppsHook
];
patches = [
# Fix build issue with Qt 6.9, can be removed in next release
(fetchpatch {
url = "https://github.com/KDAB/hotspot/pull/694/commits/5ef04c1dd60846b0d1746132e7e63289ee25f259.patch";
hash = "sha256-WYMM1/CY05fztSiRNZQ2Q16n5erjY+AE6gSQgSlb3HA=";
})
];
cmakeFlags = [ (lib.strings.cmakeBool "QT6_BUILD" true) ];
buildInputs = [
(elfutils.override { enableDebuginfod = true; }) # perfparser needs to find debuginfod.h
kddockwidgets
libelf
qt6.qtbase
qt6.qtsvg
rustc-demangle
zstd
]
++ (with kdePackages; [
kconfig
kconfigwidgets
kgraphviewer
ki18n
kio
kitemmodels
kitemviews
konsole
kparts
kwindowsystem
qcustomplot
syntax-highlighting
threadweaver
]);
qtWrapperArgs = [
"--suffix PATH : ${
lib.makeBinPath [
perf
binutils
]
}"
];
preFixup = ''
patchelf \
--add-rpath ${lib.makeLibraryPath [ rustc-demangle ]} \
--add-needed librustc_demangle.so \
$out/libexec/hotspot-perfparser
'';
meta = with lib; {
description = "GUI for Linux perf";
mainProgram = "hotspot";
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";
changelog = "https://github.com/KDAB/hotspot/releases/tag/v${version}";
license = with licenses; [
gpl2Only
gpl3Only
];
platforms = platforms.linux;
maintainers = with maintainers; [
nh2
tmarkus
];
};
}