summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/mirage/default.nix
blob: 98d96cf146f0b6d96cb8daad1967de03a37f775e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib, buildDunePackage, ocaml, alcotest
, functoria, mirage-runtime, bos
, ipaddr, astring, logs, stdlib-shims
}:

buildDunePackage rec {
  pname = "mirage";
  inherit (mirage-runtime) version src;

  minimalOCamlVersion = "4.08";
  duneVersion = "3";

  outputs = [ "out" "dev" ];

  propagatedBuildInputs = [
    ipaddr
    functoria
    mirage-runtime
    bos
    astring
    logs
    stdlib-shims
  ];

  # Tests need opam-monorepo
  doCheck = false;
  checkInputs = [
    alcotest
  ];

  installPhase = ''
    runHook preInstall
    dune install --prefix=$out --libdir=$dev/lib/ocaml/${ocaml.version}/site-lib/ ${pname}
    runHook postInstall
  '';

  meta = mirage-runtime.meta // {
    description = "The MirageOS library operating system";
  };
}