all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Martin Becze <mjbecze@riseup.net>
To: 43183@debbugs.gnu.org
Cc: Martin Becze <mjbecze@riseup.net>
Subject: [bug#43183] [PATCH v3 2/4] gnu: Add guile-machine-code.
Date: Tue,  8 Sep 2020 10:59:44 -0500	[thread overview]
Message-ID: <20200908155946.2322-3-mjbecze@riseup.net> (raw)
In-Reply-To: <20200908155946.2322-1-mjbecze@riseup.net>

* gnu/packages/guile-xyz.scm (guile-machine-code): New variable.
---
 gnu/packages/guile-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index e1c763faef..7c8a417a14 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3911,3 +3911,51 @@ more objects or strings, represented by a Json object or an IRI.")
      "This is an R6RS library for working with packed byte structures.  It is
 similar to struct in Python or pack and unpack in Perl.")
     (license license:expat)))
+
+(define-public guile-machine-code
+  (package
+    (name "guile-machine-code")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/weinholt/machine-code.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0wzj3caj2jypzyjqfkfqkvr3kkbjabsnhldv9kvnx9w9qnria5yd"))))
+    (build-system guile-build-system)
+    (arguments
+     `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+       #:modules ((guix build guile-build-system)
+                  (guix build utils)
+                  (srfi srfi-26)
+                  (ice-9 ftw))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'build 'move-sls-files
+                    (lambda _
+                      ;; Move files under a struct/ directory to reflect the
+                      ;; module hierarchy.
+                      (define dst-folder "machine-code")
+                      (define (target file)
+                        (string-append dst-folder "/" file))
+                      (define files
+                        (scandir "." (negate (cut member <> '("." "..")))))
+                      (mkdir dst-folder)
+                      (for-each (lambda (file)
+                                  (rename-file file (target file)))
+                                files)
+                      #t)))))
+    (native-inputs
+     `(("guile" ,guile-3.0)))
+    (propagated-inputs
+     `(("guile-struct-pack" ,guile-struct-pack)))
+    (home-page "https://github.com/weinholt/machine-code")
+    (synopsis "Tools that relate to machine code and object formats")
+    (description
+     "This project is about the development of tools that relate to machine
+code and object formats; for all architectures.  Here you'll find libraries for
+working with binary code: assembly, disassembly, instruction tables, object
+formats and related areas.")
+    (license license:expat)))
-- 
2.28.0





  parent reply	other threads:[~2020-09-08 16:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 15:02 [bug#43183] [PATCH] gnu: Add loko-scheme Martin Becze
2020-09-04  6:43 ` Mathieu Othacehe
2020-09-04  6:49   ` Martin Becze
2020-09-04  7:16     ` Mathieu Othacehe
2020-09-04  7:33       ` Ricardo Wurmus
2020-09-04 20:25 ` [bug#43183] [PATCH v2 0/5] " Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 1/5] " Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 2/5] gnu: guile-pfds: When using Guile 3, compile as a r6rs library Martin Becze
2020-09-07  6:30     ` Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 3/5] gnu: Add guile-struct-pack Martin Becze
2020-09-07  6:30     ` Mathieu Othacehe
2020-09-08 16:04       ` Martin Becze
2020-09-10  7:37         ` bug#43183: " Mathieu Othacehe
2020-09-04 20:25   ` [bug#43183] [PATCH v2 4/5] gnu: Add guile-machine-code Martin Becze
2020-09-04 20:25   ` [bug#43183] [PATCH v2 5/5] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59 ` [bug#43183] [PATCH v3 0/4] Add loko-scheme Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 1/4] gnu: Add guile-struct-pack Martin Becze
2020-09-08 15:59   ` Martin Becze [this message]
2020-09-08 15:59   ` [bug#43183] [PATCH v3 3/4] gnu: Add guile-laesare Martin Becze
2020-09-08 15:59   ` [bug#43183] [PATCH v3 4/4] gnu: Add loko-scheme Martin Becze

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

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

  git send-email \
    --in-reply-to=20200908155946.2322-3-mjbecze@riseup.net \
    --to=mjbecze@riseup.net \
    --cc=43183@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.