btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / la / latencytop / package.nix
blobbee5fa9f28a72f223a80243b109707bd93ec8884
1 { lib, stdenv, fetchurl, ncurses, glib, pkg-config, gtk2, util-linux }:
3 stdenv.mkDerivation rec {
4   pname = "latencytop";
5   version = "0.5";
7   postPatch = ''
8     sed -i s,/usr,$out, Makefile
10     # Fix #171609
11     substituteInPlace fsync.c --replace /bin/mount ${util-linux}/bin/mount
12   '';
14   preInstall = "mkdir -p $out/sbin";
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   };
22   nativeBuildInputs = [ pkg-config ];
23   buildInputs = [ ncurses glib gtk2 ];
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   };