unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>
Cc: 61586@debbugs.gnu.org
Subject: [bug#61586] [PATCH RFC 2/2] gnu: Add binaryen.
Date: Thu, 6 Apr 2023 17:38:23 -0400	[thread overview]
Message-ID: <CAJ=RwfbuBdcn3yQ7U24ghSNiH95H+jt_BZse+P0mjmp5GRj2=Q@mail.gmail.com> (raw)
In-Reply-To: <5be345282b038321a7f3c1f5fb2df8560ceb653c.camel@gmail.com>

Hi Liliana,

On Fri, Feb 17, 2023 at 6:00 PM Liliana Marie Prikler
<liliana.prikler@gmail.com> wrote:
>
> * 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

This looks good to me!  We are currently using a hackier package
recipe with tests disabled in the Guile Hoot (Guile -> WASM compiler)
project: https://gitlab.com/spritely/guile-hoot-updates/-/blob/main/examples/manifest.scm#L18

Nice job getting the tests working!

- Dave




  reply	other threads:[~2023-04-06 21:39 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 ` [bug#61586] [PATCH RFC 2/2] gnu: Add binaryen Liliana Marie Prikler
2023-04-06 21:38   ` Thompson, David [this message]
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='CAJ=RwfbuBdcn3yQ7U24ghSNiH95H+jt_BZse+P0mjmp5GRj2=Q@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=61586@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    /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).