1{ stdenv, fetchFromGitHub, cmake, python3 }:
2
3stdenv.mkDerivation rec {
4 name = "wabt-${version}";
5 version = "1.0.5";
6
7 src = fetchFromGitHub {
8 owner = "WebAssembly";
9 repo = "wabt";
10 rev = version;
11 sha256 = "1cbak3ach7cna98j2r0v3y38c59ih2gv0p6f43qp782pyj07hzfy";
12 };
13
14 nativeBuildInputs = [ cmake ];
15 cmakeFlags = [ "-DBUILD_TESTS=OFF" ];
16 buildInputs = [ python3 ];
17
18 meta = with stdenv.lib; {
19 description = "The WebAssembly Binary Toolkit";
20 longDescription = ''
21 WABT (we pronounce it "wabbit") is a suite of tools for WebAssembly,
22 including:
23 * wat2wasm: translate from WebAssembly text format to the WebAssembly
24 binary format
25 * wasm2wat: the inverse of wat2wasm, translate from the binary format
26 back to the text format (also known as a .wat)
27 * wasm-objdump: print information about a wasm binary. Similiar to
28 objdump.
29 * wasm-interp: decode and run a WebAssembly binary file using a
30 stack-based interpreter
31 * wat-desugar: parse .wat text form as supported by the spec interpreter
32 (s-expressions, flat syntax, or mixed) and print "canonical" flat
33 format
34 * wasm2c: convert a WebAssembly binary file to a C source and header
35 '';
36 homepage = https://github.com/WebAssembly/wabt;
37 license = licenses.asl20;
38 maintainers = with maintainers; [ ekleog ];
39 platforms = platforms.linux;
40 };
41}