GNU bug report logs - #62324
gnu: Add emu8051

Previous Next

Package: guix-patches;

Reported by: c4droid <c4droid <at> foxmail.com>

Date: Tue, 21 Mar 2023 07:30:01 UTC

Severity: normal

Tags: patch

Done: 宋文武 <iyzsong <at> envs.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62324 in the body.
You can then email your comments to 62324 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Tue, 21 Mar 2023 07:30:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to c4droid <c4droid <at> foxmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 21 Mar 2023 07:30:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: guix-patches <at> gnu.org
Subject: gnu: Add emu8051
Date: Tue, 21 Mar 2023 15:20:27 +0800
[0001-gnu-Add-emu8051.patch (text/x-patch, inline)]
From 351280951b0ad515dc6b725dca51a986def1f93f Mon Sep 17 00:00:00 2001
From: c4droid <c4droid <at> foxmail.com>
Date: Tue, 21 Mar 2023 15:16:10 +0800
Subject: [PATCH] gnu: Add emu8051.

* gnu/packages/embedded.scm (emu8051): New variable.
---
 gnu/packages/embedded.scm | 41 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8d854c7..50658e4 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith <at> outlook.com>
 ;;; Copyright © 2022 Mathieu Othacehe <othacehe <at> gnu.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 c4droid <c4droid <at> foxmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1747,3 +1748,43 @@ (define-public ts4900-utils
 @item tssilomon
 @end itemize")
       (license license:bsd-2))))
+
+(define-public emu8051
+  (let ((commit "5dc681275151c4a5d7b85ec9ff4ceb1b25abd5a8")
+        (revision "1"))
+    (package
+      (name "emu8051")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jarikomppa/emu8051")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ;No test suite
+         #:make-flags (list (string-append "CC="
+                                           ,(cc-for-target)))
+         #:phases (modify-phases %standard-phases
+                    (delete 'configure) ;No ./configure script
+                    (add-before 'build 'patch-ncurses
+                      ;; Replace LDFLAGS -lcurses to -lncurses
+                      (lambda* _
+                        (substitute* "Makefile"
+                          (("-lcurses")
+                           "-lncurses"))))
+                    (replace 'install
+                      ;; No installation procedure
+                      (lambda _
+                        (install-file "emu"
+                                      (string-append (assoc-ref %outputs "out")
+                                                     "/bin")))))))
+      (inputs (list ncurses))
+      (home-page "https://github.comjarikomppa/emu8051")
+      (synopsis "8051/8052 emulator with curses-based UI")
+      (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
+      (license license:expat))))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Tue, 21 Mar 2023 13:44:02 GMT) Full text and rfc822 format available.

Message #8 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] gnu: Add emu8051
Date: Tue, 21 Mar 2023 13:43:14 +0000
Hi,

