2017-11-27 19:08:40 +00:00
|
|
|
{ stdenv, fetchurl, ocaml, jbuilder, findlib, sexplib, ocplib-endian }:
|
2015-02-22 07:17:52 +00:00
|
|
|
|
2017-11-27 19:08:40 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2017-11-28 01:11:15 +00:00
|
|
|
name = "ocaml${ocaml.version}-cstruct-${version}";
|
|
|
|
version = "3.0.2";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/ocaml-cstruct/releases/download/v${version}/cstruct-${version}.tbz";
|
|
|
|
sha256 = "03caxcyzfjmbnnwa15zy9s1ckkl4sc834d1qkgi4jcs3zqchvd8z";
|
|
|
|
};
|
2016-11-12 09:17:30 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
unpackCmd = "tar -xjf $curSrc";
|
2016-11-12 09:17:30 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
buildInputs = [ ocaml jbuilder findlib ];
|
2015-02-22 07:17:52 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
propagatedBuildInputs = [ sexplib ocplib-endian ];
|
2015-02-22 07:17:52 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
buildPhase = "jbuilder build -p cstruct";
|
2015-02-22 07:17:52 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
inherit (jbuilder) installPhase;
|
2016-11-12 09:17:30 +00:00
|
|
|
|
2017-11-28 01:11:15 +00:00
|
|
|
meta = {
|
|
|
|
description = "Access C-like structures directly from OCaml";
|
|
|
|
license = stdenv.lib.licenses.isc;
|
|
|
|
homepage = "https://github.com/mirage/ocaml-cstruct";
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
2015-02-22 07:17:52 +00:00
|
|
|
}
|