Adds ocaml-cstruct
Cstruct is a library and syntax extension to make it easier to access C-like structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the Bigarray module. Homepage: https://github.com/mirage/ocaml-cstruct
This commit is contained in:
parent
bc51573f8a
commit
176e38f6f2
27
pkgs/development/ocaml-modules/cstruct/default.nix
Normal file
27
pkgs/development/ocaml-modules/cstruct/default.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ stdenv, fetchzip, ocaml, findlib, sexplib, ocplib-endian, lwt, camlp4 }:
|
||||||
|
|
||||||
|
let version = "1.6.0"; in
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "ocaml-cstruct-${version}";
|
||||||
|
|
||||||
|
src = fetchzip {
|
||||||
|
url = "https://github.com/mirage/ocaml-cstruct/archive/v${version}.tar.gz";
|
||||||
|
sha256 = "09qw3rhfiq2kkns6660p9cwm5610k72md52a04cy91gr6gsig6ic";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ ocaml findlib lwt camlp4 ];
|
||||||
|
propagatedBuildInputs = [ ocplib-endian sexplib ];
|
||||||
|
|
||||||
|
configureFlags = "--enable-lwt";
|
||||||
|
|
||||||
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Map OCaml arrays onto C-like structs";
|
||||||
|
homepage = https://github.com/mirage/ocaml-cstruct;
|
||||||
|
license = stdenv.lib.licenses.isc;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ vbgl ];
|
||||||
|
platforms = ocaml.meta.platforms;
|
||||||
|
};
|
||||||
|
}
|
@ -3864,6 +3864,11 @@ let
|
|||||||
|
|
||||||
cryptokit = callPackage ../development/ocaml-modules/cryptokit { };
|
cryptokit = callPackage ../development/ocaml-modules/cryptokit { };
|
||||||
|
|
||||||
|
cstruct = callPackage ../development/ocaml-modules/cstruct {
|
||||||
|
lwt = ocaml_lwt;
|
||||||
|
sexplib = ocaml_sexplib;
|
||||||
|
};
|
||||||
|
|
||||||
csv = callPackage ../development/ocaml-modules/csv { };
|
csv = callPackage ../development/ocaml-modules/csv { };
|
||||||
|
|
||||||
deriving = callPackage ../development/tools/ocaml/deriving { };
|
deriving = callPackage ../development/tools/ocaml/deriving { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user