GNU bug report logs - #50283
HwInfo

Previous Next

Package: guix-patches;

Reported by: Raghav Gururajan <rg <at> raghavgururajan.name>

Date: Mon, 30 Aug 2021 19:32:01 UTC

Severity: normal

Tags: patch

Merged with 49934

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Raghav Gururajan <rg <at> raghavgururajan.name>
To: 50283 <at> debbugs.gnu.org
Cc: Raghav Gururajan <rg <at> raghavgururajan.name>
Subject: [bug#50283] [PATCH v1 1/2] gnu: Add libx86emu.
Date: Mon, 30 Aug 2021 15:35:24 -0400
* gnu/packages/virtualization.scm (libx86emu): New variable.
---
 gnu/packages/virtualization.scm | 52 +++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index e952c009b5..6dd5127bc6 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -130,6 +130,58 @@
   #:use-module (srfi srfi-26)
   #:use-module (ice-9 match))
 
+(define-public libx86emu
+  (package
+    (name "libx86emu")
+    (version "3.1")
+    (home-page "https://github.com/wfeldt/libx86emu")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url home-page)
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "104xqc6nj9rpi7knl3dfqvasf087hlz2n5yndb1iycw35a6j509b"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (include (string-append out "/include"))
+                    (lib (string-append out "/lib")))
+               ;; Remove unnecessary variables and
+               ;; correct the values of version and prefix.
+               (substitute* (find-files "." "Makefile")
+                 (("GIT2LOG.*=.*$") "")
+                 (("GITDEPS.*=.*$") "")
+                 (("VERSION.*=.*$")
+                  (string-append "VERSION := "
+                                 ,version "\n"))
+                 (("BRANCH.*=.*$") "")
+                 (("PREFIX.*=.*$")
+                  (string-append "PREFIX := " out "\n"))
+                 (("MAJOR_VERSION.*=.*$")
+                  (string-append "MAJOR_VERSION := "
+                                 ,(version-major version) "\n"))
+                 (("LIBDIR.*=.*$")
+                  (string-append "LIBDIR = " lib "\n"))
+                 (("/usr/include") include)))))
+         (delete 'configure))))         ; no configure script
+    (native-inputs
+     `(("nasm" ,nasm)
+       ("perl" ,perl)))
+    (synopsis "ISA x86 emulation library")
+    (description "Libx86emu is a small library to emulate x86 instructions.  The
+focus here is not a complete emulation but to cover enough for typical
+firmware blobs.")
+    (license license:isc)))
+
 (define (qemu-patch commit file-name sha256-bv)
   "Return an origin for COMMIT."
   (origin
-- 
2.33.0





This bug report was last modified 3 years and 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.