lol
1{ stdenv, fetchgit, libvirt, autoconf, ocaml, findlib }:
2
3stdenv.mkDerivation rec {
4 name = "ocaml-libvirt-${version}";
5 rev = "3169af3";
6 version = "0.6.1.4-rev.${rev}"; # libguestfs-1.34 needs ocaml-libvirt newer than the latest release 0.6.1.4
7
8 src = fetchgit {
9 url = "git://git.annexia.org/git/ocaml-libvirt.git";
10 rev = rev;
11 sha256 = "0z8p6q6k42rdrvy248siq922m1yszny1hfklf6djynvk2viyqdbg";
12 };
13
14 propagatedBuildInputs = [ libvirt ];
15
16 nativeBuildInputs = [ autoconf findlib ];
17
18 buildInputs = [ ocaml ];
19
20 createFindlibDestdir = true;
21
22 preConfigure = ''
23 autoconf
24 '';
25
26 buildPhase = if stdenv.cc.isClang then "make all opt CPPFLAGS=-Wno-error" else "make all opt";
27
28 installPhase = "make install-opt";
29
30 meta = with stdenv.lib; {
31 description = "OCaml bindings for libvirt";
32 homepage = https://libvirt.org/ocaml/;
33 license = licenses.gpl2;
34 maintainers = [ maintainers.volth ];
35 platforms = ocaml.meta.platforms or [];
36 };
37}