nixpkgs/pkgs/development/ocaml-modules/cstruct/default.nix

29 lines
806 B
Nix
Raw Normal View History

2017-11-27 20:08:40 +01:00
{ stdenv, fetchurl, ocaml, jbuilder, findlib, sexplib, ocplib-endian }:
2017-11-27 20:08:40 +01:00
stdenv.mkDerivation rec {
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";
};
2017-11-27 20:08:40 +01:00
unpackCmd = "tar -xjf $curSrc";
2017-11-27 20:08:40 +01:00
buildInputs = [ ocaml jbuilder findlib ];
2017-11-27 20:08:40 +01:00
propagatedBuildInputs = [ sexplib ocplib-endian ];
2017-11-27 20:08:40 +01:00
buildPhase = "jbuilder build -p cstruct";
2017-11-27 20:08:40 +01:00
inherit (jbuilder) installPhase;
2017-11-27 20:08:40 +01:00
meta = {
description = "Access C-like structures directly from OCaml";
license = stdenv.lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
};
}