summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorVagrant Cascadian <vagrant@debian.org>2019-09-05 11:13:22 -0700
committerVagrant Cascadian <vagrant@debian.org>2019-09-19 11:39:52 -0700
commit4d83157cd806aeb864664ebb380c19f6be04648c (patch)
tree2f0c4622c7ae9fa1f9b6cbba9b8cd38a67408a62 /gnu
parentf315673d9e56f4f2398098590ebdc080b63ce8b1 (diff)
gnu: Add wabt.
* gnu/packages/web (wabt): New variable. * gnu/packages/diffoscope (diffoscope)[native-inputs]: Add wabt for tests. [arguments]: Add phase patching wabt into known tools.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/diffoscope.scm8
-rw-r--r--gnu/packages/web.scm40
2 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/diffoscope.scm b/gnu/packages/diffoscope.scm
index 17a2d212e5..e2b2565004 100644
--- a/gnu/packages/diffoscope.scm
+++ b/gnu/packages/diffoscope.scm
@@ -57,6 +57,7 @@
#:use-module (gnu packages textutils)
#:use-module (gnu packages video)
#:use-module (gnu packages vim)
+ #:use-module (gnu packages web)
#:use-module (guix build-system python)
#:use-module (guix gexp)
#:use-module (guix git-download)
@@ -88,6 +89,12 @@
(lambda _
(substitute* "setup.py"
(("'python-magic',") ""))))
+ ;; Patch in support for known tools
+ (add-after 'unpack 'add-known-tools
+ (lambda _
+ (substitute* "diffoscope/external_tools.py"
+ (("'arch': 'wabt'},")
+ "'arch': 'wabt', 'guix': 'wabt'},"))))
;; This test is broken because our `file` package has a
;; bug in berkeley-db file type detection.
(add-after 'unpack 'remove-berkeley-test
@@ -188,6 +195,7 @@
("squashfs-tools" ,squashfs-tools)
("tcpdump" ,tcpdump)
("unzip" ,unzip)
+ ("wabt" ,wabt)
("xxd" ,xxd)
("xz" ,xz)
("zip" ,zip)))
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 39475bd6a8..d25f04901a 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -123,6 +123,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages readline)
+ #:use-module (gnu packages re2c)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
@@ -859,6 +860,45 @@ for efficient socket-like bidirectional reliable communication channels.")
;; This is LGPLv2.1-only with extra exceptions specified in 'LICENSE'.
(license license:lgpl2.1)))
+(define-public wabt
+ (package
+ (name "wabt")
+ (version "1.0.11")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/WebAssembly/wabt")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0hn88vlqyclpk79v3wg3lrssd9vwhjdgvb41g03jqakygxxgnmp5"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DBUILD_TESTS=OFF")
+ #:tests? #f))
+ (inputs `(("python" ,python-2)
+ ("re2c" ,re2c)))
+ (home-page "https://github.com/WebAssembly/wabt")
+ (synopsis "WebAssembly Binary Toolkit")
+ (description "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. Similar 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
+
+These tools are intended for use in (or for development of) toolchains or
+other systems that want to manipulate WebAssembly files.")
+ (license license:asl2.0)))
+
(define-public websocketpp
(package
(name "websocketpp")