nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv,
2 mkDerivation,
3 cmake,
4 elfutils,
5 extra-cmake-modules,
6 fetchFromGitHub,
7 kconfigwidgets,
8 ki18n,
9 kio,
10 kitemmodels,
11 kitemviews,
12 kwindowsystem,
13 libelf,
14 qtbase,
15 threadweaver,
16}:
17
18mkDerivation rec {
19 pname = "hotspot";
20 version = "1.2.0";
21
22 src = fetchFromGitHub {
23 owner = "KDAB";
24 repo = "hotspot";
25 rev = "v${version}";
26 sha256 = "05rkzrvak93z8mzcpm4mcjxb933l8pjsxr9a595wfn1gn2ihmada";
27 fetchSubmodules = true;
28 };
29
30 buildInputs = [
31 cmake
32 elfutils
33 extra-cmake-modules
34 kconfigwidgets
35 ki18n
36 kio
37 kitemmodels
38 kitemviews
39 kwindowsystem
40 libelf
41 qtbase
42 threadweaver
43 ];
44
45 # hotspot checks for the presence of third party libraries'
46 # git directory to give a nice warning when you forgot to clone
47 # submodules; but Nix clones them and removes .git (for reproducibility).
48 # So we need to fake their existence here.
49 postPatch = ''
50 mkdir -p 3rdparty/perfparser/.git
51 '';
52
53 enableParallelBuilding = true;
54
55 meta = {
56 description = "A GUI for Linux perf";
57 longDescription = ''
58 hotspot is a GUI replacement for `perf report`.
59 It takes a perf.data file, parses and evaluates its contents and
60 then displays the result in a graphical way.
61 '';
62 homepage = https://github.com/KDAB/hotspot;
63 license = with stdenv.lib.licenses; [ gpl2 gpl3 ];
64 platforms = stdenv.lib.platforms.linux;
65 maintainers = with stdenv.lib.maintainers; [ nh2 ];
66 };
67}