summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ipaddr
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/ipaddr')
-rw-r--r--pkgs/development/ocaml-modules/ipaddr/cstruct.nix17
-rw-r--r--pkgs/development/ocaml-modules/ipaddr/default.nix16
-rw-r--r--pkgs/development/ocaml-modules/ipaddr/sexp.nix18
3 files changed, 42 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/ipaddr/cstruct.nix b/pkgs/development/ocaml-modules/ipaddr/cstruct.nix
new file mode 100644
index 00000000000..b6240d39ebd
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ipaddr/cstruct.nix
@@ -0,0 +1,17 @@
+{ lib, buildDunePackage
+, ipaddr, cstruct
+}:
+
+buildDunePackage rec {
+  pname = "ipaddr-cstruct";
+
+  inherit (ipaddr) version src minimumOCamlVersion;
+
+  propagatedBuildInputs = [ ipaddr cstruct ];
+
+  doCheck = true;
+
+  meta = ipaddr.meta // {
+    description = "A library for manipulation of IP address representations using Cstructs";
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ipaddr/default.nix b/pkgs/development/ocaml-modules/ipaddr/default.nix
index d7009fdf553..a4a6f9fc7a1 100644
--- a/pkgs/development/ocaml-modules/ipaddr/default.nix
+++ b/pkgs/development/ocaml-modules/ipaddr/default.nix
@@ -1,22 +1,20 @@
 { lib, buildDunePackage
-, macaddr, ounit
+, macaddr, domain-name, stdlib-shims
+, ounit, ppx_sexp_conv
 }:
 
 buildDunePackage rec {
   pname = "ipaddr";
 
-  inherit (macaddr) version src;
+  inherit (macaddr) version src minimumOCamlVersion;
 
-  buildInputs = [ ounit ];
-
-  propagatedBuildInputs = [ macaddr ];
+  propagatedBuildInputs = [ macaddr domain-name stdlib-shims ];
 
+  checkInputs = [ ppx_sexp_conv ounit ];
   doCheck = true;
 
-  meta = with lib; {
-    homepage = "https://github.com/mirage/ocaml-ipaddr";
+  meta = macaddr.meta // {
     description = "A library for manipulation of IP (and MAC) address representations ";
-    license = licenses.isc;
-    maintainers = with maintainers; [ alexfmpe ericbmerritt ];
+    maintainers = with lib.maintainers; [ alexfmpe ericbmerritt ];
   };
 }
diff --git a/pkgs/development/ocaml-modules/ipaddr/sexp.nix b/pkgs/development/ocaml-modules/ipaddr/sexp.nix
new file mode 100644
index 00000000000..8d6186d6338
--- /dev/null
+++ b/pkgs/development/ocaml-modules/ipaddr/sexp.nix
@@ -0,0 +1,18 @@
+{ lib, buildDunePackage
+, ipaddr, ipaddr-cstruct, ounit, ppx_sexp_conv
+}:
+
+buildDunePackage rec {
+  pname = "ipaddr-sexp";
+
+  inherit (ipaddr) version src minimumOCamlVersion;
+
+  propagatedBuildInputs = [ ipaddr ];
+
+  checkInputs = [ ipaddr-cstruct ounit ppx_sexp_conv ];
+  doCheck = true;
+
+  meta = ipaddr.meta // {
+    description = "A library for manipulation of IP address representations usnig sexp";
+  };
+}