diff --git a/pkgs/development/ocaml-modules/mirage/default.nix b/pkgs/development/ocaml-modules/mirage/default.nix new file mode 100644 index 000000000000..9a4d3f21cb87 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage/default.nix @@ -0,0 +1,25 @@ +{ lib, buildDunePackage, ocaml +, functoria, mirage-runtime +}: + +buildDunePackage rec { + pname = "mirage"; + inherit (mirage-runtime) version src; + + useDune2 = true; + + outputs = [ "out" "dev" ]; + + propagatedBuildInputs = [ functoria mirage-runtime ]; + + 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"; + }; + +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2947b369ed8c..7fd321425082 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -539,6 +539,8 @@ let minisat = callPackage ../development/ocaml-modules/minisat { }; + mirage = callPackage ../development/ocaml-modules/mirage { }; + mirage-block = callPackage ../development/ocaml-modules/mirage-block { }; mirage-bootvar-unix = callPackage ../development/ocaml-modules/mirage-bootvar-unix { };