On 2023-03-21 07:20, c4droid wrote:
> 
> +      (arguments
> +       `(#:tests? #f ;No test suite
> +         #:make-flags (list (string-append "CC="
> +                                           ,(cc-for-target)))
> +         #:phases (modify-phases %standard-phases
> +                    (delete 'configure) ;No ./configure script
> +                    (add-before 'build 'patch-ncurses
> +                      ;; Replace LDFLAGS -lcurses to -lncurses
> +                      (lambda* _
> +                        (substitute* "Makefile"
> +                          (("-lcurses")
> +                           "-lncurses"))))

How about turning this 'patch-ncurses phase into a patch snippet instead? i.e.

(source
  (origin
    (method ...)
    ...
    (modules '((guix build utils)))
    (snippet
     #~(begin
        ;; Replace LDFLAGS -lcurses to -lncurses
        (substitute* "Makefile"
          (("-lcurses") "-lncurses"))))))

[...]

> +                    (replace 'install
> +                      ;; No installation procedure
> +                      (lambda _
> +                        (install-file "emu"
> +                                      (string-append (assoc-ref %outputs "out")
> +                                                     "/bin")))))))

Use G-Expressions here, i.e.

(arguments
 (list
  #:tests? #f ;No test suite
  #:make-flags #~(list ...)
  #:phases
  #~(modify-phases ...
     ...
     (replace 'install
       (lambda _
        (install-file "emu" (string-append #$output "/bin")))))))


Cheers,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Tue, 21 Mar 2023 14:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: Simon South <simon <at> simonsouth.net>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] gnu: Add emu8051
Date: Tue, 21 Mar 2023 10:47:55 -0400
c4droid <c4droid <at> foxmail.com> writes:
> (home-page "https://github.comjarikomppa/emu8051")

This URL appears to be missing a forward slash.

-- 
Simon South
simon <at> simonsouth.net




Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 00:56:02 GMT) Full text and rfc822 format available.

Message #14 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] gnu: Add emu8051
Date: Wed, 22 Mar 2023 08:53:41 +0800
Hi, Bruno

Bruno Victal <mirai <at> makinata.eu> writes:

> Hi,
>
> On 2023-03-21 07:20, c4droid wrote:
>> 
>> +      (arguments
>> +       `(#:tests? #f ;No test suite
>> +         #:make-flags (list (string-append "CC="
>> +                                           ,(cc-for-target)))
>> +         #:phases (modify-phases %standard-phases
>> +                    (delete 'configure) ;No ./configure script
>> +                    (add-before 'build 'patch-ncurses
>> +                      ;; Replace LDFLAGS -lcurses to -lncurses
>> +                      (lambda* _
>> +                        (substitute* "Makefile"
>> +                          (("-lcurses")
>> +                           "-lncurses"))))
>
> How about turning this 'patch-ncurses phase into a patch snippet instead? i.e.
>

I'll change it later, thanks for the hints.

> (source
>   (origin
>     (method ...)
>     ...
>     (modules '((guix build utils)))
>     (snippet
>      #~(begin
>         ;; Replace LDFLAGS -lcurses to -lncurses
>         (substitute* "Makefile"
>           (("-lcurses") "-lncurses"))))))
>
> [...]
>
>> +                    (replace 'install
>> +                      ;; No installation procedure
>> +                      (lambda _
>> +                        (install-file "emu"
>> +                                      (string-append (assoc-ref %outputs "out")
>> +                                                     "/bin")))))))
>
> Use G-Expressions here, i.e.
>
> (arguments
>  (list
>   #:tests? #f ;No test suite
>   #:make-flags #~(list ...)
>   #:phases
>   #~(modify-phases ...
>      ...
>      (replace 'install
>        (lambda _
>         (install-file "emu" (string-append #$output "/bin")))))))
>
>
> Cheers,
> Bruno





Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 00:58:02 GMT) Full text and rfc822 format available.

Message #17 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: Simon South <simon <at> simonsouth.net>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] gnu: Add emu8051
Date: Wed, 22 Mar 2023 08:56:00 +0800
I'll fix it in new patch, my typo fault.

Simon South <simon <at> simonsouth.net> writes:

> c4droid <c4droid <at> foxmail.com> writes:
>> (home-page "https://github.comjarikomppa/emu8051")
>
> This URL appears to be missing a forward slash.





Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 01:53:01 GMT) Full text and rfc822 format available.

Message #20 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: Bruno Victal <mirai <at> makinata.eu>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] gnu: Add emu8051
Date: Wed, 22 Mar 2023 09:48:47 +0800
Hi, Bruno

Bruno Victal <mirai <at> makinata.eu> writes:

> Hi,
>
> On 2023-03-21 07:20, c4droid wrote:
>> 
>> +      (arguments
>> +       `(#:tests? #f ;No test suite
>> +         #:make-flags (list (string-append "CC="
>> +                                           ,(cc-for-target)))
>> +         #:phases (modify-phases %standard-phases
>> +                    (delete 'configure) ;No ./configure script
>> +                    (add-before 'build 'patch-ncurses
>> +                      ;; Replace LDFLAGS -lcurses to -lncurses
>> +                      (lambda* _
>> +                        (substitute* "Makefile"
>> +                          (("-lcurses")
>> +                           "-lncurses"))))
>

The modules and snippet field can be apply to build derivation

> How about turning this 'patch-ncurses phase into a patch snippet instead? i.e.
>
> (source
>   (origin
>     (method ...)
>     ...
>     (modules '((guix build utils)))
>     (snippet
>      #~(begin
>         ;; Replace LDFLAGS -lcurses to -lncurses
>         (substitute* "Makefile"
>           (("-lcurses") "-lncurses"))))))
>
> [...]
>
>> +                    (replace 'install
>> +                      ;; No installation procedure
>> +                      (lambda _
>> +                        (install-file "emu"
>> +                                      (string-append (assoc-ref %outputs "out")
>> +                                                     "/bin")))))))
>

But here, I used G-Expressions here, report gexp is unbound variable.

> Use G-Expressions here, i.e.
>
> (arguments
>  (list
>   #:tests? #f ;No test suite
>   #:make-flags #~(list ...)
>   #:phases
>   #~(modify-phases ...
>      ...
>      (replace 'install
>        (lambda _
>         (install-file "emu" (string-append #$output "/bin")))))))
>
>
> Cheers,
> Bruno





Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 02:04:02 GMT) Full text and rfc822 format available.

Message #23 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: 62324 <at> debbugs.gnu.org
Subject: [PATCH 0/1] gnu: emu8051: Using snippet to replace patch-ncurses
 phases
Date: Wed, 22 Mar 2023 09:58:24 +0800
[Message part 1 (text/plain, inline)]
Replace patch-ncurses phases with snippet field.

[0001-gnu-emu8051-Using-snippet-to-replace-patch-ncurses-p.patch (text/x-patch, inline)]
From 8f4aeb1d2f99b87ced20242cff6ed282649243d4 Mon Sep 17 00:00:00 2001
From: c4droid <c4droid <at> foxmail.com>
Date: Wed, 22 Mar 2023 09:57:13 +0800
Subject: [PATCH] gnu: emu8051: Using snippet to replace patch-ncurses phases

---
 gnu/packages/embedded.scm | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 50658e4..fdf950f 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1763,28 +1763,27 @@ (define-public emu8051
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))))
+                  "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))
+		(modules '((guix build utils)))
+		(snippet
+		 #~(begin
+		     ;; Replace LDFLAGS -lcurses to -lncurses
+		     (substitute* "Makefile"
+		       (("-lcurses") "-lncurses"))))))
       (build-system gnu-build-system)
       (arguments
        `(#:tests? #f ;No test suite
-         #:make-flags (list (string-append "CC="
-                                           ,(cc-for-target)))
-         #:phases (modify-phases %standard-phases
-                    (delete 'configure) ;No ./configure script
-                    (add-before 'build 'patch-ncurses
-                      ;; Replace LDFLAGS -lcurses to -lncurses
-                      (lambda* _
-                        (substitute* "Makefile"
-                          (("-lcurses")
-                           "-lncurses"))))
-                    (replace 'install
-                      ;; No installation procedure
-                      (lambda _
-                        (install-file "emu"
-                                      (string-append (assoc-ref %outputs "out")
-                                                     "/bin")))))))
+         #:make-flags #~(list (string-append "CC="
+                                             ,(cc-for-target)))
+         #:phases #~(modify-phases %standard-phases
+                      (delete 'configure) ;No ./configure script
+                      (replace 'install
+			;; No installation procedure
+			(lambda _
+                          (install-file "emu"
+					(string-append #$output "/bin")))))))
       (inputs (list ncurses))
-      (home-page "https://github.comjarikomppa/emu8051")
+      (home-page "https://github.com/jarikomppa/emu8051")
       (synopsis "8051/8052 emulator with curses-based UI")
       (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
       (license license:expat))))
-- 
2.39.2

[Message part 3 (text/plain, inline)]
When changing install phases with gexp, report: Unbound variables: gexp

Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 02:14:02 GMT) Full text and rfc822 format available.

Message #26 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: Bruno Victal <mirai <at> makinata.eu>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: [bug#62324] [PATCH 0/1] gnu: emu8051: Using snippet to replace
 patch-ncurses phases
Date: Wed, 22 Mar 2023 02:13:53 +0000
On 2023-03-22 01:58, c4droid wrote:
>        (build-system gnu-build-system)
>        (arguments
>         `(#:tests? #f ;No test suite
> -         #:make-flags (list (string-append "CC="
> -                                           ,(cc-for-target)))
> -         #:phases (modify-phases %standard-phases
> -                    (delete 'configure) ;No ./configure script
> -                    (add-before 'build 'patch-ncurs

(arguments
 (list
  #:tests? #f ;No test suite
  #:make-flags #~(list (string-append "CC=" (cc-for-target)))
  .....


Note that I'm not using quasiquote here.


Cheers,
Bruno




Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Wed, 22 Mar 2023 07:46:02 GMT) Full text and rfc822 format available.

Message #29 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: 62324 <at> debbugs.gnu.org
Subject: [PATCH 1/1] gnu: emu8051: Fix build error for quasiquote
Date: Wed, 22 Mar 2023 15:43:12 +0800
[Message part 1 (text/plain, inline)]
Here is final patch for emu8051 packages, it fix previous patches error.

[0001-gnu-emu8051-Fix-build-error-for-quasiquote.patch (text/x-patch, inline)]
From 83dfc323e2439e6a89079054eb47d439b81d01ce Mon Sep 17 00:00:00 2001
From: c4droid <c4droid <at> foxmail.com>
Date: Wed, 22 Mar 2023 15:42:09 +0800
Subject: [PATCH] gnu: emu8051: Fix build error for quasiquote

---
 gnu/packages/embedded.scm | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index fdf950f..514c20f 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1764,24 +1764,24 @@ (define-public emu8051
                 (sha256
                  (base32
                   "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))
-		(modules '((guix build utils)))
-		(snippet
-		 #~(begin
-		     ;; Replace LDFLAGS -lcurses to -lncurses
-		     (substitute* "Makefile"
-		       (("-lcurses") "-lncurses"))))))
+                (modules '((guix build utils)))
+                (snippet #~(begin
+                             ;; Replace LDFLAGS -lcurses to -lncurses
+                             (substitute* "Makefile"
+                               (("-lcurses")
+                                "-lncurses"))))))
       (build-system gnu-build-system)
       (arguments
-       `(#:tests? #f ;No test suite
-         #:make-flags #~(list (string-append "CC="
-                                             ,(cc-for-target)))
-         #:phases #~(modify-phases %standard-phases
-                      (delete 'configure) ;No ./configure script
-                      (replace 'install
-			;; No installation procedure
-			(lambda _
-                          (install-file "emu"
-					(string-append #$output "/bin")))))))
+       (list #:tests? #f ;No test suite
+             #:make-flags #~(list (string-append "CC="
+                                                 #$(cc-for-target)))
+             #:phases #~(modify-phases %standard-phases
+                          (delete 'configure) ;No ./configure script
+                          (replace 'install
+                            ;; No installation procedure
+                            (lambda _
+                              (install-file "emu"
+                                            (string-append #$output "/bin")))))))
       (inputs (list ncurses))
       (home-page "https://github.com/jarikomppa/emu8051")
       (synopsis "8051/8052 emulator with curses-based UI")
-- 
2.39.2


Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Thu, 30 Mar 2023 12:48:02 GMT) Full text and rfc822 format available.

Message #32 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324 <at> debbugs.gnu.org
Subject: Re: bug#62324: gnu: Add emu8051
Date: Thu, 30 Mar 2023 20:48:02 +0800
c4droid <c4droid <at> foxmail.com> writes:

> Here is final patch for emu8051 packages, it fix previous patches error.

Hello, this patch is based upon your previous emu8051 patch, could you merge
them into one patch?  Which should be a '[PATCH] gnu: Add emu8051.'.

Thank you!




Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Fri, 31 Mar 2023 07:48:01 GMT) Full text and rfc822 format available.

Message #35 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: c4droid <c4droid <at> foxmail.com>
To: 62324 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add emu8051.
Date: Fri, 31 Mar 2023 14:48:42 +0800
[0001-PATCH-gnu-Add-emu8051.patch (text/x-patch, inline)]
From a9f8f4e71dc5270ab7cbfd6da74a3fc7b304e5b6 Mon Sep 17 00:00:00 2001
From: c4droid <c4droid <at> foxmail.com>
Date: Fri, 31 Mar 2023 14:46:50 +0800
Subject: [PATCH] [PATCH] gnu: Add emu8051.

---
 gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 8d854c7..653e02a 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith <at> outlook.com>
 ;;; Copyright © 2022 Mathieu Othacehe <othacehe <at> gnu.org>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
+;;; Copyright © 2023 c4droid <c4droid <at> foxmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1747,3 +1748,41 @@ (define-public ts4900-utils
 @item tssilomon
 @end itemize")
       (license license:bsd-2))))
+
+(define-public emu8051
+  (let ((commit "5dc681275151c4a5d7b85ec9ff4ceb1b25abd5a8")
+        (revision "1"))
+    (package
+      (name "emu8051")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jarikomppa/emu8051")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))
+                (modules '((guix build utils)))
+                (snippet #~(begin
+                             ;; Replace LDFLAGS -lcurses to -lncurses
+                             (substitute* "Makefile"
+                               (("-lcurses") "-lncurses"))))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f ;No test suite
+             #:make-flags #~(list (string-append "CC="
+                                                 #$(cc-for-target)))
+             #:phases #~(modify-phases %standard-phases
+                          (delete 'configure) ;No ./configure script
+                          (replace 'install
+                            ;; No installation procedure
+                            (lambda _
+                              (install-file "emu"
+                                            (string-append #$output "/bin")))))))
+      (inputs (list ncurses))
+      (home-page "https://github.comjarikomppa/emu8051")
+      (synopsis "8051/8052 emulator with curses-based UI")
+      (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
+      (license license:expat))))
-- 
2.39.2





Information forwarded to guix-patches <at> gnu.org:
bug#62324; Package guix-patches. (Fri, 31 Mar 2023 11:22:01 GMT) Full text and rfc822 format available.

Message #38 received at 62324 <at> debbugs.gnu.org (full text, mbox):

From: iyzsong <at> envs.net
To: 62324 <at> debbugs.gnu.org
Cc: 宋文武 <iyzsong <at> member.fsf.org>,
 c4droid <c4droid <at> foxmail.com>
Subject: [PATCH v2] gnu: Add emu8051.
Date: Fri, 31 Mar 2023 19:22:04 +0800
From: c4droid <c4droid <at> foxmail.com>

* gnu/packages/emulator.scm (emu8051): New variable.

Reviewed-by: 宋文武 <iyzsong <at> member.fsf.org>
---
 gnu/packages/emulators.scm | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 166c3b4ec6..7e73b217ea 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2021 Felix Gruber <felgru <at> posteo.net>
 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
+;;; Copyright © 2023 c4droid <c4droid <at> foxmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2580,3 +2581,42 @@ (define-public uxn
        "This package provides an assembler and emulator for the Uxn
 stack-machine, written in ANSI C.  Graphical output is implemented using SDL2.")
       (license license:expat))))
+
+(define-public emu8051
+  (let ((commit "5dc681275151c4a5d7b85ec9ff4ceb1b25abd5a8")
+        (revision "1"))
+    (package
+      (name "emu8051")
+      (version (git-version "0.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/jarikomppa/emu8051")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1xxmkcwvd5fjnhwbricafg4xvxvr8dxhfanyfp4rbksw37dgk2fx"))
+                (modules '((guix build utils)))
+                (snippet #~(begin
+                             ;; Replace LDFLAGS -lcurses to -lncurses
+                             (substitute* "Makefile"
+                               (("-lcurses") "-lncurses"))))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f ;No test suite
+             #:make-flags #~(list (string-append "CC="
+                                                 #$(cc-for-target)))
+             #:phases
+             #~(modify-phases %standard-phases
+                 (delete 'configure)    ;No ./configure script
+                 (replace 'install
+                   ;; No installation procedure
+                   (lambda _
+                     (install-file "emu"
+                                   (string-append #$output "/bin")))))))
+      (inputs (list ncurses))
+      (home-page "https://github.com/jarikomppa/emu8051")
+      (synopsis "8051/8052 emulator with curses-based UI")
+      (description "emu8051 is a simulator of the 8051/8052 microcontrollers.")
+      (license license:expat))))
-- 
2.39.2





Reply sent to 宋文武 <iyzsong <at> envs.net>:
You have taken responsibility. (Fri, 31 Mar 2023 11:34:02 GMT) Full text and rfc822 format available.

Notification sent to c4droid <c4droid <at> foxmail.com>:
bug acknowledged by developer. (Fri, 31 Mar 2023 11:34:02 GMT) Full text and rfc822 format available.

Message #43 received at 62324-done <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> envs.net>
To: c4droid <c4droid <at> foxmail.com>
Cc: 62324-done <at> debbugs.gnu.org
Subject: Re: bug#62324: gnu: Add emu8051
Date: Fri, 31 Mar 2023 19:33:49 +0800
c4droid <c4droid <at> foxmail.com> writes:

>>From a9f8f4e71dc5270ab7cbfd6da74a3fc7b304e5b6 Mon Sep 17 00:00:00 2001
> From: c4droid <c4droid <at> foxmail.com>
> Date: Fri, 31 Mar 2023 14:46:50 +0800
> Subject: [PATCH] [PATCH] gnu: Add emu8051.
>
> ---
>  gnu/packages/embedded.scm | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)

Hello, I think emu8051 should go to emulators.scm, it seems embedded.scm
are for tools working with real hardwares, while emulators.scm has
similiar packages like qtmips.

I have send an updated patch to move it into emulators.scm, also fixed
home-page, and add commit message for file changes:

  * gnu/packages/emulator.scm (emu8051): New variable.

Though I just nocited it should be emulators.scm (emu8051)..

Well, I decide to push now, thank you for the patch and reviewers for
the feedbacks!




Added tag(s) patch. Request was from Bruno Victal <mirai <at> makinata.eu> to control <at> debbugs.gnu.org. (Tue, 04 Apr 2023 13:32:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 03 May 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 358 days ago.

Previous Next


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