2017-02-22 07:01:09 +01:00
|
|
|
{ stdenv, fetchgit, libvirt, autoconf, ocaml, findlib }:
|
2017-02-04 16:07:45 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml-libvirt-${version}";
|
2018-02-26 23:50:46 +01:00
|
|
|
rev = "bab7f84ade84ceaddb08b6948792d49b3d04b897";
|
|
|
|
version = "0.6.1.4.2017-11-08-unstable"; # libguestfs-1.34+ needs ocaml-libvirt newer than the latest release 0.6.1.4
|
2017-02-04 16:07:45 +01:00
|
|
|
|
2017-02-22 07:01:09 +01:00
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.annexia.org/git/ocaml-libvirt.git";
|
2017-03-31 04:19:02 +02:00
|
|
|
rev = rev;
|
2018-02-26 23:50:46 +01:00
|
|
|
sha256 = "0vxgx1n58fp4qmly6i5zxiacr7303127d6j78a295xin1p3a8xcw";
|
2017-02-04 16:07:45 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libvirt ];
|
|
|
|
|
2017-02-22 07:01:09 +01:00
|
|
|
nativeBuildInputs = [ autoconf findlib ];
|
|
|
|
|
|
|
|
buildInputs = [ ocaml ];
|
2017-02-04 16:07:45 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-02-22 07:01:09 +01:00
|
|
|
preConfigure = ''
|
|
|
|
autoconf
|
|
|
|
'';
|
|
|
|
|
2017-02-04 16:07:45 +01:00
|
|
|
buildPhase = if stdenv.cc.isClang then "make all opt CPPFLAGS=-Wno-error" else "make all opt";
|
|
|
|
|
|
|
|
installPhase = "make install-opt";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "OCaml bindings for libvirt";
|
|
|
|
homepage = https://libvirt.org/ocaml/;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|