nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 libvirt,
6 autoreconfHook,
7 pkg-config,
8 ocaml,
9 findlib,
10 perl,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "ocaml-libvirt";
15 version = "0.6.1.5";
16
17 src = fetchFromGitLab {
18 owner = "libvirt";
19 repo = "libvirt-ocaml";
20 rev = "v${version}";
21 sha256 = "0xpkdmknk74yqxgw8z2w8b7ss8hpx92xnab5fsqg2byyj55gzf2k";
22 };
23
24 propagatedBuildInputs = [ libvirt ];
25
26 nativeBuildInputs = [
27 autoreconfHook
28 pkg-config
29 findlib
30 perl
31 ocaml
32 ];
33
34 strictDeps = true;
35
36 buildFlags = [
37 "all"
38 "opt"
39 "CPPFLAGS=-Wno-error"
40 ];
41 installTargets = "install-opt";
42 preInstall = ''
43 # Fix 'dllmllibvirt.so' install failure into non-existent directory.
44 mkdir -p $OCAMLFIND_DESTDIR/stublibs
45 '';
46
47 meta = {
48 description = "OCaml bindings for libvirt";
49 homepage = "https://libvirt.org/ocaml/";
50 license = lib.licenses.gpl2;
51 maintainers = [ ];
52 inherit (ocaml.meta) platforms;
53 broken = !(lib.versionAtLeast ocaml.version "4.02");
54 };
55}