2021-03-20 04:20:00 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wabt";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "1.0.31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WebAssembly";
|
|
|
|
repo = "wabt";
|
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-EChOQTWGt/LUfwCxmMmYC+zHjW9hVvghhOGr4DfpNtQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-05-15 21:57:56 +00:00
|
|
|
cmakeFlags = [ "-DBUILD_TESTS=OFF" "-DCMAKE_PROJECT_VERSION=${version}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The WebAssembly Binary Toolkit";
|
|
|
|
longDescription = ''
|
|
|
|
WABT (pronounced "wabbit") is a suite of tools for WebAssembly, including:
|
|
|
|
* wat2wasm: translate from WebAssembly text format to the WebAssembly
|
|
|
|
binary format
|
|
|
|
* wasm2wat: the inverse of wat2wasm, translate from the binary format
|
|
|
|
back to the text format (also known as a .wat)
|
|
|
|
* wasm-objdump: print information about a wasm binary. Similiar to
|
|
|
|
objdump.
|
|
|
|
* wasm-interp: decode and run a WebAssembly binary file using a
|
|
|
|
stack-based interpreter
|
|
|
|
* wat-desugar: parse .wat text form as supported by the spec interpreter
|
|
|
|
(s-expressions, flat syntax, or mixed) and print "canonical" flat
|
|
|
|
format
|
|
|
|
* wasm2c: convert a WebAssembly binary file to a C source and header
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/WebAssembly/wabt";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ekleog ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|