1{stdenv, buildOcaml, fetchurl, sexplib}:
2
3buildOcaml rec {
4 name = "ipaddr";
5 version = "2.6.1";
6
7 src = fetchurl {
8 url = "https://github.com/mirage/ocaml-ipaddr/archive/${version}.tar.gz";
9 sha256 = "7051013d8f58abff433187d70cd7ddd7a6b49a6fbe6cad1893f571f65b8ed3d0";
10 };
11
12 propagatedBuildInputs = [ sexplib ];
13
14 configurePhase = ''
15 ocaml setup.ml -configure --prefix $out
16 '';
17
18 buildPhase = ''
19 make build
20 '';
21
22 installPhase = ''
23 make install
24 '';
25
26 meta = with stdenv.lib; {
27 homepage = https://github.com/mirage/ocaml-ipaddr;
28 description = "A library for manipulation of IP (and MAC) address representations ";
29 license = licenses.mit;
30 maintainers = [ maintainers.ericbmerritt ];
31 };
32}