about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/wasm
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-08-03 18:40:07 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-08-04 05:36:58 +0000
commit83d14b7b50b10bf538bd6381c18267c2262c5d14 (patch)
tree6e5d44da484ca532b34439d038ee912d0db80b81 /pkgs/development/ocaml-modules/wasm
parent90c9897ff6130e55d5a0a6eaf7f9d1cc74208c28 (diff)
downloadnixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar.gz
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar.bz2
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar.lz
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar.xz
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.tar.zst
nixlib-83d14b7b50b10bf538bd6381c18267c2262c5d14.zip
ocamlPackages.wasm: init at 0.13
wasm is an OCaml library to read and write Web Assembly (wasm) files and
manipulate their AST.
Diffstat (limited to 'pkgs/development/ocaml-modules/wasm')
-rw-r--r--pkgs/development/ocaml-modules/wasm/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/wasm/default.nix b/pkgs/development/ocaml-modules/wasm/default.nix
new file mode 100644
index 000000000000..03ea4a29330c
--- /dev/null
+++ b/pkgs/development/ocaml-modules/wasm/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "wasm is not available for OCaml ${ocaml.version}"
+else
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-wasm-${version}";
+  version = "0.13";
+
+  src = fetchFromGitHub {
+    owner = "WebAssembly";
+    repo = "spec";
+    rev = "v${version}";
+    sha256 = "0l67w1dmhgzrhmw3pw2w35h54imax0zdpa9yyqppzzbagxgn87kn";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild ];
+
+  makeFlags = [ "-C" "interpreter" ];
+
+  createFindlibDestdir = true;
+
+  meta = {
+    description = "An OCaml library to read and write Web Assembly (wasm) files and manipulate their AST";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    inherit (src.meta) homepage;
+    inherit (ocaml.meta) platforms;
+  };
+}