unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: 61586@debbugs.gnu.org
Subject: [bug#61586] [PATCH RFC 2/2] gnu: Add binaryen.
Date: Fri, 17 Feb 2023 21:28:10 +0100	[thread overview]
Message-ID: <5be345282b038321a7f3c1f5fb2df8560ceb653c.camel@gmail.com> (raw)
In-Reply-To: <2cc4a1091e54c0fec082de4ce2789dfc42470e54.camel@gmail.com>

* gnu/packages/web.scm (binaryen): New variable.
---
 gnu/packages/web.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 7e49f798ea..0b509fa34c 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -1558,6 +1558,51 @@ (define-public wabt
 other systems that want to manipulate WebAssembly files.")
     (license license:asl2.0)))
 
+(define-public binaryen
+  (package
+   (name "binaryen")
+   (version "112")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/WebAssembly/binaryen")
+                  (commit (string-append "version_" version))))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32
+              "0970iz22yjxgi27d67kwmrx4zq7hig3i6b92vmlp4c4bd1bacny5"))
+            (modules '((guix build utils)))
+            (snippet #~(begin
+                         (substitute* "CMakeLists.txt"
+                           (("add_subdirectory\\(third_party\\)")
+                            "find_package(GTest)"))
+                         (substitute* "test/gtest/CMakeLists.txt"
+                           (("include_directory\\(.*third_pary.*\\)") ""))
+                         (delete-file-recursively "third_party")))))
+   (build-system cmake-build-system)
+   (arguments
+    (list #:out-of-source? #f ; for tests
+          #:configure-flags #~(list "-DBUILD_LLVM_DWARF=OFF")
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-before 'check 'delete-failing-tests
+                (lambda _
+                  ;; DWARF support relies on bundling LLVM, so don't
+                  (for-each delete-file
+                            (find-files "test/passes"
+                                        ".*dwarf.*\\.(bin\\.txt\|wasm)"))
+                  (delete-file "test/unit/test_dwarf.py")))
+              (replace 'check
+                (lambda* (#:key tests? #:allow-other-keys)
+                  (invoke "python" "check.py"))))))
+   (native-inputs (list googletest node-lts python-wrapper
+                        python-lit python-filecheck))
+   (home-page "https://github.com/WebAssembly/binaryen")
+   (synopsis "WebAssembly compiler")
+   (description "Binaryen is a compiler and toolchain infrastructure library
+written in C++, with a single-header C API as well as a Javascript API.")
+   (license license:asl2.0)))
+
 (define-public wasm3
   (package
     (name "wasm3")
-- 
2.39.1





  parent reply	other threads:[~2023-02-17 23:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 20:45 [bug#61586] [PATCH RFC 0/2] Add BinaryEn Liliana Marie Prikler
2023-02-17 20:27 ` [bug#61586] [PATCH RFC 1/2] gnu: Add python-filecheck Liliana Marie Prikler
2023-02-17 20:28 ` Liliana Marie Prikler [this message]
2023-04-06 21:38   ` [bug#61586] [PATCH RFC 2/2] gnu: Add binaryen Thompson, David
2023-06-11  8:04     ` bug#61586: " Liliana Marie Prikler
2023-03-11 22:48 ` [bug#61586] BinaryEn Andreas Enge
2023-03-12  8:16   ` Liliana Marie Prikler
2023-03-12 10:49     ` Andreas Enge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5be345282b038321a7f3c1f5fb2df8560ceb653c.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=61586@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).