about summary refs log tree commit diff
path: root/pkgs/development/tools/profiling/sysprof
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-12-31 15:52:50 +0100
committerJan Tojnar <jtojnar@gmail.com>2018-05-16 16:54:12 +0200
commit8a93595550fe72371b75c976d0cf8738ddd33d5a (patch)
tree67efeec3b6b2922e0476d7370e11e16166148c8a /pkgs/development/tools/profiling/sysprof
parentb04e939a13c2b5eb6aeedaabae414cb14966dbae (diff)
downloadnixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar.gz
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar.bz2
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar.lz
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar.xz
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.tar.zst
nixlib-8a93595550fe72371b75c976d0cf8738ddd33d5a.zip
sysprof: 1.2.0 -> 3.28.1
Diffstat (limited to 'pkgs/development/tools/profiling/sysprof')
-rw-r--r--pkgs/development/tools/profiling/sysprof/configure.patch17
-rw-r--r--pkgs/development/tools/profiling/sysprof/default.nix55
2 files changed, 43 insertions, 29 deletions
diff --git a/pkgs/development/tools/profiling/sysprof/configure.patch b/pkgs/development/tools/profiling/sysprof/configure.patch
deleted file mode 100644
index 212840ee4064..000000000000
--- a/pkgs/development/tools/profiling/sysprof/configure.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- sysprof-1.0.10/configure	2008-04-28 01:41:25.000000000 +0200
-+++ sysprof-1.0.10/configure	2008-06-07 15:40:07.000000000 +0200
-@@ -3342,14 +3342,6 @@ if test $kernel_module = "yes"; then
-      echo \*
-      exit 1
-   fi
--
--  if  ! test -f /lib/modules/`uname -r`/build/Makefile  ; then
--     echo \*
--     echo \* Sysprof requires the kernel source code to be installed.
--     echo \* On a Fedora Core system the relevant package is kernel-devel
--     echo \*
--     exit 1
--  fi
- fi
- 
- # Pkgconfig dependencies
diff --git a/pkgs/development/tools/profiling/sysprof/default.nix b/pkgs/development/tools/profiling/sysprof/default.nix
index a2ea3444db60..f28fe187e6cf 100644
--- a/pkgs/development/tools/profiling/sysprof/default.nix
+++ b/pkgs/development/tools/profiling/sysprof/default.nix
@@ -1,24 +1,53 @@
 { stdenv
-, fetchurl, pkgconfig
-, gtk2, glib, pango, libglade
+, desktop-file-utils
+, fetchurl
+, gettext
+, glib
+, gtk3
+, itstool
+, libxml2
+, meson, ninja
+, pango
+, pkgconfig
+, polkit
+, shared-mime-info
+, systemd
+, wrapGAppsHook
+, gnome3
 }:
+let
+  version = "3.28.1";
+  pname = "sysprof";
+in stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
 
-stdenv.mkDerivation rec {
-  name = "sysprof-1.2.0";
+  outputs = [ "out" "lib" "dev" ];
 
   src = fetchurl {
-    url = "http://www.sysprof.com/sysprof-1.2.0.tar.gz";
-    sha256 = "1wb4d844rsy8qjg3z5m6rnfm72da4xwzrrkkb1q5r10sq1pkrw5s";
+    url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
+    sha256 = "05534dvwrzrmryb4y2m1sb2q0r8i6nr88pzjg7xs5nr9zq8a87p3";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ gtk2 glib pango libglade ];
+  nativeBuildInputs = [ desktop-file-utils gettext itstool libxml2 meson ninja pkgconfig shared-mime-info wrapGAppsHook ];
+  buildInputs = [ glib gtk3 pango polkit systemd.dev systemd.lib ];
 
-  meta = {
-    homepage = http://sysprof.com/;
-    description = "System-wide profiler for Linux";
-    license = stdenv.lib.licenses.gpl2Plus;
+  mesonFlags = [
+    "-Dsystemdunitdir=lib/systemd/system"
+  ];
+
+  postInstall = ''
+    rm $out/share/applications/mimeinfo.cache
+  '';
 
+  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
@@ -26,6 +55,8 @@ stdenv.mkDerivation rec {
       do not need to be recompiled.  In fact they don't even have to
       be restarted.
     '';
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ];
     platforms = stdenv.lib.platforms.linux;
   };
 }