2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, libvirt, autoreconfHook, pkg-config, ocaml, findlib, perl }:
|
2017-02-04 15:07:45 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "ocaml-libvirt";
|
2020-11-02 20:58:09 +00:00
|
|
|
version = "0.6.1.5";
|
2017-02-04 15:07:45 +00:00
|
|
|
|
2020-11-02 20:58:09 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "libvirt";
|
|
|
|
repo = "libvirt-ocaml";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0xpkdmknk74yqxgw8z2w8b7ss8hpx92xnab5fsqg2byyj55gzf2k";
|
2017-02-04 15:07:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ libvirt ];
|
|
|
|
|
2020-11-02 20:58:09 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config findlib perl ];
|
2017-02-22 06:01:09 +00:00
|
|
|
|
|
|
|
buildInputs = [ ocaml ];
|
2017-02-04 15:07:45 +00:00
|
|
|
|
2022-01-26 09:22:36 +00:00
|
|
|
buildFlags = [ "all" "opt" "CPPFLAGS=-Wno-error" ];
|
|
|
|
installTargets = "install-opt";
|
|
|
|
preInstall = ''
|
|
|
|
# Fix 'dllmllibvirt.so' install failure into non-existent directory.
|
|
|
|
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
|
|
|
'';
|
2017-02-04 15:07:45 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-02-04 15:07:45 +00:00
|
|
|
description = "OCaml bindings for libvirt";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://libvirt.org/ocaml/";
|
2017-02-04 15:07:45 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.volth ];
|
|
|
|
platforms = ocaml.meta.platforms or [];
|
|
|
|
};
|
|
|
|
}
|