nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv
2, lib
3, desktop-file-utils
4, fetchurl
5, fetchpatch
6, gettext
7, glib
8, gtk3
9, itstool
10, libdazzle
11, libxml2
12, meson, ninja
13, pango
14, pkgconfig
15, polkit
16, shared-mime-info
17, systemd
18, wrapGAppsHook
19, gnome3
20}:
21
22stdenv.mkDerivation rec {
23 pname = "sysprof";
24 version = "3.36.0";
25
26 outputs = [ "out" "lib" "dev" ];
27
28 src = fetchurl {
29 url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
30 sha256 = "024i0gzqnm79rpr4gqxdvcj6gvf82xdlcp2p1k9ikcppmi6xnw46";
31 };
32
33 patches = [
34 # Fix 32-bit builds
35 # https://gitlab.gnome.org/GNOME/sysprof/merge_requests/24
36 (fetchpatch {
37 url = "https://gitlab.gnome.org/GNOME/sysprof/commit/5dea152c7728f5a37370ad8a229115833e36b4f6.patch";
38 sha256 = "0c76s7r329pbdlmgvm3grn89iylrxv5wg87craqp937nwk3wb80g";
39 })
40 ];
41
42 nativeBuildInputs = [
43 desktop-file-utils
44 gettext
45 itstool
46 libxml2
47 meson
48 ninja
49 pkgconfig
50 shared-mime-info
51 wrapGAppsHook
52 gnome3.adwaita-icon-theme
53 ];
54 buildInputs = [ glib gtk3 pango polkit systemd.dev (lib.getLib systemd) libdazzle ];
55
56 mesonFlags = [
57 "-Dsystemdunitdir=lib/systemd/system"
58 ];
59
60 passthru = {
61 updateScript = gnome3.updateScript {
62 packageName = pname;
63 };
64 };
65
66 meta = with stdenv.lib; {
67 description = "System-wide profiler for Linux";
68 homepage = "https://wiki.gnome.org/Apps/Sysprof";
69 longDescription = ''
70 Sysprof is a sampling CPU profiler for Linux that uses the perf_event_open
71 system call to profile the entire system, not just a single
72 application. Sysprof handles shared libraries and applications
73 do not need to be recompiled. In fact they don't even have to
74 be restarted.
75 '';
76 license = licenses.gpl2Plus;
77 maintainers = teams.gnome.members;
78 platforms = platforms.linux;
79 };
80}