summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-29 22:45:42 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-12-29 22:47:41 +0100
commitbca81534f0543e3ca7902234ad2b6c7c57a53136 (patch)
tree9347697ea80e4789a05ba5d57550200d9e9306be
parente71df047a0e0244a6b84bba506d0284fd093deb5 (diff)
downloadnixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar.gz
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar.bz2
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar.lz
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar.xz
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.tar.zst
nixpkgs-bca81534f0543e3ca7902234ad2b6c7c57a53136.zip
ocamlPackages.mirage: fix build by adding missing deps
Previously the mirage library/package wouldn't be built/installed
correctly due to missing deps which I now added as specified in the opam
file. While I was at it, I also enabled tests.
-rw-r--r--pkgs/development/ocaml-modules/mirage/default.nix27
1 files changed, 18 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/mirage/default.nix b/pkgs/development/ocaml-modules/mirage/default.nix
index 9a4d3f21cb8..5160734e4f8 100644
--- a/pkgs/development/ocaml-modules/mirage/default.nix
+++ b/pkgs/development/ocaml-modules/mirage/default.nix
@@ -1,25 +1,34 @@
-{ lib, buildDunePackage, ocaml
-, functoria, mirage-runtime
+{ lib, buildDunePackage, alcotest
+, functoria, mirage-runtime, bos
+, ipaddr, astring, logs, stdlib-shims
 }:
 
 buildDunePackage rec {
   pname = "mirage";
   inherit (mirage-runtime) version src;
 
+  minimumOCamlVersion = "4.08";
+
   useDune2 = true;
 
   outputs = [ "out" "dev" ];
 
-  propagatedBuildInputs = [ functoria mirage-runtime ];
+  propagatedBuildInputs = [
+    ipaddr
+    functoria
+    mirage-runtime
+    bos
+    astring
+    logs
+    stdlib-shims
+  ];
 
-  installPhase = ''
-    runHook preInstall
-    dune install --prefix=$out --libdir=$dev/lib/ocaml/${ocaml.version}/site-lib/ ${pname}
-    runHook postInstall
-  '';
+  doCheck = true;
+  checkInputs = [
+    alcotest
+  ];
 
   meta = mirage-runtime.meta // {
     description = "The MirageOS library operating system";
   };
-
 }