at 24.05-pre 82 lines 1.9 kB view raw
1{ lib 2, mkDerivation 3, cmake 4, elfutils 5, extra-cmake-modules 6, fetchFromGitHub 7, kconfigwidgets 8, ki18n 9, kio 10, kitemmodels 11, kitemviews 12, kparts 13, kwindowsystem 14, libelf 15, qtbase 16, threadweaver 17, qtx11extras 18, zstd 19, kddockwidgets 20, rustc-demangle 21}: 22 23mkDerivation rec { 24 pname = "hotspot"; 25 version = "1.4.1"; 26 27 src = fetchFromGitHub { 28 owner = "KDAB"; 29 repo = "hotspot"; 30 rev = "refs/tags/v${version}"; 31 hash = "sha256-DW4R7+rnonmEMbCkNS7TGodw+3mEyHl6OlFK3kbG5HM="; 32 fetchSubmodules = true; 33 }; 34 35 nativeBuildInputs = [ 36 cmake 37 extra-cmake-modules 38 ]; 39 buildInputs = [ 40 (elfutils.override { enableDebuginfod = true; }) # perfparser needs to find debuginfod.h 41 kconfigwidgets 42 ki18n 43 kio 44 kitemmodels 45 kitemviews 46 kparts 47 kwindowsystem 48 libelf 49 qtbase 50 threadweaver 51 qtx11extras 52 zstd 53 kddockwidgets 54 rustc-demangle 55 ]; 56 57 # hotspot checks for the presence of third party libraries' 58 # git directory to give a nice warning when you forgot to clone 59 # submodules; but Nix clones them and removes .git (for reproducibility). 60 # So we need to fake their existence here. 61 postPatch = '' 62 mkdir -p 3rdparty/{perfparser,PrefixTickLabels}/.git 63 ''; 64 65 qtWrapperArgs = [ 66 "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ rustc-demangle ]}" 67 ]; 68 69 meta = with lib; { 70 description = "A GUI for Linux perf"; 71 longDescription = '' 72 hotspot is a GUI replacement for `perf report`. 73 It takes a perf.data file, parses and evaluates its contents and 74 then displays the result in a graphical way. 75 ''; 76 homepage = "https://github.com/KDAB/hotspot"; 77 changelog = "https://github.com/KDAB/hotspot/releases/tag/v${version}"; 78 license = with licenses; [ gpl2Only gpl3Only ]; 79 platforms = platforms.linux; 80 maintainers = with maintainers; [ nh2 ]; 81 }; 82}