aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/ocaml-modules/mirage
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/mirage')
-rw-r--r--pkgs/development/ocaml-modules/mirage/default.nix25
-rw-r--r--pkgs/development/ocaml-modules/mirage/runtime.nix6
-rw-r--r--pkgs/development/ocaml-modules/mirage/types-lwt.nix13
-rw-r--r--pkgs/development/ocaml-modules/mirage/types.nix19
4 files changed, 61 insertions, 2 deletions
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/development/ocaml-modules/mirage/runtime.nix b/pkgs/development/ocaml-modules/mirage/runtime.nix
index b3f308979f46..50121ad62802 100644
--- a/pkgs/development/ocaml-modules/mirage/runtime.nix
+++ b/pkgs/development/ocaml-modules/mirage/runtime.nix
@@ -3,13 +3,15 @@
buildDunePackage rec {
pname = "mirage-runtime";
- version = "3.9.0";
+ version = "3.10.1";
+
+ useDune2 = true;
minimumOCamlVersion = "4.08";
src = fetchurl {
url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-v${version}.tbz";
- sha256 = "1hznh49v1jlkwww6xi9f2f4yjzlh9qfvdrrdzvddnwsh3g00flla";
+ sha256 = "1glmsz2znhfkk4w6d6nsr7q5jqvivhmi8zwagzw2d8pah0c8bhm4";
};
propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs ocaml_lwt ];
diff --git a/pkgs/development/ocaml-modules/mirage/types-lwt.nix b/pkgs/development/ocaml-modules/mirage/types-lwt.nix
new file mode 100644
index 000000000000..ac232b0be6e1
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage/types-lwt.nix
@@ -0,0 +1,13 @@
+{ lib, buildDunePackage, mirage-types
+}:
+
+buildDunePackage {
+ pname = "mirage-types-lwt";
+ inherit (mirage-types) version src useDune2;
+
+ propagatedBuildInputs = [ mirage-types ];
+
+ meta = mirage-types.meta // {
+ description = "Lwt module type definitions for MirageOS applications";
+ };
+}
diff --git a/pkgs/development/ocaml-modules/mirage/types.nix b/pkgs/development/ocaml-modules/mirage/types.nix
new file mode 100644
index 000000000000..f30a9e263bbc
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage/types.nix
@@ -0,0 +1,19 @@
+{ lib, buildDunePackage, mirage
+, mirage-block, mirage-channel, mirage-clock, mirage-console, mirage-device
+, mirage-flow, mirage-fs, mirage-kv, mirage-net, mirage-protocols, mirage-random
+, mirage-stack, mirage-time
+}:
+
+buildDunePackage {
+ pname = "mirage-types";
+ inherit (mirage) src version useDune2;
+
+ propagatedBuildInputs = [ mirage-block mirage-channel mirage-clock
+ mirage-console mirage-device mirage-flow mirage-fs mirage-kv mirage-net
+ mirage-protocols mirage-random mirage-stack mirage-time
+ ];
+
+ meta = mirage.meta // {
+ description = "Module type definitions for MirageOS applications";
+ };
+}