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