1{
2 lib,
3 stdenv,
4 fetchgit,
5 ocamlPackages,
6 autoreconfHook,
7 libxml2,
8 pkg-config,
9 getopt,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "virt-top";
14 version = "1.1.2";
15
16 src = fetchgit {
17 url = "git://git.annexia.org/virt-top.git";
18 rev = "v${version}";
19 hash = "sha256-C1a47pWtjb38bnwmZ2Zq7/LlW3+BF5BGNMRFi97/ngU=";
20 };
21
22 strictDeps = true;
23
24 nativeBuildInputs = [
25 autoreconfHook
26 pkg-config
27 getopt
28 ocamlPackages.ocaml
29 ocamlPackages.findlib
30 ];
31 buildInputs =
32 with ocamlPackages;
33 [
34 ocamlPackages.ocaml
35 calendar
36 curses
37 gettext-stub
38 ocaml_libvirt
39 ]
40 ++ [ libxml2 ];
41
42 prePatch = ''
43 substituteInPlace ocaml-dep.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}'
44 substituteInPlace ocaml-link.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}'
45 '';
46
47 meta = with lib; {
48 description = "Top-like utility for showing stats of virtualized domains";
49 homepage = "https://people.redhat.com/~rjones/virt-top/";
50 license = licenses.gpl2Only;
51 maintainers = [ ];
52 platforms = platforms.linux;
53 mainProgram = "virt-top";
54 };
55}