about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/profiling/sysprof/default.nix
blob: 1e9dae3f2bce3fe84e51572028a4fa5dfa87a296 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{ stdenv
, desktop-file-utils
, fetchurl
, fetchpatch
, gettext
, glib
, gtk3
, itstool
, libdazzle
, libxml2
, meson, ninja
, pango
, pkgconfig
, polkit
, shared-mime-info
, systemd
, wrapGAppsHook
, gnome3
}:

stdenv.mkDerivation rec {
  pname = "sysprof";
  version = "3.36.0";

  outputs = [ "out" "lib" "dev" ];

  src = fetchurl {
    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
    sha256 = "hnDbTaz3shnTDFdcRlsXyO1nJNut40fyzelUi/8DkQg=";
  };

  patches = [
    # Fix 32-bit builds
    # https://gitlab.gnome.org/GNOME/sysprof/merge_requests/24
    (fetchpatch {
      url = "https://gitlab.gnome.org/GNOME/sysprof/commit/5dea152c7728f5a37370ad8a229115833e36b4f6.patch";
      sha256 = "D6DFx+T2jHSxyuygx8vumfqYkM1v1P0qbesmMfLR5jA=";
    })
  ];

  nativeBuildInputs = [
    desktop-file-utils
    gettext
    itstool
    libxml2
    meson
    ninja
    pkgconfig
    shared-mime-info
    wrapGAppsHook
    gnome3.adwaita-icon-theme
  ];
  buildInputs = [ glib gtk3 pango polkit systemd.dev systemd.lib libdazzle ];

  mesonFlags = [
    "-Dsystemdunitdir=lib/systemd/system"
  ];

  passthru = {
    updateScript = gnome3.updateScript {
      packageName = pname;
    };
  };

  meta = with stdenv.lib; {
    description = "System-wide profiler for Linux";
    homepage = "https://wiki.gnome.org/Apps/Sysprof";
    longDescription = ''
      Sysprof is a sampling CPU profiler for Linux that uses the perf_event_open
      system call to profile the entire system, not just a single
      application.  Sysprof handles shared libraries and applications
      do not need to be recompiled.  In fact they don't even have to
      be restarted.
    '';
    license = licenses.gpl2Plus;
    maintainers = teams.gnome.members;
    platforms = platforms.linux;
  };
}