1{ lib, stdenv, fetchurl, ncurses, glib, pkg-config, gtk2, util-linux }:
2
3stdenv.mkDerivation rec {
4 pname = "latencytop";
5 version = "0.5";
6
7 postPatch = ''
8 sed -i s,/usr,$out, Makefile
9
10 # Fix #171609
11 substituteInPlace fsync.c --replace /bin/mount ${util-linux}/bin/mount
12 '';
13
14 preInstall = "mkdir -p $out/sbin";
15
16 src = fetchurl {
17 urls = [ "http://latencytop.org/download/latencytop-${version}.tar.gz"
18 "http://dbg.download.sourcemage.org/mirror/latencytop-0.5.tar.gz" ];
19 sha256 = "1vq3j9zdab6njly2wp900b3d5244mnxfm88j2bkiinbvxbxp4zwy";
20 };
21
22 nativeBuildInputs = [ pkg-config ];
23 buildInputs = [ ncurses glib gtk2 ];
24
25 meta = {
26 homepage = "http://latencytop.org";
27 description = "Tool to show kernel reports on latencies (LATENCYTOP option)";
28 mainProgram = "latencytop";
29 license = lib.licenses.gpl2Only;
30 maintainers = [ ];
31 platforms = lib.platforms.linux;
32 };
33}