diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-02-22 08:17:52 +0100 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-02-23 09:57:31 +0100 |
commit | 176e38f6f2fba056343d65cf12ba8f6668bdb497 (patch) | |
tree | 096889af090544abf46c4e64134296e22d519fb4 /pkgs/development/ocaml-modules/cstruct | |
parent | bc51573f8ad28e52ddc57bd72309840604e77454 (diff) | |
download | nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar.gz nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar.bz2 nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar.lz nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar.xz nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.tar.zst nixpkgs-176e38f6f2fba056343d65cf12ba8f6668bdb497.zip |
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
Diffstat (limited to 'pkgs/development/ocaml-modules/cstruct')
-rw-r--r-- | pkgs/development/ocaml-modules/cstruct/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/cstruct/default.nix b/pkgs/development/ocaml-modules/cstruct/default.nix new file mode 100644 index 00000000000..194a852e7ef --- /dev/null +++ b/pkgs/development/ocaml-modules/cstruct/default.nix @@ -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; + }; +} |